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

Timo Rothenpieler timo at rothenpieler.org
Thu Sep 21 01:54:48 EEST 2023


On 20.09.2023 22:06, Kyle Swanson wrote:
> Hi,
> 
> On Mon, Sep 18, 2023 at 2:39 PM Kyle Swanson <k at ylo.ph> wrote:
>>
>> Hi,
>>
>> On Mon, Sep 18, 2023 at 12:41 PM Timo Rothenpieler
>> <timo at rothenpieler.org> wrote:
>>> On 18.09.2023 21:21, Marvin Scholz wrote:
>>>> I am far from an expert with the configure script but won't that cause --enable-libvmaf to fail when
>>>> libvmaf is built without cuda support? Which seems undesirable to me…
>>>
>>> Yeah, hence my suggested change of
>>>
>>>> enabled libvmaf_cuda      && require_pkg_config libvmaf_cuda "libvmaf >= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init
>>
>> This only works if I add `libvmaf_cuda` to EXTERNAL_LIBRARY_LIST,
>> otherwise running `./configure --enable-libvmaf-cuda` will fail with
>> `Unknown option "--enable-libvmaf-cuda".` I'm not sure that's the
>> right thing to do given there is no such thing as `libvmaf_cuda`. If
>> you are aware of a different way of handling this, let me know. Most
>> of the other libraries we link with optional configurations (see
>> libopus, libvpx, ...) seem to have the pattern I used in this previous
>> patch [0], which does avoid the problem pointed out by Marvin.
>>
>> Thanks,
>> Kyle
>>
>> [0] http://ffmpeg.org/pipermail/ffmpeg-devel/2023-September/314409.html
> 
> Timo, any NAKs regarding this earlier patch? If you're at VDD this
> week, maybe we can chat about it if you'd like.

The only remaining issue is the configure situation really.
No other obvious issues from my side.

It definitely needs to be sorted out properly.
Either configure needs to treat libvmaf_cuda like it is an entirely 
independent library (it's being added to --help output after all, which 
indicates to me that this is the intended approach).

Or it needs to be a sub-feature of libvmaf, where if libvmaf is enabled, 
support for CUDA is checked for, and then the vmaf_cuda filter needs to 
depend on that check.

All current patches had some kind of mix between the two.


More information about the ffmpeg-devel mailing list