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

Commit 315c3460 authored by Wonsik Kim's avatar Wonsik Kim Committed by Automerger Merge Worker
Browse files

Merge "CCodecConfig: Add mapper for aac-profile" am: d930ab64 am: b8ef07b4

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1663231

Change-Id: I53ae019cbe10dbc02eb92b6a1c10bfb2e3ae925a
parents 803eb0e5 b8ef07b4
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -733,6 +733,17 @@ void CCodecConfig::initializeStandardParams() {
            return C2Value();
        }));

    add(ConfigMapper(KEY_AAC_PROFILE, C2_PARAMKEY_PROFILE_LEVEL, "profile")
        .limitTo(D::AUDIO & D::ENCODER & (D::CONFIG | D::PARAM))
        .withMapper([mapper](C2Value v) -> C2Value {
            C2Config::profile_t c2 = PROFILE_UNUSED;
            int32_t sdk;
            if (mapper && v.get(&sdk) && mapper->mapProfile(sdk, &c2)) {
                return c2;
            }
            return PROFILE_UNUSED;
        }));

    // convert to dBFS and add default
    add(ConfigMapper(KEY_AAC_DRC_TARGET_REFERENCE_LEVEL, C2_PARAMKEY_DRC_TARGET_REFERENCE_LEVEL, "value")
        .limitTo(D::AUDIO & D::DECODER & (D::CONFIG | D::PARAM | D::READ))