forked from jengelh/ffmpeg-4
24 lines
994 B
Diff
24 lines
994 B
Diff
commit 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1
|
|
Author: Michael Niedermayer <michael@niedermayer.cc>
|
|
Date: Mon Apr 8 18:38:42 2024 +0200
|
|
|
|
avcodec/mpegvideo_enc: Fix 1 line and one column images
|
|
|
|
Fixes: Ticket10952
|
|
Fixes: poc21ffmpeg
|
|
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
|
|
--- ffmpeg-4.4.4/libavcodec/mpegvideo_enc.c
|
|
+++ ffmpeg-4.4.4_new/libavcodec/mpegvideo_enc.c
|
|
@@ -1263,8 +1263,8 @@
|
|
int dst_stride = i ? s->uvlinesize : s->linesize;
|
|
int h_shift = i ? h_chroma_shift : 0;
|
|
int v_shift = i ? v_chroma_shift : 0;
|
|
- int w = s->width >> h_shift;
|
|
- int h = s->height >> v_shift;
|
|
+ int w = AV_CEIL_RSHIFT(s->width , h_shift);
|
|
+ int h = AV_CEIL_RSHIFT(s->height, v_shift);
|
|
uint8_t *src = pic_arg->data[i];
|
|
uint8_t *dst = pic->f->data[i];
|
|
int vpad = 16;
|