Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: chromecast/public/media/decoder_config.h

Issue 2798023006: [Chromecast] Use VideoColorSpace in Chromecast video config (Closed)
Patch Set: buildfix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/media/cma/base/decoder_config_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/public/media/decoder_config.h
diff --git a/chromecast/public/media/decoder_config.h b/chromecast/public/media/decoder_config.h
index c9a9a0ce7b93c1bdcba64cbf3334be768122a5d3..5b3b9dbfe9c7ec7ac952606535193d29d05a6163 100644
--- a/chromecast/public/media/decoder_config.h
+++ b/chromecast/public/media/decoder_config.h
@@ -167,13 +167,14 @@ inline EncryptionScheme AesCtrEncryptionScheme() {
EncryptionScheme::Pattern());
}
-// ---- Begin copy/paste from ui/gfx/color_space.h ----
-enum class PrimaryID : uint16_t {
- // The first 0-255 values should match the H264 specification.
- RESERVED0 = 0,
+// ---- Begin copy/paste from //media/base/video_color_space.h ----
+// Described in ISO 23001-8:2016
+
+// Table 2
+enum class PrimaryID : uint8_t {
+ INVALID = 0,
BT709 = 1,
UNSPECIFIED = 2,
- RESERVED = 3,
BT470M = 4,
BT470BG = 5,
SMPTE170M = 6,
@@ -183,20 +184,14 @@ enum class PrimaryID : uint16_t {
SMPTEST428_1 = 10,
SMPTEST431_2 = 11,
SMPTEST432_1 = 12,
-
- // Chrome-specific values start at 1000.
- XYZ_D50 = 1000,
- // TODO(hubbe): We need to store the primaries.
- CUSTOM = 1001,
- LAST = CUSTOM
+ EBU_3213_E = 22
};
-enum class TransferID : uint16_t {
- // The first 0-255 values should match the H264 specification.
- RESERVED0 = 0,
+// Table 3
+enum class TransferID : uint8_t {
+ INVALID = 0,
BT709 = 1,
UNSPECIFIED = 2,
- RESERVED = 3,
GAMMA22 = 4,
GAMMA28 = 5,
SMPTE170M = 6,
@@ -211,27 +206,16 @@ enum class TransferID : uint16_t {
BT2020_12 = 15,
SMPTEST2084 = 16,
SMPTEST428_1 = 17,
- ARIB_STD_B67 = 18, // AKA hybrid-log gamma, HLG
-
- // Chrome-specific values start at 1000.
- GAMMA24 = 1000,
- // This is an ad-hoc transfer function that decodes SMPTE 2084 content
- // into a 0-1 range more or less suitable for viewing on a non-hdr
- // display.
- SMPTEST2084_NON_HDR,
-
- // TODO(hubbe): Need to store an approximation of the gamma function(s).
- CUSTOM,
- LAST = CUSTOM,
+ // Not yet standardized
+ ARIB_STD_B67 = 18, // AKA hybrid-log gamma, HLG.
};
-enum class MatrixID : int16_t {
- // The first 0-255 values should match the H264 specification.
+// Table 4
+enum class MatrixID : int8_t {
RGB = 0,
BT709 = 1,
UNSPECIFIED = 2,
- RESERVED = 3,
FCC = 4,
BT470BG = 5,
SMPTE170M = 6,
@@ -240,31 +224,25 @@ enum class MatrixID : int16_t {
BT2020_NCL = 9,
BT2020_CL = 10,
YDZDX = 11,
-
- // Chrome-specific values start at 1000
- LAST = YDZDX,
+ INVALID = 255,
};
+// ---- End copy/pasted from media/base/video_color_space.h ----
// This corresponds to the WebM Range enum which is part of WebM color data
// (see http://www.webmproject.org/docs/container/#Range).
// H.264 only uses a bool, which corresponds to the LIMITED/FULL values.
-// Chrome-specific values start at 1000.
+// ---- Begin copy/paste from //ui/gfx/color_space.h ----
enum class RangeID : int8_t {
- // Range is not explicitly specified / unknown.
- UNSPECIFIED = 0,
-
+ INVALID = 0,
// Limited Rec. 709 color range with RGB values ranging from 16 to 235.
LIMITED = 1,
-
// Full RGB color range with RGB valees from 0 to 255.
FULL = 2,
-
// Range is defined by TransferID/MatrixID.
DERIVED = 3,
-
LAST = DERIVED
};
-// ---- End copy/pasted from ui/gfx/color_space.h ----
+// ---- Begin copy/paste from //ui/gfx/color_space.h ----
// ---- Begin copy/paste from media/base/hdr_metadata.h ----
// SMPTE ST 2086 mastering metadata.
@@ -371,7 +349,7 @@ struct VideoConfig {
PrimaryID primaries = PrimaryID::UNSPECIFIED;
TransferID transfer = TransferID::UNSPECIFIED;
MatrixID matrix = MatrixID::UNSPECIFIED;
- RangeID range = RangeID::UNSPECIFIED;
+ RangeID range = RangeID::INVALID;
bool have_hdr_metadata = false;
HDRMetadata hdr_metadata;
« no previous file with comments | « chromecast/media/cma/base/decoder_config_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698