aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorWenbin Chen <wenbin.chen@intel.com>2023-03-02 10:33:36 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-03-17 14:13:37 +0800
commit55c8c9493f34e35066e23989991ccc604dbc6da7 (patch)
tree657088505e556d47bfe6f865d89e0c822c69919a /libavcodec
parent13deb775cfccb10bf03789ca9d05e2a3f6131126 (diff)
downloadffmpeg-55c8c9493f34e35066e23989991ccc604dbc6da7.tar.gz
libavcodec/qsvenc: Add dynamic setting support of low_delay_brc to av1_qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3607859cb8..c975302b4f 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1127,6 +1127,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
} 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;
+ q->old_low_delay_brc = q->low_delay_brc;
}
if (avctx->codec_id == AV_CODEC_ID_HEVC) {
@@ -2213,7 +2214,9 @@ static int update_low_delay_brc(AVCodecContext *avctx, QSVEncContext *q)
{
int updated = 0;
- if (avctx->codec_id != AV_CODEC_ID_H264 && avctx->codec_id != AV_CODEC_ID_HEVC)
+ if (avctx->codec_id != AV_CODEC_ID_H264 &&
+ avctx->codec_id != AV_CODEC_ID_HEVC &&
+ avctx->codec_id != AV_CODEC_ID_AV1)
return 0;
UPDATE_PARAM(q->old_low_delay_brc, q->low_delay_brc);