diff mbox

[FFmpeg-devel,3/6] avcodec/vp6: use rounded shift for chroma motion vector calculation

Message ID 7a44d12d9262c5f769b0e33d5421efbed7a9feb2.1547408762.git.pross@xvid.org
State Accepted
Headers show

Commit Message

Peter Ross Jan. 13, 2019, 8:02 p.m. UTC
---
 libavcodec/vp56.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox

Patch

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)