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

Commit bca10c51 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

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
parent 08afe71c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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";
+19 −0
Original line number Diff line number Diff line
@@ -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),
        };