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

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

Issue 2333663003: Add color metadata info to VideoDecoderConfig. (Closed)
Patch Set: Use static_asserts for keeping enums in sync 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.
danakj 2016/09/22 20:03:49 Doesn't seem to be true. 0 is chrome-specific too.
servolk 2016/09/22 20:07:56 I'd say UNSPECIFIED is a special case that is not
danakj 2016/09/22 20:30:03 Id suggest instaed to drop the first 2 sentences o
servolk 2016/09/22 20:59:47 If feel like the current comment is rightly there,
servolk 2016/09/22 21:09:56 Ok, I've tried to improve comments here in the lat
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 UNSPECIFIED = 0,
125 LIMITED = 1, 125 LIMITED = 1,
126 FULL = 2,
126 127
127 LAST = LIMITED 128 // Defined by TransferID/MatrixID
danakj 2016/09/22 20:30:03 please use punctuation for comments, they are sent
servolk 2016/09/22 20:59:47 Done.
129 DERIVED = 3,
130
131 LAST = DERIVED
128 }; 132 };
129 133
130 ColorSpace(); 134 ColorSpace();
131 ColorSpace(PrimaryID primaries, 135 ColorSpace(PrimaryID primaries,
132 TransferID transfer, 136 TransferID transfer,
133 MatrixID matrix, 137 MatrixID matrix,
134 RangeID full_range); 138 RangeID full_range);
135 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range); 139 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range);
136 140
137 static PrimaryID PrimaryIDFromInt(int primary_id); 141 static PrimaryID PrimaryIDFromInt(int primary_id);
(...skipping 30 matching lines...) Expand all
168 172
169 friend class ICCProfile; 173 friend class ICCProfile;
170 friend class ColorSpaceToColorSpaceTransform; 174 friend class ColorSpaceToColorSpaceTransform;
171 friend struct IPC::ParamTraits<gfx::ColorSpace>; 175 friend struct IPC::ParamTraits<gfx::ColorSpace>;
172 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 176 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
173 }; 177 };
174 178
175 } // namespace gfx 179 } // namespace gfx
176 180
177 #endif // UI_GFX_COLOR_SPACE_H_ 181 #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