[FFmpeg-devel] [PATCH 3/6] avcodec/vp6: use rounded shift for chroma motion vector calculation
Peter Ross
pross at xvid.org
Sun Jan 13 22:02:14 EET 2019
---
libavcodec/vp56.c | 8 ++------
1 file 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)
--
2.17.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190114/d7bc5249/attachment.sig>
More information about the ffmpeg-devel
mailing list