diff mbox series

[FFmpeg-devel,2/4] avcodec/cfhdenc: add padding to each decomposition

Message ID 20210218230258.1263-2-onemda@gmail.com
State Accepted
Commit fbfa78508bec11e231b3e276dcc716fe654baca3
Headers show
Series [FFmpeg-devel,1/4] avcodec/cfhdenc: refactor DSP code for CFHD encoder
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Paul B Mahol Feb. 18, 2021, 11:02 p.m. UTC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/cfhdenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 1e89ffc41c..9c8ba3700c 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;