1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/ffv1enc: permit 1024 slices

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Jerome Martinez
2025-04-08 22:07:47 +02:00
committed by Michael Niedermayer
parent 00c50a29ab
commit 3aec1f87c9

View File

@ -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;