]> git.sesse.net Git - ffmpeg/commit
lavfi/vulkan: use av_get_random_seed instead of rand
authorLynne <dev@lynne.ee>
Fri, 29 May 2020 12:10:58 +0000 (13:10 +0100)
committerLynne <dev@lynne.ee>
Fri, 29 May 2020 12:10:58 +0000 (13:10 +0100)
commit83fa39eb06d0d720422e8a5408d15ba472a82ea6
tree7157799bf454bbd7d163b19cfce51f6859d1f5ae
parentc0f01eaf12479b5d0160e1a8d10a73744fac5ab2
lavfi/vulkan: use av_get_random_seed instead of rand

We need at least a few bits of entropy to determine the start index of each
queue, in order to let filters run in parallel as much as possible, and
rand() is not thread safe and disrupts any external API's usage of rand,
so instead replace it with av_get_random_seed.
While it has more overhead than rand, we only run it once per filter upon init.
libavfilter/vf_avgblur_vulkan.c
libavfilter/vf_chromaber_vulkan.c
libavfilter/vf_overlay_vulkan.c
libavfilter/vf_scale_vulkan.c