Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGagandeep Singh <deepgagan231197@gmail.com>2018-03-27 10:23:45 +0300
committerPaul B Mahol <onemda@gmail.com>2018-04-03 19:20:30 +0300
commit673604e0e3b7c7d6a077f61dee322d534ff6eae5 (patch)
treefbd499ae7d9b3e02478eafe9bb4484ab46705b5c /libavcodec/cfhd.c
parentd6fc031caf64eed921bbdef86d79d56bfc2633b0 (diff)
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/cfhd.c')
-rw-r--r--libavcodec/cfhd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index e35732df45..f10742f4fa 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;