[FFmpeg-cvslog] Double motion vector range for HPEL interlaced picture in proper place

Mashiat Sarker Shakkhar git at videolan.org
Thu Oct 11 15:50:55 CEST 2012


ffmpeg | branch: master | Mashiat Sarker Shakkhar <mashiat.sarker at gmail.com> | Tue Oct  9 19:38:19 2012 +0000| [35a35d49d23c2b799e771f8947c0bc6cc6a45fe8] | committer: Derek Buitenhuis

Double motion vector range for HPEL interlaced picture in proper place

The existing code is not in the right place and it should cover both
interlaced frame and field pictures.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35a35d49d23c2b799e771f8947c0bc6cc6a45fe8
---

 libavcodec/vc1.c    |    5 +++++
 libavcodec/vc1dec.c |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index b04d570..c7edc25 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1223,6 +1223,11 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
         break;
     }
 
+    if (v->fcm != PROGRESSIVE && !v->s.quarter_sample) {
+        v->range_x <<= 1;
+        v->range_y <<= 1;
+    }
+
     /* AC Syntax */
     v->c_ac_table_index = decode012(gb);
     if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) {
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 40164cc..6bfba68 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1573,10 +1573,6 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
         }
     }
 
-    if (v->field_mode && !s->quarter_sample) {
-        r_x <<= 1;
-        r_y <<= 1;
-    }
     if (v->field_mode && v->numref)
         r_y >>= 1;
     if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)



More information about the ffmpeg-cvslog mailing list