aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinath K R <skr@nvidia.com>2017-06-01 13:28:07 +0530
committerTimo Rothenpieler <timo@rothenpieler.org>2017-06-01 11:28:30 +0200
commitd8da329cc364b36dabbb3162f788f958d8b6ea46 (patch)
tree4bfcd224b7f1042f9b806966740748b6d7a91097
parentbd1179e36badfed93b3d7427f5e1752e1249342c (diff)
downloadffmpeg-d8da329cc364b36dabbb3162f788f958d8b6ea46.tar.gz
avcodec/nvenc: Add default value for AVCodecContext::refs
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> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
-rw-r--r--libavcodec/nvenc_h264.c1
-rw-r--r--libavcodec/nvenc_hevc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index 20f47ec727..5fcbcb9f4f 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 66db1457a5..81da9d222d 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 },
};