[FFmpeg-devel] [PATCH] avcodec/nvenc: Reconfigure resolution on-the-fly

Oliver Collyer ovcollyer at mac.com
Thu Mar 7 22:32:50 EET 2019


> 
>>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>>> index 0ce22ec4fa..7087f82ce1 100644
>>> --- a/libavcodec/avcodec.h
>>> +++ b/libavcodec/avcodec.h
>>> @@ -3357,6 +3357,12 @@ typedef struct AVCodecContext {
>>>     * - encoding: unused
>>>     */
>>>    int discard_damaged_percentage;
>>> +
>>> +    /*
>>> +     * Video encoding only. Sets the maximum picture size for encoders that
>>> +     * support adjusting the picture size dynamically during encoding.
>>> +     */
>>> +     int max_width, max_height;
>>> } AVCodecContext;
>>> 
>> 
>> I really don't like introducing public API fields for this. Maybe a
>> private nvenc option would be better at this point.
>> 
> 
> So would this be suitable?
> 
> The only thing was that I wasn't sure about exposing these options to ffmpeg though, as they're useless to ffmpeg unless ffmpeg were to add features for dynamically changing the encoded resolution....I just couldn't figure out how you can add a private option that isn't exposed in this way though.
> 

So in the absence of any further feedback I've created a patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-nvenc-added-support-for-dynamic-resolution-encoding.patch
Type: application/octet-stream
Size: 6148 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190307/79c4360d/attachment.obj>
-------------- next part --------------



More information about the ffmpeg-devel mailing list