Browse Source

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>
tags/n4.1
Jerome Borsboom Carl Eugen Hoyos 7 years ago
parent
commit
c0402e1e30
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/vc1_block.c

+ 2
- 1
libavcodec/vc1_block.c View File

@@ -181,7 +181,8 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
mquant = -v->altpq; \ mquant = -v->altpq; \
if ((edges&4) && s->mb_x == (s->mb_width - 1)) \ if ((edges&4) && s->mb_x == (s->mb_width - 1)) \
mquant = -v->altpq; \ 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; \ mquant = -v->altpq; \
if (!mquant || mquant > 31) { \ if (!mquant || mquant > 31) { \
av_log(v->s.avctx, AV_LOG_ERROR, \ av_log(v->s.avctx, AV_LOG_ERROR, \


Loading…
Cancel
Save