diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2022-03-23 13:38:12 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2022-08-23 12:42:19 +0800 |
commit | 1adfd28f9e0e4cca8aa01edfd9bf653b98bf4d3b (patch) | |
tree | d93271fa098146b8a7765c2613c7cc2bfcb1972c /libavcodec/qsvenc.c | |
parent | ae7d19680b7e7a401773c619e7c36f3faaf94d0d (diff) | |
download | ffmpeg-1adfd28f9e0e4cca8aa01edfd9bf653b98bf4d3b.tar.gz |
qsvenc_{hevc,h264}: add scenario option
User may get better experience after providing corresponding senario hint
to encoder for the encoding session. See [1] for scenario support in the
SDK
[1]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#scenarioinfo
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r-- | libavcodec/qsvenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index ca5e6f0b6e..202a645ea2 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -337,6 +337,7 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, av_log(avctx, AV_LOG_VERBOSE, "LowDelayBRC: %s\n", print_threestate(co3->LowDelayBRC)); av_log(avctx, AV_LOG_VERBOSE, "MaxFrameSizeI: %d; ", co3->MaxFrameSizeI); av_log(avctx, AV_LOG_VERBOSE, "MaxFrameSizeP: %d\n", co3->MaxFrameSizeP); + av_log(avctx, AV_LOG_VERBOSE, "ScenarioInfo: %"PRId16"\n", co3->ScenarioInfo); } if (exthevctiles) { @@ -923,6 +924,8 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) q->extco3.MaxFrameSizeI = q->max_frame_size_i; if (q->max_frame_size_p >= 0) q->extco3.MaxFrameSizeP = q->max_frame_size_p; + + q->extco3.ScenarioInfo = q->scenario; } if (avctx->codec_id == AV_CODEC_ID_HEVC) { |