vulkan_ffv1: warn users on low number of slices

Files with a low amount of slices take a considerably longer amount
of time to decode. Experimentally, 16 seems to be a good safe minimum.
This commit is contained in:
Lynne
2026-03-07 02:11:24 +01:00
parent 8f2dea9ae8
commit 5a6eeed9f0

View File

@@ -750,6 +750,12 @@ static int vk_decode_ffv1_init(AVCodecContext *avctx)
(f->version == 4 && f->micro_version > 3))
return AVERROR(ENOTSUP);
/* Streams with a low amount of slices will usually be much slower
* to decode, so warn the user. */
if (f->slice_count < 16)
av_log(avctx, AV_LOG_WARNING, "Stream has a low number of slices (%i), "
"decoding may be very slow\n", f->slice_count);
err = ff_vk_decode_init(avctx);
if (err < 0)
return err;