[FFmpeg-devel] [PATCH v2 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

Xiang, Haihao haihao.xiang at intel.com
Wed Sep 28 04:47:30 EEST 2022


On Mon, 2022-09-26 at 17:36 +0800, Wenbin Chen wrote:
> Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide
> these parameters, so that it can choose the best parameter and ffmpeg-qsv
> can keep up with runtime's update.
> 
> Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
> ---
>  libavcodec/qsvenc_h264.c | 5 ++---
>  libavcodec/qsvenc_hevc.c | 3 +--
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
> index 85826ae4be..11aaabbd1b 100644
> --- a/libavcodec/qsvenc_h264.c
> +++ b/libavcodec/qsvenc_h264.c
> @@ -176,9 +176,8 @@ static const AVClass class = {
>  static const FFCodecDefault qsv_enc_defaults[] = {
>      { "b",         "1M"    },
>      { "refs",      "0"     },
> -    // same as the x264 default
> -    { "g",         "250"   },
> -    { "bf",        "3"     },
> +    { "g",         "-1"    },
> +    { "bf",        "-1"    },
>      { "qmin",      "-1"    },
>      { "qmax",      "-1"    },
>      { "trellis",   "-1"    },
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index 6ec6230999..a5bf915954 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -289,8 +289,7 @@ static const AVClass class = {
>  static const FFCodecDefault qsv_enc_defaults[] = {
>      { "b",         "1M"    },
>      { "refs",      "0"     },
> -    // same as the x264 default
> -    { "g",         "248"   },
> +    { "g",         "-1"    },
>      { "bf",        "-1"    },
>      { "qmin",      "-1"    },
>      { "qmax",      "-1"    },

Patchset LGTM, will apply.

-Haihao



More information about the ffmpeg-devel mailing list