On 27/09/2019 11:04, Roman Arzumanyan wrote:
Hello,

This patch adds multiple reference frames support (part of Video Codec SDK 9.1).
It adds "nb_ref_frames" CLI option to set number of reference frames. Possible 
values:

   *   auto - let encoder decide (default value).
   *   [0;7] - set value by hand. 0 is equal to auto.

Usage example:
ffmpeg -i big_buck_bunny_1080p_h264.mov -c:v hevc_nvenc -frames:v 128 
-nb_ref_frames auto -bf 2 -y big_buck_bunny_1080p_nb_auto.h265
ffmpeg -i big_buck_bunny_1080p_h264.mov -c:v h264_nvenc -frames:v 128 
-nb_ref_frames 1          -y big_buck_bunny_1080p_nb_1.h264

Actual number of reference frames will be determined by encoder, but it will not exceed 
value of "nb_ref_frames" option.

Thanks!

Two things:

First, this needs SDK Version Guards, since we want to keep supporting building against older SDKs and thus Driver-Versions. There are a few examples in nvenc.h already, like NVENC_HAVE_HEVC_BFRAME_REF_MODE.
It should be done in the same fashion for this feature.

Second, in what way is this different from the existing global option(avctx->refs), which nvenc.c already uses to set h264->maxNumRefFrames and hevc->maxNumRefFramesInDPB? The refs option is documented as "number of reference frames", which seems fitting for this. Can that option just be re-used to also set this new parameter, if it's available, or are they doing different things?

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to