[FFmpeg-soc] [soc]: r5549 - in indeo5: indeo5.c ivi_common.c

diego subversion at mplayerhq.hu
Tue Dec 22 01:37:08 CET 2009


Author: diego
Date: Tue Dec 22 01:37:08 2009
New Revision: 5549

Log:
coding style cosmetics: add spaces, break long lines, remove pointless {}

Modified:
   indeo5/indeo5.c
   indeo5/ivi_common.c

Modified: indeo5/indeo5.c
==============================================================================
--- indeo5/indeo5.c	Sat Dec 19 15:24:04 2009	(r5548)
+++ indeo5/indeo5.c	Tue Dec 22 01:37:08 2009	(r5549)
@@ -253,9 +253,11 @@ static int decode_gop_header(IVI5DecCont
 
     /* reallocate internal structures if needed */
     if (blk_size_changed) {
-        result = ff_ivi_init_tiles(ctx->planes, pic_conf.tile_width, pic_conf.tile_height);
+        result = ff_ivi_init_tiles(ctx->planes, pic_conf.tile_width,
+                                   pic_conf.tile_height);
         if (result) {
-            av_log(avctx, AV_LOG_ERROR, "Couldn't reallocate internal structures!\n");
+            av_log(avctx, AV_LOG_ERROR,
+                   "Couldn't reallocate internal structures!\n");
             return -1;
         }
     }
@@ -360,7 +362,8 @@ static int decode_pic_hdr(IVI5DecContext
 
                     if (ctx->mb_vlc_cust.table)
                         free_vlc(&ctx->mb_vlc_cust);
-                    result = ff_ivi_create_huff_from_desc(&ctx->mb_huff_desc, &ctx->mb_vlc_cust, 0);
+                    result = ff_ivi_create_huff_from_desc(&ctx->mb_huff_desc,
+                                                          &ctx->mb_vlc_cust, 0);
                     if (result) {
                         av_log(avctx, AV_LOG_ERROR, "Error while initializing custom macroblock vlc table!\n");
                         return -1;
@@ -719,7 +722,8 @@ static int decode_band(IVI5DecContext *c
     if (band->checksum_present) {
         chksum = ivi_calc_band_checksum(band);
         if (chksum != band->checksum) {
-            av_log(avctx,AV_LOG_ERROR,"Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n",
+            av_log(avctx, AV_LOG_ERROR,
+                   "Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n",
                    band->plane, band->band_num, band->checksum, chksum);
         }
     }

Modified: indeo5/ivi_common.c
==============================================================================
--- indeo5/ivi_common.c	Sat Dec 19 15:24:04 2009	(r5548)
+++ indeo5/ivi_common.c	Tue Dec 22 01:37:08 2009	(r5549)
@@ -90,7 +90,7 @@ int ff_ivi_create_huff_from_desc(const I
 
     /* number of codewords = pos */
     return init_vlc(pOut, IVI_VLC_BITS, pos, bits, 1, 1, codewords, 2, 2,
-                   (flag & 1) | INIT_VLC_LE);
+                    (flag & 1) | INIT_VLC_LE);
 }
 
 
@@ -128,7 +128,8 @@ int ff_ivi_dec_huff_desc(GetBitContext *
  */
 int ff_ivi_huff_desc_cmp(const IVIHuffDesc *desc1, const IVIHuffDesc *desc2)
 {
-    if (desc1->num_rows != desc2->num_rows || memcmp(desc1->xbits, desc2->xbits, desc1->num_rows))
+    if (desc1->num_rows != desc2->num_rows ||
+                           memcmp(desc1->xbits, desc2->xbits, desc1->num_rows))
         return 1;
     return 0;
 }
@@ -272,7 +273,8 @@ int av_cold ff_ivi_init_tiles(IVIPlaneDe
                     tile->height   = FFMIN(band->height - y, t_height);
                     tile->is_empty = tile->data_size = 0;
                     /* calculate number of macroblocks */
-                    tile->num_MBs  = IVI_MBs_PER_TILE(tile->width, tile->height, band->mb_size);
+                    tile->num_MBs  = IVI_MBs_PER_TILE(tile->width, tile->height,
+                                                      band->mb_size);
 
                     av_freep(&tile->mbs);
                     tile->mbs = av_malloc(tile->num_MBs * sizeof(IVIMbInfo));
@@ -302,10 +304,9 @@ void ff_ivi_put_pixels_8x8(int32_t *in, 
 {
     int     x, y;
 
-    for (y = 0; y < 8; out += pitch, in += 8, y++) {
+    for (y = 0; y < 8; out += pitch, in += 8, y++)
         for (x = 0; x < 8; x++)
             out[x] = in[x];
-    }
 }
 
 
@@ -397,7 +398,7 @@ int ff_ivi_decode_blocks(GetBitContext *
         cbp      = mb->cbp;
         buf_offs = mb->buf_offs;
 
-        quant       = av_clip(band->glob_quant + mb->q_delta, 0, 23);
+        quant = av_clip(band->glob_quant + mb->q_delta, 0, 23);
 
         base_tab  = (is_intra) ? band->intra_base  : band->inter_base;
         scale_tab = (is_intra) ? band->intra_scale : band->inter_scale;
@@ -428,7 +429,7 @@ int ff_ivi_decode_blocks(GetBitContext *
                 memset(trvec, 0, num_coeffs*sizeof(int32_t)); /* zero transform vector */
                 memset(col_flags, 0, sizeof(col_flags));      /* zero column flags */
 
-                while(scan_pos <= num_coeffs) {
+                while (scan_pos <= num_coeffs) {
                     sym = get_vlc2(gb, band->blk_vlc->table, IVI_VLC_BITS, 1);
                     if (sym == rvmap->eob_sym)
                         break; /* End of block */
@@ -449,7 +450,7 @@ int ff_ivi_decode_blocks(GetBitContext *
 
                 #ifdef IVI_DEBUG
                     if (!val)
-                        av_log(NULL,AV_LOG_ERROR,"Val = 0 encountered!\n");
+                        av_log(NULL, AV_LOG_ERROR, "Val = 0 encountered!\n");
                 #endif
 
                     q = (base_tab[pos] * scale_tab[quant]) >> 8;
@@ -634,10 +635,9 @@ uint16_t ivi_calc_band_checksum (IVIBand
     src = band->buf;
     checksum = 0;
 
-    for (y = 0; y < band->height; src += band->pitch,y++) {
+    for (y = 0; y < band->height; src += band->pitch, y++)
         for (x = 0; x < band->width; x++)
             checksum += src[x];
-    }
 
     return checksum;
 }
@@ -655,12 +655,12 @@ int ivi_check_band (IVIBandDesc *band, u
     src = band->buf;
     result = 0;
 
-    for (y = 0; y < band->height; src += band->pitch,y++) {
+    for (y = 0; y < band->height; src += band->pitch, y++) {
         for (x = 0; x < band->width; x++) {
             t1 = av_clip(src[x] + 128, 0, 255);
             t2 = ref[x];
             if (t1 != t2) {
-                av_log(NULL,AV_LOG_ERROR,"Data mismatch: row %d, column %d\n",
+                av_log(NULL, AV_LOG_ERROR, "Data mismatch: row %d, column %d\n",
                        y / band->blk_size, x / band->blk_size);
                 result = -1;
             }


More information about the FFmpeg-soc mailing list