summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorGagandeep Singh <deepgagan231197@gmail.com>2018-03-27 12:53:45 +0530
committerPaul B Mahol <onemda@gmail.com>2018-04-03 18:20:30 +0200
commit673604e0e3b7c7d6a077f61dee322d534ff6eae5 (patch)
treefbd499ae7d9b3e02478eafe9bb4484ab46705b5c /libavcodec
parentd6fc031caf64eed921bbdef86d79d56bfc2633b0 (diff)
downloadffmpeg-streaming-673604e0e3b7c7d6a077f61dee322d534ff6eae5.zip
ffmpeg-streaming-673604e0e3b7c7d6a077f61dee322d534ff6eae5.tar.gz
lavc/cfhd: fix distortion of lowest 8 lines when height is not multiple of 16
Also update fate reference. Fixes ticket #6675.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cfhd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index e35732d..f10742f 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -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;
OpenPOWER on IntegriCloud