[FFmpeg-devel] [PATCH] vp3: fix draw_horiz_band chroma for 422 and 444

Reimar Döffinger Reimar.Doeffinger
Sun Jun 6 14:05:07 CEST 2010


On Sun, Jun 06, 2010 at 01:45:38PM +0200, Michael Niedermayer wrote:
> On Sun, Jun 06, 2010 at 01:27:44PM +0200, Reimar D?ffinger wrote:
> > Hello,
> > obviously this chroma-calculation was missed when adding 422 and 444
> > support.
> 
> avcodec_get_chroma_sub_sample() is even more correct

Thanks, that allowed me to find the right variable.
Now trivial patch:
Index: libavcodec/vp3.c
===================================================================
--- libavcodec/vp3.c    (revision 23501)
+++ libavcodec/vp3.c    (working copy)
@@ -1329,7 +1329,7 @@
         y = s->height - y - h;
     }
 
-    cy = y >> 1;
+    cy = y >> s->chroma_y_shift;
     offset[0] = s->current_frame.linesize[0]*y;
     offset[1] = s->current_frame.linesize[1]*cy;
     offset[2] = s->current_frame.linesize[2]*cy;



More information about the ffmpeg-devel mailing list