[FFmpeg-devel] [PATCH] lavc/qsvenc: disable h264 look_ahead by default
Mark Thompson
sw at jkqxz.net
Tue Mar 6 02:31:39 EET 2018
On 01/03/18 05:20, Zhong Li wrote:
> Look_ahead can provide quality improvements, but would better disable it by default due to some reasons:
> 1. It is only available for some codecs (e.g. HEVC is not supported) on Intel
> Haswell and plus platforms. Thus means it will be failed on some platforms.
> 2. It significantly increases encoding latency and memory consumption.
> 3. It may overwrite some other options such as CBR and CAVLC.
>
> Signed-off-by: Zhong Li <zhong.li at intel.com>
> ---
> libavcodec/qsvenc_h264.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
> index 09e4c0e..e01a2a3 100644
> --- a/libavcodec/qsvenc_h264.c
> +++ b/libavcodec/qsvenc_h264.c
> @@ -109,7 +109,7 @@ static const AVOption options[] = {
> { "max_dec_frame_buffering", "Maximum number of frames buffered in the DPB", OFFSET(qsv.max_dec_frame_buffering), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE },
>
> #if QSV_HAVE_LA
> - { "look_ahead", "Use VBR algorithm with look ahead", OFFSET(qsv.look_ahead), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
> + { "look_ahead", "Use VBR algorithm with look ahead", OFFSET(qsv.look_ahead), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> { "look_ahead_depth", "Depth of look ahead in number frames", OFFSET(qsv.look_ahead_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, VE },
> #endif
> #if QSV_HAVE_LA_DS
>
I agree with everything you've said, so applied.
(I held off from making essentially this change in previous merges for compatibility with existing command-lines, but I think given that the next release will be a new major version that shouldn't block it now.)
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list