aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMashiat Sarker Shakkhar <mashiat.sarker@gmail.com>2012-08-03 20:53:36 +0600
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-08-03 17:21:54 +0200
commit9cc74c9f6e8b645e67d45b2070db004caca09af7 (patch)
tree785c2bc5a568be203f49d9d1d8e7d3af24890d1f
parent8379ea5e9f6bf3d50663ffb655ba5dd6a11652b4 (diff)
downloadffmpeg-9cc74c9f6e8b645e67d45b2070db004caca09af7.tar.gz
vc1dec: Remove separate scaling function for interlaced field MVs
The scaling process for obtaining direct MVs from co-located field MVs is the same for interlaced field and progressive pictures. Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
-rw-r--r--libavcodec/vc1dec.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fcb25db0bf..cb15dee982 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1977,20 +1977,6 @@ static av_always_inline int scale_mv(int value, int bfrac, int inv, int qs)
#endif
}
-static av_always_inline int scale_mv_intfi(int value, int bfrac, int inv,
- int qs, int qs_last)
-{
- int n = bfrac;
-
- if (inv)
- n -= 256;
- n <<= !qs_last;
- if (!qs)
- return (value * n + 255) >> 9;
- else
- return (value * n + 128) >> 8;
-}
-
/** Reconstruct motion vector for B-frame and do motion compensation
*/
static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2],
@@ -2244,14 +2230,14 @@ static inline void vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dm
if (v->bmvtype == BMV_TYPE_DIRECT) {
int total_opp, k, f;
if (s->next_picture.f.mb_type[mb_pos + v->mb_off] != MB_TYPE_INTRA) {
- s->mv[0][0][0] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0],
- v->bfraction, 0, s->quarter_sample, v->qs_last);
- s->mv[0][0][1] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1],
- v->bfraction, 0, s->quarter_sample, v->qs_last);
- s->mv[1][0][0] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0],
- v->bfraction, 1, s->quarter_sample, v->qs_last);
- s->mv[1][0][1] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1],
- v->bfraction, 1, s->quarter_sample, v->qs_last);
+ s->mv[0][0][0] = scale_mv(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0],
+ v->bfraction, 0, s->quarter_sample);
+ s->mv[0][0][1] = scale_mv(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1],
+ v->bfraction, 0, s->quarter_sample);
+ s->mv[1][0][0] = scale_mv(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0],
+ v->bfraction, 1, s->quarter_sample);
+ s->mv[1][0][1] = scale_mv(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1],
+ v->bfraction, 1, s->quarter_sample);
total_opp = v->mv_f_next[0][s->block_index[0] + v->blocks_off]
+ v->mv_f_next[0][s->block_index[1] + v->blocks_off]