[FFmpeg-cvslog] r19648 - in trunk/libavcodec: libdirac_libschro.c libdiracdec.c libdiracenc.c libschroedingerdec.c libschroedingerenc.c

diego subversion
Sat Aug 15 13:12:48 CEST 2009


Author: diego
Date: Sat Aug 15 13:12:47 2009
New Revision: 19648

Log:
Remove useless braces.

Modified:
   trunk/libavcodec/libdirac_libschro.c
   trunk/libavcodec/libdiracdec.c
   trunk/libavcodec/libdiracenc.c
   trunk/libavcodec/libschroedingerdec.c
   trunk/libavcodec/libschroedingerenc.c

Modified: trunk/libavcodec/libdirac_libschro.c
==============================================================================
--- trunk/libavcodec/libdirac_libschro.c	Sat Aug 15 13:02:50 2009	(r19647)
+++ trunk/libavcodec/libdirac_libschro.c	Sat Aug 15 13:12:47 2009	(r19648)
@@ -59,9 +59,8 @@ unsigned int ff_dirac_schro_get_video_fo
             avccontext->height == vf->height){
             ret_idx = idx;
             if (avccontext->time_base.den == vf->frame_rate_num &&
-                avccontext->time_base.num == vf->frame_rate_denom) {
+                avccontext->time_base.num == vf->frame_rate_denom)
                 return idx;
-            }
         }
     }
     return ret_idx;
@@ -76,9 +75,8 @@ void ff_dirac_schro_queue_init (FfmpegDi
 void ff_dirac_schro_queue_free (FfmpegDiracSchroQueue *queue,
                                 void (*free_func)(void *))
 {
-    while (queue->p_head) {
+    while (queue->p_head)
         free_func( ff_dirac_schro_queue_pop(queue) );
-    }
 }
 
 int ff_dirac_schro_queue_push_back (FfmpegDiracSchroQueue *queue, void *p_data)

Modified: trunk/libavcodec/libdiracdec.c
==============================================================================
--- trunk/libavcodec/libdiracdec.c	Sat Aug 15 13:02:50 2009	(r19647)
+++ trunk/libavcodec/libdiracdec.c	Sat Aug 15 13:12:47 2009	(r19648)
@@ -55,11 +55,9 @@ static enum PixelFormat GetFfmpegChromaF
                       sizeof(ffmpeg_dirac_pixel_format_map[0]);
     int idx;
 
-    for (idx = 0; idx < num_formats; ++idx) {
-        if (ffmpeg_dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt) {
+    for (idx = 0; idx < num_formats; ++idx)
+        if (ffmpeg_dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt)
             return ffmpeg_dirac_pixel_format_map[idx].ff_pix_fmt;
-        }
-    }
     return PIX_FMT_NONE;
 }
 

Modified: trunk/libavcodec/libdiracenc.c
==============================================================================
--- trunk/libavcodec/libdiracenc.c	Sat Aug 15 13:02:50 2009	(r19647)
+++ trunk/libavcodec/libdiracenc.c	Sat Aug 15 13:12:47 2009	(r19648)
@@ -188,25 +188,22 @@ static av_cold int libdirac_encode_init(
                             avccontext->global_quality / (FF_QP2LAMBDA*10.0);
             /* if it is not default bitrate then send target rate. */
             if (avccontext->bit_rate >= 1000 &&
-                avccontext->bit_rate != 200000) {
+                avccontext->bit_rate != 200000)
                p_dirac_params->enc_ctx.enc_params.trate =
                              avccontext->bit_rate / 1000;
-            }
         } else
             p_dirac_params->enc_ctx.enc_params.lossless = 1;
     } else if (avccontext->bit_rate >= 1000)
         p_dirac_params->enc_ctx.enc_params.trate = avccontext->bit_rate / 1000;
 
     if ((preset > VIDEO_FORMAT_QCIF || preset < VIDEO_FORMAT_QSIF525) &&
-         avccontext->bit_rate == 200000) {
+        avccontext->bit_rate == 200000)
         p_dirac_params->enc_ctx.enc_params.trate = 0;
-    }
 
