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

Commit 81ef1c94 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I39f15cc4,I9639692c,I0a10bacc am: 39c92dd8 am: 591674d1

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d0280246e55d054012c2c4b41d07ebca1978613
parents 14a4c130 591674d1
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -877,10 +877,14 @@ void C2SoftAacDec::process(
            work->worklets.front()->output.configUpdate.push_back(
                    C2Param::Copy(currentBoostFactor));

            if (android_get_device_api_level() < __ANDROID_API_S__) {
                // We used to report DRC compression mode in the output format
                // in Q and R, but stopped doing that in S
                C2StreamDrcCompressionModeTuning::input currentCompressMode(0u,
                        (C2Config::drc_compression_mode_t) compressMode);
                work->worklets.front()->output.configUpdate.push_back(
                        C2Param::Copy(currentCompressMode));
            }

            C2StreamDrcEncodedTargetLevelTuning::input currentEncodedTargetLevel(0u,
                    (C2FloatValue) (encTargetLevel*-0.25));
+2 −10
Original line number Diff line number Diff line
@@ -765,21 +765,13 @@ void CCodecConfig::initializeStandardParams() {

    // convert to compression type and add default
    add(ConfigMapper(KEY_AAC_DRC_HEAVY_COMPRESSION, C2_PARAMKEY_DRC_COMPRESSION_MODE, "value")
        .limitTo(D::AUDIO & D::DECODER & (D::CONFIG | D::PARAM | D::READ))
        .withMappers([](C2Value v) -> C2Value {
        .limitTo(D::AUDIO & D::DECODER & (D::CONFIG | D::PARAM))
        .withMapper([](C2Value v) -> C2Value {
            int32_t value;
            if (!v.get(&value) || value < 0) {
                value = property_get_int32(PROP_DRC_OVERRIDE_HEAVY, DRC_DEFAULT_MOBILE_DRC_HEAVY);
            }
            return value == 1 ? C2Config::DRC_COMPRESSION_HEAVY : C2Config::DRC_COMPRESSION_LIGHT;
        },[](C2Value v) -> C2Value {
            int32_t value;
            if (v.get(&value)) {
              return value;
            }
            else {
              return C2Value();
            }
        }));

    // convert to dBFS and add default