Commit 673604e0 authored by Gagandeep Singh's avatar Gagandeep Singh Committed by Paul B Mahol

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

Also update fate reference. Fixes ticket #6675.
parent d6fc031c
......@@ -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;
height = FFALIGN(height / 8, 2) * 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;
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment