Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e58ae291 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "C2SoftAomEnc: set AOME_SET_MAX_INTRA_BITRATE_PCT" into main

parents 31782d7c b6bad9b2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -466,6 +466,7 @@ static int MapC2ComplexityToAOMSpeed (int c2Complexity) {

aom_codec_err_t C2SoftAomEnc::setupCodecParameters() {
    aom_codec_err_t codec_return = AOM_CODEC_OK;
    const int maxIntraBitratePct = mBitrateControlMode == AOM_CBR ? 300 : 450;

    codec_return = aom_codec_control(mCodecContext, AV1E_SET_TARGET_SEQ_LEVEL_IDX, mAV1EncLevel);
    if (codec_return != AOM_CODEC_OK) goto BailOut;
@@ -492,6 +493,10 @@ aom_codec_err_t C2SoftAomEnc::setupCodecParameters() {
    codec_return = aom_codec_control(mCodecContext, AV1E_SET_AQ_MODE, 3);
    if (codec_return != AOM_CODEC_OK) goto BailOut;

    codec_return = aom_codec_control(mCodecContext, AOME_SET_MAX_INTRA_BITRATE_PCT,
                                     maxIntraBitratePct);
    if (codec_return != AOM_CODEC_OK) goto BailOut;

    codec_return = aom_codec_control(mCodecContext, AV1E_SET_COEFF_COST_UPD_FREQ, 3);
    if (codec_return != AOM_CODEC_OK) goto BailOut;