-    if (avccontext->flags & CODEC_FLAG_INTERLACED_ME) {
+    if (avccontext->flags & CODEC_FLAG_INTERLACED_ME)
         /* all material can be coded as interlaced or progressive
          * irrespective of the type of source material */
         p_dirac_params->enc_ctx.enc_params.picture_coding_mode = 1;
-    }
 
     p_dirac_params->p_encoder = dirac_encoder_init (&(p_dirac_params->enc_ctx),
                                                     verbose );

Modified: trunk/libavcodec/libschroedingerdec.c
==============================================================================
--- trunk/libavcodec/libschroedingerdec.c	Sat Aug 15 13:02:50 2009	(r19647)
+++ trunk/libavcodec/libschroedingerdec.c	Sat Aug 15 13:12:47 2009	(r19648)
@@ -127,11 +127,9 @@ static enum PixelFormat GetFfmpegChromaF
                       sizeof(ffmpeg_schro_pixel_format_map[0]);
     int idx;
 
-    for (idx = 0; idx < num_formats; ++idx) {
-        if (ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) {
+    for (idx = 0; idx < num_formats; ++idx)
+        if (ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt)
             return ffmpeg_schro_pixel_format_map[idx].ff_pix_fmt;
-        }
-    }
     return PIX_FMT_NONE;
 }
 
@@ -197,12 +195,10 @@ static void libschroedinger_handle_first
     avccontext->time_base.num = p_schro_params->format->frame_rate_denominator;
 
     if (!p_schro_params->dec_pic.data[0])
-    {
         avpicture_alloc(&p_schro_params->dec_pic,
                         avccontext->pix_fmt,
                         avccontext->width,
                         avccontext->height);
-    }
 }
 
 static int libschroedinger_decode_frame(AVCodecContext *avccontext,
@@ -277,11 +273,10 @@ static int libschroedinger_decode_frame(
             /* Pull a frame out of the decoder. */
             frame = schro_decoder_pull (decoder);
 
-            if (frame) {
+            if (frame)
                 ff_dirac_schro_queue_push_back(
                                              &p_schro_params->dec_frame_queue,
                                              frame);
-            }
             break;
         case SCHRO_DECODER_EOS:
             go = 0;

Modified: trunk/libavcodec/libschroedingerenc.c
==============================================================================
--- trunk/libavcodec/libschroedingerenc.c	Sat Aug 15 13:02:50 2009	(r19647)
+++ trunk/libavcodec/libschroedingerenc.c	Sat Aug 15 13:12:47 2009	(r19648)
@@ -150,10 +150,9 @@ static int libschroedinger_encode_init(A
                                           "gop_structure",
                                           SCHRO_ENCODER_GOP_INTRA_ONLY);
 
-        if (avccontext->coder_type == FF_CODER_TYPE_VLC) {
+        if (avccontext->coder_type == FF_CODER_TYPE_VLC)
             schro_encoder_setting_set_double (p_schro_params->encoder,
                                               "enable_noarith", 1);
-        }
     }
     else {
         schro_encoder_setting_set_double (p_schro_params->encoder,
@@ -194,12 +193,11 @@ static int libschroedinger_encode_init(A
 
     }
 
-    if (avccontext->flags & CODEC_FLAG_INTERLACED_ME) {
+    if (avccontext->flags & CODEC_FLAG_INTERLACED_ME)
         /* All material can be coded as interlaced or progressive
            irrespective of the type of source material. */
         schro_encoder_setting_set_double (p_schro_params->encoder,
                                             "interlaced_coding", 1);
-    }
 
     /* FIXME: Signal range hardcoded to 8-bit data until both libschroedinger
      * and libdirac support other bit-depth data. */
@@ -324,9 +322,8 @@ static int libschroedinger_encode_frame(
             p_frame_output->size     = p_schro_params->enc_buf_size;
             p_frame_output->p_encbuf = p_schro_params->enc_buf;
             if (SCHRO_PARSE_CODE_IS_INTRA(parse_code) &&
-                SCHRO_PARSE_CODE_IS_REFERENCE(parse_code)) {
+                SCHRO_PARSE_CODE_IS_REFERENCE(parse_code))
                 p_frame_output->key_frame = 1;
-            }
 
             /* Parse the coded frame number from the bitstream. Bytes 14
              * through 17 represesent the frame number. */



More information about the ffmpeg-cvslog mailing list