Fix slice height for y position calculation for vp3_draw_horiz_band
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 6 Sep 2010 19:26:18 +0000 (19:26 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 6 Sep 2010 19:26:18 +0000 (19:26 +0000)
when the video uses 4:2:2 instead of 4:2:0 coding.

Originally committed as revision 25052 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/vp3.c

index c4baff6..74b7e1b 100644 (file)
@@ -1509,7 +1509,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
       *     dispatch (slice - 1);
       */
 
-    vp3_draw_horiz_band(s, FFMIN(64*slice + 64-16, s->height-16));
+    vp3_draw_horiz_band(s, FFMIN((32 << s->chroma_y_shift) * (slice + 1) -16, s->height-16));
 }
 
 /*