1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavc/cfhd: fix distortion of lowest 8 lines when height is not multiple of 16

Also update fate reference. Fixes ticket #6675.
This commit is contained in:
Gagandeep Singh 2018-03-27 12:53:45 +05:30 committed by Paul B Mahol
parent d6fc031caf
commit 673604e0e3
2 changed files with 13 additions and 12 deletions

View File

@ -213,13 +213,14 @@ static int alloc_buffers(AVCodecContext *avctx)
int width = i ? avctx->width >> chroma_x_shift : avctx->width;
int height = i ? avctx->height >> chroma_y_shift : avctx->height;
ptrdiff_t stride = FFALIGN(width / 8, 8) * 8;
if (chroma_y_shift)
height = FFALIGN(height / 8, 2) * 8;
s->plane[i].width = width;
s->plane[i].height = height;
s->plane[i].stride = stride;
w8 = FFALIGN(s->plane[i].width / 8, 8);
h8 = FFALIGN(s->plane[i].height / 8, 2);
h8 = height / 8;
w4 = w8 * 2;
h4 = h8 * 2;
w2 = w4 * 2;

View File

@ -3,13 +3,13 @@
#codec_id 0: rawvideo
#dimensions 0: 496x241
#sar 0: 0/1
0, 0, 0, 1, 478144, 0x6ed01dcd
0, 1, 1, 1, 478144, 0x6ed01dcd
0, 2, 2, 1, 478144, 0x6ed01dcd
0, 3, 3, 1, 478144, 0xb1b4a74b
0, 4, 4, 1, 478144, 0x94c345c3
0, 5, 5, 1, 478144, 0x05e0388d
0, 6, 6, 1, 478144, 0xe747476a
0, 7, 7, 1, 478144, 0x8c1561f1
0, 8, 8, 1, 478144, 0x8c1561f1
0, 9, 9, 1, 478144, 0x8c1561f1
0, 0, 0, 1, 478144, 0x48a01dbb
0, 1, 1, 1, 478144, 0x48a01dbb
0, 2, 2, 1, 478144, 0x48a01dbb
0, 3, 3, 1, 478144, 0xb978a72f
0, 4, 4, 1, 478144, 0x7bbb4679
0, 5, 5, 1, 478144, 0xc3fd3f59
0, 6, 6, 1, 478144, 0xfd2a4816
0, 7, 7, 1, 478144, 0x207f65d3
0, 8, 8, 1, 478144, 0x207f65d3
0, 9, 9, 1, 478144, 0x207f65d3