]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/error_resilience.c
vda: cosmetic.
[ffmpeg] / libavcodec / error_resilience.c
index ee0e6fcfe229a0032184a43bcdc3b16be59884de..d296a781485a5889d041c006eed69512611f1db7 100644 (file)
@@ -50,7 +50,11 @@ static void decode_mb(MpegEncContext *s, int ref){
         h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
         memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));
         assert(ref>=0);
-        if(ref >= h->ref_count[0]) //FIXME it is posible albeit uncommon that slice references differ between slices, we take the easy approuch and ignore it for now. If this turns out to have any relevance in practice then correct remapping should be added
+        /* FIXME: It is posible albeit uncommon that slice references
+         * differ between slices. We take the easy approach and ignore
+         * it for now. If this turns out to have any relevance in
+         * practice then correct remapping should be added. */
+        if (ref >= h->ref_count[0])
             ref=0;
         fill_rectangle(&s->current_picture.f.ref_index[0][4*h->mb_xy], 2, 2, 2, ref, 1);
         fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1);
@@ -105,8 +109,8 @@ static void put_dc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t
     for(y=0; y<8; y++){
         int x;
         for(x=0; x<8; x++){
-            dest_cb[x + y*(s->uvlinesize)]= dcu/8;
-            dest_cr[x + y*(s->uvlinesize)]= dcv/8;
+            dest_cb[x + y * s->uvlinesize] = dcu / 8;
+            dest_cr[x + y * s->uvlinesize] = dcv / 8;
         }
     }
 }
@@ -684,7 +688,7 @@ static int is_intra_more_likely(MpegEncContext *s){
     if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == AV_PICTURE_TYPE_I)
         return 1;
 
-    skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
+    skip_amount = FFMAX(undamaged_count / 50, 1); // check only up to 50 MBs
     is_intra_likely=0;
 
     j=0;
@@ -1116,8 +1120,8 @@ void ff_er_frame_end(MpegEncContext *s){
             for(y=0; y<8; y++){
                 int x;
                 for(x=0; x<8; x++){
-                    dcu+=dest_cb[x + y*(s->uvlinesize)];
-                    dcv+=dest_cr[x + y*(s->uvlinesize)];
+                    dcu += dest_cb[x + y * s->uvlinesize];
+                    dcv += dest_cr[x + y * s->uvlinesize];
                 }
             }
             s->dc_val[1][mb_x + mb_y*s->mb_stride]= (dcu+4)>>3;