]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/cfhdenc: add padding to each decomposition
authorPaul B Mahol <onemda@gmail.com>
Sat, 13 Feb 2021 20:49:14 +0000 (21:49 +0100)
committerPaul B Mahol <onemda@gmail.com>
Wed, 24 Feb 2021 16:14:03 +0000 (17:14 +0100)
libavcodec/cfhdenc.c

index 370b1e5063cf9c3048d890ac890b2123aeb32856..371f551294df46213bf0e973b5127a91905a4c77 100644 (file)
@@ -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;