summaryrefslogtreecommitdiff
path: root/libavcodec/libsvtav1.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-09-17 10:02:02 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-09-25 21:35:54 +0800
commit64e2fb3f9d89e5ad552f48e2d5beb9be7a91572a (patch)
tree832f79adf4ce8f6f636a173d63df31ca63c09c17 /libavcodec/libsvtav1.c
parent04b89e8ae33ba74e5cb5b3b770613fa599f9cb36 (diff)
downloadffmpeg-64e2fb3f9d89e5ad552f48e2d5beb9be7a91572a.tar.gz
avcodec/libsvtav1: make coded GOP type configurable
Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/libsvtav1.c')
-rw-r--r--libavcodec/libsvtav1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 82ae2b9dbe..0dc25ca95d 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -210,7 +210,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
param->min_qp_allowed = avctx->qmin;
}
- param->intra_refresh_type = 2; /* Real keyframes only */
+ /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
+ param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
if (svt_enc->la_depth >= 0)
param->look_ahead_distance = svt_enc->la_depth;
@@ -545,6 +546,7 @@ static const AVClass class = {
static const AVCodecDefault eb_enc_defaults[] = {
{ "b", "7M" },
+ { "flags", "+cgop" },
{ "g", "-1" },
{ "qmin", "0" },
{ "qmax", "63" },