Commit 10a57f55 authored by Peter Ross's avatar Peter Ross

avcodec/vp6: use rounded shift for chroma motion vector calculation

Partially fixes: https://trac.ffmpeg.org/ticket/1282Signed-off-by: 's avatarPeter Ross <pross@xvid.org>
parent f4756ee9
......@@ -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)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment