[FFmpeg-devel] [PATCH] avfilter: add libvmaf_cuda

Kyle Swanson k at ylo.ph
Fri Sep 15 23:31:11 EEST 2023


Hi,

On Thu, Sep 14, 2023 at 12:10 PM Timo Rothenpieler
<timo at rothenpieler.org> wrote:
> 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
>

I'm not sure this works since `libvmaf_cuda` is not a separate
library. `libvmaf_cuda` is the name of the avfilter, which requires a
`libvmaf` configured/built with cuda support.

>
> 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

Yes, I made this macro change in the most recent patch.

Thanks,
Kyle


More information about the ffmpeg-devel mailing list