[FFmpeg-devel] [PATCH 3/4] avcodec/ffv1enc: Consider 2s x s slice configurations
Michael Niedermayer
michael at niedermayer.cc
Thu Apr 3 13:50:48 EEST 2025
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/ffv1enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 70821a10159..ce3f8e023e5 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -570,7 +570,7 @@ int ff_ffv1_encode_determine_slices(AVCodecContext *avctx)
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_h_slices = s->num_v_slices; s->num_h_slices < 2*s->num_v_slices; s->num_h_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;
if (s->num_h_slices > max_h_slices || s->num_v_slices > max_v_slices)
--
2.49.0
More information about the ffmpeg-devel
mailing list