mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avcodec/ffv1enc: avoid slices larger than 360x288 if no value is specified
This improves speed by providing more independent things for more CPUs Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -581,7 +581,11 @@ int ff_ffv1_encode_determine_slices(AVCodecContext *avctx)
|
||||
if ( ff_need_new_slices(avctx->width , s->num_h_slices, s->chroma_h_shift)
|
||||
||ff_need_new_slices(avctx->height, s->num_v_slices, s->chroma_v_shift))
|
||||
continue;
|
||||
if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES || !avctx->slices)
|
||||
if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES)
|
||||
return 0;
|
||||
if (maxw*maxh > 360*288)
|
||||
continue;
|
||||
if (!avctx->slices)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user