aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2019-01-10 20:55:06 +1100
committerPeter Ross <pross@xvid.org>2019-01-26 23:48:59 +1100
commit10a57f55e60902ab91388b8a46b73f1f4532f737 (patch)
treebc3f38ff385804561712e1b0945d2876be6b7704 /libavcodec
parentf4756ee9f7cc41e03531b86fe9f4b5e7406065ba (diff)
downloadffmpeg-10a57f55e60902ab91388b8a46b73f1f4532f737.tar.gz
avcodec/vp6: use rounded shift for chroma motion vector calculation
Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross <pross@xvid.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp56.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index b69fe6c176..27b4b8b944 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -196,12 +196,8 @@ static void vp56_decode_4mv(VP56Context *s, int row, int col)
s->macroblocks[row * s->mb_width + col].mv = s->mv[3];
/* chroma vectors are average luma vectors */
- if (s->avctx->codec->id == AV_CODEC_ID_VP5) {
- s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
- s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
- } else {
- s->mv[4] = s->mv[5] = (VP56mv) {mv.x/4, mv.y/4};
- }
+ s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
+ s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
}
static VP56mb vp56_decode_mv(VP56Context *s, int row, int col)