diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-12 04:35:11 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-12 04:35:11 +0000 |
commit | e179fbc85037e49d91cb184810bd22078567fdce (patch) | |
tree | f2855f8192335b6179ee0bfc7c19cf98459a31bc | |
parent | 1884a48beeae6607f5abf8b6823d3467c81528b6 (diff) | |
download | ffmpeg-e179fbc85037e49d91cb184810bd22078567fdce.tar.gz |
Swap back and forward motion vectors to achieve correct picture
Originally committed as revision 6237 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vc1.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 8ce58afee7..c9c07cfcf1 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -2104,6 +2104,16 @@ static always_inline int scale_mv(int value, int bfrac, int inv, int qs) */ static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mode) { + int t; + + //XXX: more elegant solution is possible + t = v->s.mv[0][0][0]; + v->s.mv[0][0][0] = v->s.mv[1][0][0]; + v->s.mv[1][0][0] = t; + t = v->s.mv[0][0][1]; + v->s.mv[0][0][1] = v->s.mv[1][0][1]; + v->s.mv[1][0][1] = t; + if(direct) { vc1_mc_1mv(v, 0); vc1_interp_mc(v); @@ -2115,7 +2125,7 @@ static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2], int direc return; } - vc1_mc_1mv(v, (mode == BMV_TYPE_FORWARD)); + vc1_mc_1mv(v, (mode == BMV_TYPE_BACKWARD)); } static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mvtype) |