[FFmpeg-devel] [PATCH] avfilter: add libvmaf_cuda
Timo Rothenpieler
timo at rothenpieler.org
Thu Sep 14 22:10:20 EEST 2023
On 14.09.2023 20:59, Kyle Swanson wrote:
> Problem was slightly different, there is no `libvmaf_cuda`, just
> `libvmaf` built with the cuda apis optionally enabled. `./configure`
> is fixed now and I've tested all the possible combinations, updated
> patch attached.
This looks more complicated than necessary to me.
My idea would have been to change, in the previous original patch,
> libvmaf_cuda_filter_deps="libvmaf ffnvcodec"
to
> libvmaf_cuda_filter_deps="libvmaf libvmaf_cuda ffnvcodec"
And the pkg_config check would then enable/disable libvmaf_cuda:
> enabled libvmaf_cuda && require_pkg_config libvmaf_cuda "libvmaf >= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init
One unrelated thing I just thought of:
The macro you'll want to check in the filter itself isn't
CONFIG_LIBVMAF_CUDA, but CONFIG_LIBVMAF_CUDA_FILTER.
Since it's in theory possible for someone to do the slightly silly thing
of doing --enable-vmaf-cuda but then manually disabling the filter.
Likewise it's possible for someone to ONLY build the libvmaf_cuda
filter, and disable the non-cuda variant.
So its "const AVFilter ..." part, and everything only used by it, should
be wrapped in #if CONFIG_LIBVMAF_FILTER
More information about the ffmpeg-devel
mailing list