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

Side by Side Diff: ui/gfx/color_space.h

Issue 2333663003: Add color metadata info to VideoDecoderConfig. (Closed)
Patch Set: Fixed typo (RBG -> RGB) Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « media/test/data/colour.webm ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COLOR_SPACE_H_ 5 #ifndef UI_GFX_COLOR_SPACE_H_
6 #define UI_GFX_COLOR_SPACE_H_ 6 #define UI_GFX_COLOR_SPACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 BT2020_CL = 10, 109 BT2020_CL = 10,
110 YDZDX = 11, 110 YDZDX = 11,
111 111
112 LAST_STANDARD_VALUE = YDZDX, 112 LAST_STANDARD_VALUE = YDZDX,
113 113
114 // Chrome-specific values start at 1000 114 // Chrome-specific values start at 1000
115 UNKNOWN = 1000, 115 UNKNOWN = 1000,
116 LAST = UNKNOWN, 116 LAST = UNKNOWN,
117 }; 117 };
118 118
119 // The h264 spec declares this as bool, so only the the first two values 119 // The h264 spec declares this as bool, so only the the LIMITED/FULL values
120 // correspond to the h264 spec. Chrome-specific values can start at 2. 120 // correspond to the h264 spec. Chrome-specific values can start at 3.
hubbe 2016/09/22 22:14:17 I think this should read something like: This cor
servolk 2016/09/22 22:34:39 Done.
121 // We use an enum instead of a bool becuase different bit depths may have 121 // We use an enum instead of a bool becuase different bit depths may have
122 // different definitions of what "limited" means. 122 // different definitions of what "limited" means.
123 enum class RangeID : int8_t { 123 enum class RangeID : int8_t {
124 FULL = 0, 124 // Range is not explicitly specified / unknown.
125 UNSPECIFIED = 0,
126
127 // Limited Rec. 709 color range with RGB values ranging from 16 to 235.
125 LIMITED = 1, 128 LIMITED = 1,
126 129
127 LAST = LIMITED 130 // Full RGB color range with RGB valees from 0 to 255.
131 FULL = 2,
132
133 // Range is defined by TransferID/MatrixID.
134 DERIVED = 3,
135
136 LAST = DERIVED
128 }; 137 };
129 138
130 ColorSpace(); 139 ColorSpace();
131 ColorSpace(PrimaryID primaries, 140 ColorSpace(PrimaryID primaries,
132 TransferID transfer, 141 TransferID transfer,
133 MatrixID matrix, 142 MatrixID matrix,
134 RangeID full_range); 143 RangeID full_range);
135 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range); 144 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range);
136 145
137 static PrimaryID PrimaryIDFromInt(int primary_id); 146 static PrimaryID PrimaryIDFromInt(int primary_id);
(...skipping 30 matching lines...) Expand all
168 177
169 friend class ICCProfile; 178 friend class ICCProfile;
170 friend class ColorSpaceToColorSpaceTransform; 179 friend class ColorSpaceToColorSpaceTransform;
171 friend struct IPC::ParamTraits<gfx::ColorSpace>; 180 friend struct IPC::ParamTraits<gfx::ColorSpace>;
172 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 181 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
173 }; 182 };
174 183
175 } // namespace gfx 184 } // namespace gfx
176 185
177 #endif // UI_GFX_COLOR_SPACE_H_ 186 #endif // UI_GFX_COLOR_SPACE_H_
OLDNEW
« no previous file with comments | « media/test/data/colour.webm ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698