[FFmpeg-cvslog] vc1dec: Remove separate scaling function for interlaced field MVs
Mashiat Sarker Shakkhar
git at videolan.org
Fri Aug 3 23:30:32 CEST 2012
ffmpeg | branch: master | Mashiat Sarker Shakkhar <mashiat.sarker at gmail.com> | Fri Aug 3 20:53:36 2012 +0600| [9cc74c9f6e8b645e67d45b2070db004caca09af7] | committer: Kostya Shishkov
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 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cc74c9f6e8b645e67d45b2070db004caca09af7
---
libavcodec/vc1dec.c | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fcb25db..cb15dee 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]
More information about the ffmpeg-cvslog
mailing list