1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/tests/ref/fate/mpeg2-ticket6677
Nekopanda f4d5d7e8de avcodec/mpeg2dec: Fix motion vector rounding for chroma components
In 16x8 motion compensation, for lower 16x8 region, the input to mpeg_motion() for motion_y was "motion_y + 16", which causes wrong rounding. For 4:2:0, chroma scaling for y is dividing by two and rounding toward zero. When motion_y < 0 and motion_y + 16 > 0, the rounding direction of "motion_y" and "motion_y + 16" is different and rounding "motion_y + 16" would be incorrect.

We should input "motion_y" as is to round correctly. I add "is_16x8" flag to do that.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 12:04:47 +01:00

13 lines
496 B
Plaintext

#tb 0: 1/30
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 720x480
#sar 0: 8/9
0, 0, 0, 1, 518400, 0xc1866f5f
0, 1, 1, 1, 518400, 0x9ba32764
0, 2, 2, 1, 518400, 0xa9031bb8
0, 3, 3, 1, 518400, 0x5e2c3502
0, 4, 4, 1, 518400, 0xe860027a
0, 5, 5, 1, 518400, 0xa9152430
0, 6, 6, 1, 518400, 0xb98dd9f7