diff options
author | Jerome Borsboom <jerome.borsboom@carpalis.nl> | 2018-05-18 18:06:23 +0300 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-05-29 00:38:49 +0300 |
commit | c0402e1e30c2318359af1bce1d652f4616b21566 (patch) | |
tree | e77399487cf3e3fda259f024191b4656582f93d8 /libavcodec/vc1_block.c | |
parent | 42f40d36b74e51a7f66a3a391924f01f3da5bea1 (diff) |
avcodec/vc1: fix mquant calculation for interlace field pictures
For interlace field pictures s->mb_height indicates the height of the full
picture in MBs, i.e. the two fields combined. A single field is half this
size. When calculating mquant for interlace field pictures, the bottom edge
is the last MB row of the field.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Diffstat (limited to 'libavcodec/vc1_block.c')
-rw-r--r-- | libavcodec/vc1_block.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 2d76da293b..21ab108169 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -181,7 +181,8 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v) mquant = -v->altpq; \ if ((edges&4) && s->mb_x == (s->mb_width - 1)) \ mquant = -v->altpq; \ - if ((edges&8) && s->mb_y == (s->mb_height - 1)) \ + if ((edges&8) && \ + s->mb_y == ((s->mb_height >> v->field_mode) - 1)) \ mquant = -v->altpq; \ if (!mquant || mquant > 31) { \ av_log(v->s.avctx, AV_LOG_ERROR, \ |