[FFmpeg-devel] [PATCH] avcodec/nvenc: Video Codec SDK 10 features support

Timo Rothenpieler timo at rothenpieler.org
Thu Jul 2 19:03:14 EEST 2020


On 02.07.2020 17:42, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
>> Timo Rothenpieler
>> Sent: Thursday, July 2, 2020 3:51 PM
>> To: ffmpeg-devel at ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Video Codec SDK 10
>> features support
>>
>> On 01.07.2020 06:03, Soft Works wrote:
>>>> From: Roman Arzumanyan <rarzumanyan at nvidia.com>
>>>> Sent: Tuesday, June 30, 2020 10:23 PM
>>>> To: Soft Works <softworkz at hotmail.com>; FFmpeg development
>>>> discussions and patches <ffmpeg-devel at ffmpeg.org>
>>>> Cc: Yogender Gupta <ygupta at nvidia.com>
>>>> Subject: RE: [FFmpeg-devel] [PATCH] avcodec/nvenc: Video Codec SDK 10
>>>> features support
>>>>
>>>> Hello, nice to meet you.
>>>>
>>>>> Wouldn't it make sense to transition from compile time version checks to
>> runtime checking?
>>>>
>>>> Video Codec SDK headers are not included into ffmpeg 'as is' but using the
>> nvcodec-headers project instead.
>>
>> I have looked into full runtime loading before, but given that every single
>> struct carries a version info, that will make older drivers refuse it, it's very
>> much not straight forward to do, and would require major changes in both
>> the nvEncodeApi.h header and ffmpeg nvenc implementation.
> 
> It's been a while that I've worked with their API, so please bear with me
> when this question doesn't make sense:
> 
> Could this perhaps be addressed by partitioning into just two cases?
> 
> I mean something like:
> - Compatible
> - Latest
> 
> This is essentially what I would have to do soon when there's no better
> solution available: Create two different ffmpeg versions.
> 
> I would create only two versions - not one per each Nvidia SDK version.
> 
> Wouldn't it be possible to do this in a similar way at runtime?
> Having to dynamically choose between two implementations only
> might be a lot easier than trying to handle all possible versions.
> 
> What do you think?

It would still inevitably result in duplicating the entire nvenc 
encoder, since no two structs can be re-used.


More information about the ffmpeg-devel mailing list