mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user