[FFmpeg-cvslog] vc1dec: Set opposite to the correct value for 1REF field pictures
Mashiat Sarker Shakkhar
git at videolan.org
Thu Oct 11 14:39:45 CEST 2012
ffmpeg | branch: master | Mashiat Sarker Shakkhar <mashiat.sarker at gmail.com> | Tue Oct 9 19:38:18 2012 +0000| [eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf] | committer: Derek Buitenhuis
vc1dec: Set opposite to the correct value for 1REF field pictures
Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf
---
libavcodec/vc1dec.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 491e200..40164cc 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1458,10 +1458,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) {
More information about the ffmpeg-cvslog
mailing list