1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/libsvtav1: make coded GOP type configurable

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang
2021-09-17 10:02:02 +08:00
parent 04b89e8ae3
commit 64e2fb3f9d

View File

@@ -210,7 +210,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
param->min_qp_allowed = avctx->qmin; 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) if (svt_enc->la_depth >= 0)
param->look_ahead_distance = svt_enc->la_depth; param->look_ahead_distance = svt_enc->la_depth;
@@ -545,6 +546,7 @@ static const AVClass class = {
static const AVCodecDefault eb_enc_defaults[] = { static const AVCodecDefault eb_enc_defaults[] = {
{ "b", "7M" }, { "b", "7M" },
{ "flags", "+cgop" },
{ "g", "-1" }, { "g", "-1" },
{ "qmin", "0" }, { "qmin", "0" },
{ "qmax", "63" }, { "qmax", "63" },