[FFmpeg-cvslog] vp9: Fix emu[] edge overflow conditions for >8bpp/non-420.

Ronald S. Bultje git at videolan.org
Sat Sep 12 13:02:23 CEST 2015


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Sep 11 13:59:17 2015 -0400| [a30a8beeb3dc44b666d0e1aefbd823752f321ac1] | committer: Ronald S. Bultje

vp9: Fix emu[] edge overflow conditions for >8bpp/non-420.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a30a8beeb3dc44b666d0e1aefbd823752f321ac1
---

 libavcodec/vp9.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index c605c08..a357a5f 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3301,9 +3301,9 @@ static void decode_b(AVCodecContext *ctx, int row, int col,
     // emulated overhangs if the stride of the target buffer can't hold. This
     // makes it possible to support emu-edge and so on even if we have large block
     // overhangs
-    emu[0] = (col + w4) * 8 > f->linesize[0] ||
+    emu[0] = (col + w4) * 8 * bytesperpixel > f->linesize[0] ||
              (row + h4) > s->rows;
-    emu[1] = (col + w4) * 4 > f->linesize[1] ||
+    emu[1] = ((col + w4) * 8 >> s->ss_h) * bytesperpixel > f->linesize[1] ||
              (row + h4) > s->rows;
     if (emu[0]) {
         s->dst[0] = s->tmp_y;



More information about the ffmpeg-cvslog mailing list