[FFmpeg-soc] [soc]: r611 - rv40/rv40.c

kostya subversion at mplayerhq.hu
Mon Aug 6 11:41:51 CEST 2007


Author: kostya
Date: Mon Aug  6 11:41:50 2007
New Revision: 611

Log:
More soficticated detection if top right predictor is available
With the previous commit it fixes most of the chroma artifacts


Modified:
   rv40/rv40.c

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Mon Aug  6 11:41:50 2007
@@ -816,7 +816,7 @@ static void rv40_output_macroblock(RV40D
     DSPContext *dsp = &s->dsp;
     int i, j, x, y;
     uint8_t *Y, *YY, *U, *V;
-    int no_up, no_left, itype;
+    int no_up, no_left, no_topright, itype;
 
     no_up = s->first_slice_line;
     Y = s->dest[0];
@@ -839,7 +839,8 @@ static void rv40_output_macroblock(RV40D
         for(j = 0; j < 2; j++){
             no_left = !s->mb_x || (s->mb_x == s->resync_mb_x && s->first_slice_line);
             for(i = 0; i < 2; i++, cbp >>= 1, no_left = 0){
-                rv40_pred_4x4_block(r, U + i*4 + j*4*s->uvlinesize, s->uvlinesize, ittrans[intra_types[i*2+j*2*r->intra_types_stride]], no_up, no_left, i || j, i);
+                no_topright = no_up || (i && j) || (i && !j && (s->mb_x-1) == s->mb_width);
+                rv40_pred_4x4_block(r, U + i*4 + j*4*s->uvlinesize, s->uvlinesize, ittrans[intra_types[i*2+j*2*r->intra_types_stride]], no_up, no_left, i || j, no_topright);
                 if(!(cbp & 1)) continue;
                 rv40_add_4x4_block(U + i*4 + j*4*s->uvlinesize, s->uvlinesize, s->block[4], i*4+j*32);
             }
@@ -849,7 +850,8 @@ static void rv40_output_macroblock(RV40D
         for(j = 0; j < 2; j++){
             no_left = !s->mb_x || (s->mb_x == s->resync_mb_x && s->first_slice_line);
             for(i = 0; i < 2; i++, cbp >>= 1, no_left = 0){
-                rv40_pred_4x4_block(r, V + i*4 + j*4*s->uvlinesize, s->uvlinesize, ittrans[intra_types[i*2+j*2*r->intra_types_stride]], no_up, no_left, i || j, i);
+                no_topright = no_up || (i && j) || (i && !j && (s->mb_x-1) == s->mb_width);
+                rv40_pred_4x4_block(r, V + i*4 + j*4*s->uvlinesize, s->uvlinesize, ittrans[intra_types[i*2+j*2*r->intra_types_stride]], no_up, no_left, i || j, no_topright);
                 if(!(cbp & 1)) continue;
                 rv40_add_4x4_block(V + i*4 + j*4*s->uvlinesize, s->uvlinesize, s->block[5], i*4+j*32);
             }



More information about the FFmpeg-soc mailing list