aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2025-04-03 11:50:17 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2025-04-04 20:30:42 +0200
commit37a319fb95bc558c9ed882a8577cab1ed5cc1fd8 (patch)
treeb892459701867ff82e8772a90832393107067f1a
parent2d9c9dae1488c2a1e6ff8a254214d5b3afd3b08c (diff)
downloadffmpeg-37a319fb95bc558c9ed882a8577cab1ed5cc1fd8.tar.gz
avcodec/ffv1enc: Consider 2s x s slice configurations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ffv1enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index b704cec9f3..18a6516c32 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)