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

Commit 58423362 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "MediaFormat: keys for AAC DRC album mode & output loudness"

parents dac3d675 531731c7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -25779,10 +25779,12 @@ package android.media {
    field public static final int COLOR_TRANSFER_LINEAR = 1; // 0x1
    field public static final int COLOR_TRANSFER_SDR_VIDEO = 3; // 0x3
    field public static final int COLOR_TRANSFER_ST2084 = 6; // 0x6
    field public static final String KEY_AAC_DRC_ALBUM_MODE = "aac-drc-album-mode";
    field public static final String KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
    field public static final String KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
    field public static final String KEY_AAC_DRC_EFFECT_TYPE = "aac-drc-effect-type";
    field public static final String KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";
    field public static final String KEY_AAC_DRC_OUTPUT_LOUDNESS = "aac-drc-output-loudness";
    field public static final String KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
    field public static final String KEY_AAC_ENCODED_TARGET_LEVEL = "aac-encoded-target-level";
    field public static final String KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT = "aac-max-output-channel_count";
+33 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@ import java.util.stream.Collectors;
 * <tr><td>{@link #KEY_AAC_DRC_HEAVY_COMPRESSION}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, specifies whether to use heavy compression.</td></tr>
 * <tr><td>{@link #KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, specifies the maximum number of channels the decoder outputs.</td></tr>
 * <tr><td>{@link #KEY_AAC_DRC_EFFECT_TYPE}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, specifies the MPEG-D DRC effect type to use.</td></tr>
 * <tr><td>{@link #KEY_AAC_DRC_OUTPUT_LOUDNESS}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, returns the DRC output loudness.</td></tr>
 * <tr><td>{@link #KEY_AAC_DRC_ALBUM_MODE}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, specifies the whether MPEG-D DRC Album Mode is active or not.</td></tr>
 * <tr><td>{@link #KEY_CHANNEL_MASK}</td><td>Integer</td><td>optional, a mask of audio channel assignments</td></tr>
 * <tr><td>{@link #KEY_ENCODER_DELAY}</td><td>Integer</td><td>optional, the number of frames to trim from the start of the decoded audio stream.</td></tr>
 * <tr><td>{@link #KEY_ENCODER_PADDING}</td><td>Integer</td><td>optional, the number of frames to trim from the end of the decoded audio stream.</td></tr>
@@ -735,6 +737,37 @@ public final class MediaFormat {
     */
    public static final String KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";

    /**
     * A key to retrieve the output loudness of a decoded bitstream.
     * <p>If loudness normalization is active, the value corresponds to the Target Reference Level
     * (see {@link #KEY_AAC_DRC_TARGET_REFERENCE_LEVEL}).<br>
     * If loudness normalization is not active, the value corresponds to the loudness metadata
     * given in the bitstream.
     * <p>The value is retrieved with getInteger() and is given as an integer value between 0 and
     * 231. It is calculated as -4 * Output Loudness in LKFS. Therefore, it represents the range of
     * 0 to -57.75 LKFS.
     * <p>A value of -1 indicates that no loudness metadata is present in the bitstream.
     * <p>Loudness metadata can originate from MPEG-4 DRC or MPEG-D DRC.
     * <p>This key is only used during decoding.
     */
    public static final String KEY_AAC_DRC_OUTPUT_LOUDNESS = "aac-drc-output-loudness";

    /**
     * A key describing the album mode for MPEG-D DRC as defined in ISO/IEC 23003-4.
     * <p>The associated value is an integer and can be set to following values:
     * <table>
     * <tr><th>Value</th><th>Album Mode</th></tr>
     * <tr><th>0</th><th>disabled</th></tr>
     * <tr><th>1</th><th>enabled</th></tr>
     * </table>
     * <p>Disabled album mode leads to application of gain sequences for fading in and out, if
     * provided in the bitstream. Enabled album mode makes use of dedicated album loudness
     * information, if provided in the bitstream.
     * <p>The default value is 0 (album mode disabled).
     * <p>This key is only used during decoding.
     */
    public static final String KEY_AAC_DRC_ALBUM_MODE = "aac-drc-album-mode";

    /**
     * A key describing the FLAC compression level to be used (FLAC audio format only).
     * The associated value is an integer ranging from 0 (fastest, least compression)