aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cfhdenc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-02-13 21:49:14 +0100
committerPaul B Mahol <onemda@gmail.com>2021-02-24 17:14:03 +0100
commitfbfa78508bec11e231b3e276dcc716fe654baca3 (patch)
tree4e4beea081f216dd04c600251d877d955522d133 /libavcodec/cfhdenc.c
parentd69f4be1c6c6e305b4f32235bcab35dcc8c9c98b (diff)
downloadffmpeg-fbfa78508bec11e231b3e276dcc716fe654baca3.tar.gz
avcodec/cfhdenc: add padding to each decomposition
Diffstat (limited to 'libavcodec/cfhdenc.c')
-rw-r--r--libavcodec/cfhdenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 370b1e5063..371f551294 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -270,10 +270,10 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
int width = i ? avctx->width >> s->chroma_h_shift : avctx->width;
int height = i ? FFALIGN(avctx->height >> s->chroma_v_shift, 8) :
FFALIGN(avctx->height >> s->chroma_v_shift, 8);
- ptrdiff_t stride = FFALIGN(width / 8, 8) * 8;
+ ptrdiff_t stride = (FFALIGN(width / 8, 8) + 64) * 8;
- w8 = FFALIGN(width / 8, 8);
- h8 = height / 8;
+ w8 = FFALIGN(width / 8, 8) + 64;
+ h8 = FFALIGN(height, 8) / 8;
w4 = w8 * 2;
h4 = h8 * 2;
w2 = w4 * 2;