aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 14:36:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-11 14:36:36 +0200
commita75dd13b1bc2132f58bb438e6ca2935677191885 (patch)
tree9d6c93fc0ba73f8961357c200b749892b801784e
parentce27c9eb25986ffb79fa77ad978c7ed676f02aac (diff)
parenteb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf (diff)
downloadffmpeg-a75dd13b1bc2132f58bb438e6ca2935677191885.tar.gz
Merge commit 'eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf'
* commit 'eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf': vc1dec: Set opposite to the correct value for 1REF field pictures Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vc1dec.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 10a75e2cfd..c87bd51881 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1460,10 +1460,16 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
}
if (v->field_mode) {
- if (num_samefield <= num_oppfield)
- opposite = 1 - pred_flag;
- else
- opposite = pred_flag;
+ if (!v->numref)
+ // REFFIELD determines if the last field or the second-last field is
+ // to be used as reference
+ opposite = 1 - v->reffield;
+ else {
+ if (num_samefield <= num_oppfield)
+ opposite = 1 - pred_flag;
+ else
+ opposite = pred_flag;
+ }
} else
opposite = 0;
if (opposite) {