[FFmpeg-cvslog] avcodec/ffv1enc: permit 1024 slices
Jerome Martinez
git at videolan.org
Thu Apr 10 04:13:08 EEST 2025
ffmpeg | branch: master | Jerome Martinez <jerome at mediaarea.net> | Tue Apr 8 22:07:47 2025 +0200| [3aec1f87c93a7601931503499f22c403c25269e6] | committer: Michael Niedermayer
avcodec/ffv1enc: permit 1024 slices
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3aec1f87c93a7601931503499f22c403c25269e6
---
libavcodec/ffv1enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 35a1ae16d4..807850a432 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -569,7 +569,7 @@ int ff_ffv1_encode_determine_slices(AVCodecContext *avctx)
int max_v_slices = AV_CEIL_RSHIFT(avctx->height, s->chroma_v_shift);
s->num_v_slices = (avctx->width > 352 || avctx->height > 288 || !avctx->slices) ? 2 : 1;
s->num_v_slices = FFMIN(s->num_v_slices, max_v_slices);
- for (; s->num_v_slices < 32; s->num_v_slices++) {
+ for (; s->num_v_slices <= 32; s->num_v_slices++) {
for (s->num_h_slices = s->num_v_slices; s->num_h_slices <= 2*s->num_v_slices; s->num_h_slices++) {
int maxw = (avctx->width + s->num_h_slices - 1) / s->num_h_slices;
int maxh = (avctx->height + s->num_v_slices - 1) / s->num_v_slices;
More information about the ffmpeg-cvslog
mailing list