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

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

Issue 2747083006: Fix HDR LUTs (Closed)
Patch Set: Created 3 years, 9 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 | « ui/gfx/color_space.h ('k') | no next file » | 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 #include "ui/gfx/color_space.h" 5 #include "ui/gfx/color_space.h"
6 6
7 #include <map> 7 #include <map>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return true; 276 return true;
277 } 277 }
278 278
279 bool ColorSpace::IsHDR() const { 279 bool ColorSpace::IsHDR() const {
280 return transfer_ == TransferID::SMPTEST2084 || 280 return transfer_ == TransferID::SMPTEST2084 ||
281 transfer_ == TransferID::ARIB_STD_B67 || 281 transfer_ == TransferID::ARIB_STD_B67 ||
282 transfer_ == TransferID::LINEAR_HDR || 282 transfer_ == TransferID::LINEAR_HDR ||
283 transfer_ == TransferID::IEC61966_2_1_HDR; 283 transfer_ == TransferID::IEC61966_2_1_HDR;
284 } 284 }
285 285
286 bool ColorSpace::FullRangeEncodedValues() const {
287 return transfer_ == TransferID::LINEAR_HDR ||
288 transfer_ == TransferID::IEC61966_2_1_HDR ||
289 transfer_ == TransferID::BT1361_ECG ||
290 transfer_ == TransferID::IEC61966_2_4;
291 }
292
286 bool ColorSpace::operator!=(const ColorSpace& other) const { 293 bool ColorSpace::operator!=(const ColorSpace& other) const {
287 return !(*this == other); 294 return !(*this == other);
288 } 295 }
289 296
290 bool ColorSpace::operator<(const ColorSpace& other) const { 297 bool ColorSpace::operator<(const ColorSpace& other) const {
291 if (primaries_ < other.primaries_) 298 if (primaries_ < other.primaries_)
292 return true; 299 return true;
293 if (primaries_ > other.primaries_) 300 if (primaries_ > other.primaries_)
294 return false; 301 return false;
295 if (transfer_ < other.transfer_) 302 if (transfer_ < other.transfer_)
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 matrix->postTranslate(-16.0f/219.0f, -15.5f/224.0f, -15.5f/224.0f); 837 matrix->postTranslate(-16.0f/219.0f, -15.5f/224.0f, -15.5f/224.0f);
831 break; 838 break;
832 } 839 }
833 } 840 }
834 841
835 std::ostream& operator<<(std::ostream& out, const ColorSpace& color_space) { 842 std::ostream& operator<<(std::ostream& out, const ColorSpace& color_space) {
836 return out << color_space.ToString(); 843 return out << color_space.ToString();
837 } 844 }
838 845
839 } // namespace gfx 846 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/color_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698