On 6/8/17 11:13 AM, Srinath K R wrote:
> 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 <[email protected]>
> ---
>  libavcodec/nvenc_h264.c | 1 +
>  libavcodec/nvenc_hevc.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
> index 1419c86..f7e5cd0 100644
> --- a/libavcodec/nvenc_h264.c
> +++ b/libavcodec/nvenc_h264.c
> @@ -109,6 +109,7 @@ static const AVCodecDefault defaults[] = {
>      { "qdiff", "-1" },
>      { "qblur", "-1" },
>      { "qcomp", "-1" },
> +    { "refs", "0" },
>      { NULL },
>  };
>  
> diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
> index 62f9698..9102d8a 100644
> --- a/libavcodec/nvenc_hevc.c
> +++ b/libavcodec/nvenc_hevc.c
> @@ -107,6 +107,7 @@ static const AVCodecDefault defaults[] = {
>      { "qdiff", "-1" },
>      { "qblur", "-1" },
>      { "qcomp", "-1" },
> +    { "refs", "0" },
>      { NULL },
>  };
>  
> 

Looks fine.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to