[FFmpeg-cvslog] avcodec/mss2: fix chroma dimensions

Michael Niedermayer git at videolan.org
Fri Jan 10 17:12:30 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 10 16:56:37 2014 +0100| [e1d8ef4c21f6f08ba6b7b07ba9f1856e871659f4] | committer: Michael Niedermayer

avcodec/mss2: fix chroma dimensions

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/mss2.c       |    4 ++--
 tests/ref/fate/mss2-wmv |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index 09b7abd..505c981 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -421,8 +421,8 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
 
     if (v->respic == 3) {
         ctx->dsp.upsample_plane(f->data[0], f->linesize[0], w,      h);
-        ctx->dsp.upsample_plane(f->data[1], f->linesize[1], w >> 1, h >> 1);
-        ctx->dsp.upsample_plane(f->data[2], f->linesize[2], w >> 1, h >> 1);
+        ctx->dsp.upsample_plane(f->data[1], f->linesize[1], w+1 >> 1, h+1 >> 1);
+        ctx->dsp.upsample_plane(f->data[2], f->linesize[2], w+1 >> 1, h+1 >> 1);
     } else if (v->respic)
         avpriv_request_sample(v->s.avctx,
                               "Asymmetric WMV9 rectangle subsampling");
diff --git a/tests/ref/fate/mss2-wmv b/tests/ref/fate/mss2-wmv
index 8ca5850..c54cff6 100644
--- a/tests/ref/fate/mss2-wmv
+++ b/tests/ref/fate/mss2-wmv
@@ -70,7 +70,7 @@
 0,         74,         74,        1,   230400, 0xfe47e3c4
 0,         75,         75,        1,   230400, 0xa2e0e721
 0,         76,         76,        1,   230400, 0xde974a42
-0,         77,         77,        1,   230400, 0xe86a376b
+0,         77,         77,        1,   230400, 0x87bf38ba
 0,         78,         78,        1,   230400, 0xd52318fd
 0,         79,         79,        1,   230400, 0x0bbb1526
 0,         80,         80,        1,   230400, 0xa22c5e5e



More information about the ffmpeg-cvslog mailing list