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

Commit 88c4c7ab authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Signal minimum quality needs to underlying codec" into sc-dev am: 2ffec4c9 am: 226edc80

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

Change-Id: I22e85b895927669e04296ae38abdec587abc6387
parents 1d9c6790 226edc80
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -2392,22 +2392,24 @@ typedef C2StreamParam<C2Info, C2EasyBoolValue, kParamIndexTunnelStartRender>
        C2StreamTunnelStartRender;
constexpr char C2_PARAMKEY_TUNNEL_START_RENDER[] = "output.tunnel-start-render";

C2ENUM(C2PlatformConfig::encoding_quality_level_t, uint32_t,
    NONE,
    S_HANDHELD,
    S_HANDHELD_PC
);

namespace android {

/**
 * Encoding quality level signaling.
 *
 * Signal the 'minimum encoding quality' introduced in Android 12/S. It indicates
 * whether the underlying codec is expected to take extra steps to ensure quality meets the
 * appropriate minimum. A value of NONE indicates that the codec is not to apply
 * any minimum quality bar requirements. Other values indicate that the codec is to apply
 * a minimum quality bar, with the exact quality bar being decided by the parameter value.
 */
typedef C2GlobalParam<C2Setting,
        C2SimpleValueStruct<C2EasyEnum<C2PlatformConfig::encoding_quality_level_t>>,
        kParamIndexEncodingQualityLevel> C2EncodingQualityLevel;
constexpr char C2_PARAMKEY_ENCODING_QUALITY_LEVEL[] = "algo.encoding-quality-level";

}
C2ENUM(C2PlatformConfig::encoding_quality_level_t, uint32_t,
    NONE = 0,
    S_HANDHELD = 1              // corresponds to VMAF=70
);

/// @}

+2 −0
Original line number Diff line number Diff line
@@ -909,6 +909,8 @@ void CCodecConfig::initializeStandardParams() {
            }
        }));

    add(ConfigMapper("android._encoding-quality-level", C2_PARAMKEY_ENCODING_QUALITY_LEVEL, "value")
        .limitTo(D::ENCODER & (D::CONFIG | D::PARAM)));
    add(ConfigMapper(KEY_QUALITY, C2_PARAMKEY_QUALITY, "value")
        .limitTo(D::ENCODER & (D::CONFIG | D::PARAM)));
    add(ConfigMapper(KEY_FLAC_COMPRESSION_LEVEL, C2_PARAMKEY_COMPLEXITY, "value")