summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jean-Michel Trivi <jmtrivi@google.com> 2018-02-16 21:04:48 -0800
committer Jean-Michel Trivi <jmtrivi@google.com> 2018-02-16 21:04:48 -0800
commitbba1e9f24db90c77fa3426638cd6103430b3f41d (patch)
tree982009e3562d605d0996a96cfad8c2fb5c9fdea6
parent377e6be425d314e0831ea63e8c480d9cdc1c8c61 (diff)
MediaFormat: declare key for AAC decoder DRC effect type
Bug: 71430241 Test: CTS AAC decoder test Change-Id: I077bdccf2b3ce935feaa6f14c75640d2f20affb7
-rw-r--r--api/current.txt1
-rw-r--r--media/java/android/media/MediaFormat.java26
2 files changed, 27 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index 63bc2ecaca13..66a1af1a6443 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -23615,6 +23615,7 @@ package android.media {
field public static final int COLOR_TRANSFER_ST2084 = 6; // 0x6
field public static final java.lang.String KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
field public static final java.lang.String KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
+ field public static final java.lang.String KEY_AAC_DRC_EFFECT_TYPE = "aac-drc-effect-type";
field public static final java.lang.String KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";
field public static final java.lang.String KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
field public static final java.lang.String KEY_AAC_ENCODED_TARGET_LEVEL = "aac-encoded-target-level";
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index e9128e4c827d..b50aa477d511 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -87,6 +87,7 @@ import java.util.Map;
* <tr><td>{@link #KEY_AAC_DRC_ATTENUATION_FACTOR}</td><td>Integer</td><td><b>decoder-only</b>, optional, if content is AAC audio, specifies the DRC attenuation factor.</td></tr>
* <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 DRC effect type to use.</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_FLAC_COMPRESSION_LEVEL}</td><td>Integer</td><td><b>encoder-only</b>, optional, if content is FLAC audio, specifies the desired compression level.</td></tr>
* </table>
@@ -512,6 +513,31 @@ public final class MediaFormat {
public static final String KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
/**
+ * A key describing for selecting the DRC effect type for MPEG-D DRC.
+ * The supported values are defined in ISO/IEC 23003-4:2015 and are described as follows:
+ * <table>
+ * <tr><th>Value</th><th>Effect</th></tr>
+ * <tr><th>-1</th><th>Off</th></tr>
+ * <tr><th>0</th><th>None</th></tr>
+ * <tr><th>1</th><th>Late night</th></tr>
+ * <tr><th>2</th><th>Noisy environment</th></tr>
+ * <tr><th>3</th><th>Limited playback range</th></tr>
+ * <tr><th>4</th><th>Low playback level</th></tr>
+ * <tr><th>5</th><th>Dialog enhancement</th></tr>
+ * <tr><th>6</th><th>General compression</th></tr>
+ * </table>
+ * <p>The value -1 (Off) disables DRC processing, while loudness normalization may still be
+ * active and dependent on KEY_AAC_DRC_TARGET_REFERENCE_LEVEL.<br>
+ * The value 0 (None) automatically enables DRC processing if necessary to prevent signal
+ * clipping<br>
+ * The value 6 (General compression) can be used for enabling MPEG-D DRC without particular
+ * DRC effect type request.<br>
+ * The default is DRC effect type "None".
+ * <p>This key is only used during decoding.
+ */
+ public static final String KEY_AAC_DRC_EFFECT_TYPE = "aac-drc-effect-type";
+
+ /**
* A key describing the target reference level that was assumed at the encoder for
* calculation of attenuation gains for clipping prevention. This information can be provided
* if it is known, otherwise a worst-case assumption is used.