aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1_pred.c
diff options
context:
space:
mode:
authorJerome Borsboom <jerome.borsboom@carpalis.nl>2019-01-12 16:14:00 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-01-12 16:40:07 +0100
commitb6402278322d1f64810cac4bea26d34d7b9a2e6a (patch)
tree1e72687c6e649c2d1ba4caa986cb3fbc16f2471d /libavcodec/vc1_pred.c
parent96740ec69f272ad2364175656590a908b9e98a6c (diff)
downloadffmpeg-b6402278322d1f64810cac4bea26d34d7b9a2e6a.tar.gz
avcodec/vc1: fix decoding of old WMV3 format
The position of the second MV predicitor candidate is slightly different for the old WMV3 format indicated by RES_RTM_FLAG. This patch fixes decoding of niceday.wmv on the samples server. Fixes: #6641 Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Diffstat (limited to 'libavcodec/vc1_pred.c')
-rw-r--r--libavcodec/vc1_pred.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vc1_pred.c b/libavcodec/vc1_pred.c
index 75225d2023..8b5a9ead0b 100644
--- a/libavcodec/vc1_pred.c
+++ b/libavcodec/vc1_pred.c
@@ -275,7 +275,10 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
//in 4-MV mode different blocks have different B predictor position
switch (n) {
case 0:
- off = (s->mb_x > 0) ? -1 : 1;
+ if (v->res_rtm_flag)
+ off = s->mb_x ? -1 : 1;
+ else
+ off = s->mb_x ? -1 : 2 * s->mb_width - wrap - 1;
break;
case 1:
off = (s->mb_x == (s->mb_width - 1)) ? -1 : 1;