aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorWenbin Chen <wenbin.chen@intel.com>2022-12-26 14:02:00 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-01-09 13:56:03 +0800
commitc8e73558fe0181a0b3e611f486bb8bc308af24b4 (patch)
treecbf7c7db19a288614187c35c677a6fe16f4e6b4c /libavcodec
parenta598be44dff810b41c07547cc897b60b8fed9f9e (diff)
downloadffmpeg-c8e73558fe0181a0b3e611f486bb8bc308af24b4.tar.gz
libavcodec/qsvenc_av1: Add low_delay_brc support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c4
-rw-r--r--libavcodec/qsvenc_av1.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 514a1e8148..f5c6a164bb 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -537,6 +537,7 @@ static void dump_video_av1_param(AVCodecContext *avctx, QSVEncContext *q,
av_log(avctx, AV_LOG_VERBOSE, "WriteIVFHeaders: %s \n",
print_threestate(av1_bs_param->WriteIVFHeaders));
+ av_log(avctx, AV_LOG_VERBOSE, "LowDelayBRC: %s\n", print_threestate(co3->LowDelayBRC));
}
#endif
@@ -1090,6 +1091,9 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->extco3.MaxFrameSizeP = q->max_frame_size_p;
q->extco3.ScenarioInfo = q->scenario;
+ } else if (avctx->codec_id == AV_CODEC_ID_AV1) {
+ if (q->low_delay_brc >= 0)
+ q->extco3.LowDelayBRC = q->low_delay_brc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
}
if (avctx->codec_id == AV_CODEC_ID_HEVC) {
diff --git a/libavcodec/qsvenc_av1.c b/libavcodec/qsvenc_av1.c
index bb9ad16927..1e7801fefe 100644
--- a/libavcodec/qsvenc_av1.c
+++ b/libavcodec/qsvenc_av1.c
@@ -110,6 +110,7 @@ static const AVOption options[] = {
QSV_OPTION_ADAPTIVE_I
QSV_OPTION_ADAPTIVE_B
QSV_OPTION_EXTBRC
+ QSV_OPTION_LOW_DELAY_BRC
{ "profile", NULL, OFFSET(qsv.profile), AV_OPT_TYPE_INT, { .i64 = MFX_PROFILE_UNKNOWN }, 0, INT_MAX, VE, "profile" },
{ "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, VE, "profile" },
{ "main" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_AV1_MAIN }, INT_MIN, INT_MAX, VE, "profile" },