Message ID | 1496303887-27675-1-git-send-email-skr@nvidia.com |
---|---|
State | Accepted |
Commit | d8da329cc364b36dabbb3162f788f958d8b6ea46 |
Headers | show |
Am 01.06.2017 um 09:58 schrieb Srinath K R:> AVCodecContext::refs is used to control the DPB size to be used by the > encoder. The default value for AVCodecContext::refs as set in > libavcodec/options_table.h is 1. > > This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in > order to let the driver take the decision of the correct DPB size to use in > all cases. > > Signed-off-by: Srinath K R <skr@nvidia.com> applied locally, will push with my next batch of patches. Is this supposed to fix the issue with -bf >0? For me, even with this applied, I still get the same old error: [h264_nvenc @ 0x257c400] EncodePicture failed!: no encode device (1) Using nvidia-drivers 381.22
Timo,
>> Is this supposed to fix the issue with -bf >0?
We are working on another patch which will fix hw accelerated transcode (with -hwaccel cuvid) for bf > 0 and will send out for review soon. Thanks
Ganapathy
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index 20f47ec..5fcbcb9 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -131,6 +131,7 @@ static const AVCodecDefault defaults[] = { { "qcomp", "-1" }, { "g", "250" }, { "bf", "0" }, + { "refs", "0" }, { NULL }, }; diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 66db145..81da9d2 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -128,6 +128,7 @@ static const AVCodecDefault defaults[] = { { "qcomp", "-1" }, { "g", "250" }, { "bf", "0" }, + { "refs", "0" }, { NULL }, };
AVCodecContext::refs is used to control the DPB size to be used by the encoder. The default value for AVCodecContext::refs as set in libavcodec/options_table.h is 1. This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in order to let the driver take the decision of the correct DPB size to use in all cases. Signed-off-by: Srinath K R <skr@nvidia.com> --- libavcodec/nvenc_h264.c | 1 + libavcodec/nvenc_hevc.c | 1 + 2 files changed, 2 insertions(+)