MediaCodecInfo: add FEATURE_HdrEditing

FEATURE_HdrEditing signals that a video encoder can generate HDR
metadata if it is missing from the YUV or RGB input.

Bug: 197651595
Test: build
Change-Id: If3a9648e204fe3efbd565521227b5c01d3ef7d5a
This commit is contained in:
Lajos Molnar
2022-01-06 12:42:17 -08:00
parent 08afe71cd7
commit bca10c51ae
2 changed files with 20 additions and 0 deletions

View File

@@ -22549,6 +22549,7 @@ package android.media {
field public static final String FEATURE_DynamicTimestamp = "dynamic-timestamp";
field public static final String FEATURE_EncodingStatistics = "encoding-statistics";
field public static final String FEATURE_FrameParsing = "frame-parsing";
field public static final String FEATURE_HdrEditing = "hdr-editing";
field public static final String FEATURE_IntraRefresh = "intra-refresh";
field public static final String FEATURE_LowLatency = "low-latency";
field public static final String FEATURE_MultipleFrames = "multiple-frames";

View File

@@ -614,6 +614,24 @@ public final class MediaCodecInfo {
@SuppressLint("AllUpper") // for consistency with other FEATURE_* constants
public static final String FEATURE_EncodingStatistics = "encoding-statistics";
/**
* <b>video encoder only</b>: codec supports HDR editing.
* <p>
* HDR editing support means that the codec accepts 10-bit HDR
* input surface, and it is capable of generating any HDR
* metadata required from both YUV and RGB input when the
* metadata is not present. This feature is only meaningful when
* using an HDR capable profile (and 10-bit HDR input).
* <p>
* This feature implies that the codec is capable of encoding at
* least one HDR format, and that it supports RGBA_1010102 as
* well as P010, and optionally RGBA_FP16 input formats, and
* that the encoder can generate HDR metadata for all supported
* HDR input formats.
*/
@SuppressLint("AllUpper")
public static final String FEATURE_HdrEditing = "hdr-editing";
/**
* Query codec feature capabilities.
* <p>
@@ -654,6 +672,7 @@ public final class MediaCodecInfo {
new Feature(FEATURE_DynamicTimestamp, (1 << 2), false),
new Feature(FEATURE_QpBounds, (1 << 3), false),
new Feature(FEATURE_EncodingStatistics, (1 << 4), false),
new Feature(FEATURE_HdrEditing, (1 << 5), false),
// feature to exclude codec from REGULAR codec list
new Feature(FEATURE_SpecialCodec, (1 << 30), false, true),
};