| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 MEDIA_BASE_VIDEO_COLOR_SPACE_H_ | 5 #ifndef MEDIA_BASE_VIDEO_COLOR_SPACE_H_ |
| 6 #define MEDIA_BASE_VIDEO_COLOR_SPACE_H_ | 6 #define MEDIA_BASE_VIDEO_COLOR_SPACE_H_ |
| 7 | 7 |
| 8 #include "media/base/media_export.h" | 8 #include "media/base/media_export.h" |
| 9 #include "ui/gfx/color_space.h" | 9 #include "ui/gfx/color_space.h" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 VideoColorSpace(); | 73 VideoColorSpace(); |
| 74 VideoColorSpace(int primaries, | 74 VideoColorSpace(int primaries, |
| 75 int transfer, | 75 int transfer, |
| 76 int matrix, | 76 int matrix, |
| 77 gfx::ColorSpace::RangeID range); | 77 gfx::ColorSpace::RangeID range); |
| 78 VideoColorSpace(PrimaryID primaries, | 78 VideoColorSpace(PrimaryID primaries, |
| 79 TransferID transfer, | 79 TransferID transfer, |
| 80 MatrixID matrix, | 80 MatrixID matrix, |
| 81 gfx::ColorSpace::RangeID range); | 81 gfx::ColorSpace::RangeID range); |
| 82 | 82 |
| 83 bool operator==(const VideoColorSpace& other) const; |
| 84 bool operator!=(const VideoColorSpace& other) const; |
| 85 |
| 83 // These will return INVALID if the number you give it | 86 // These will return INVALID if the number you give it |
| 84 // is not a valid enum value. | 87 // is not a valid enum value. |
| 85 static PrimaryID GetPrimaryID(int primary); | 88 static PrimaryID GetPrimaryID(int primary); |
| 86 static TransferID GetTransferID(int transfer); | 89 static TransferID GetTransferID(int transfer); |
| 87 static MatrixID GetMatrixID(int matrix); | 90 static MatrixID GetMatrixID(int matrix); |
| 88 | 91 |
| 89 static VideoColorSpace BT709(); | 92 static VideoColorSpace REC709(); |
| 93 static VideoColorSpace REC601(); |
| 94 static VideoColorSpace JPEG(); |
| 90 | 95 |
| 91 gfx::ColorSpace ToGfxColorSpace() const; | 96 gfx::ColorSpace ToGfxColorSpace() const; |
| 92 | 97 |
| 93 // Note, these are public variables. | 98 // Note, these are public variables. |
| 94 PrimaryID primaries = PrimaryID::INVALID; | 99 PrimaryID primaries = PrimaryID::INVALID; |
| 95 TransferID transfer = TransferID::INVALID; | 100 TransferID transfer = TransferID::INVALID; |
| 96 MatrixID matrix = MatrixID::INVALID; | 101 MatrixID matrix = MatrixID::INVALID; |
| 97 gfx::ColorSpace::RangeID range = gfx::ColorSpace::RangeID::INVALID; | 102 gfx::ColorSpace::RangeID range = gfx::ColorSpace::RangeID::INVALID; |
| 98 }; | 103 }; |
| 99 | 104 |
| 100 } // namespace media | 105 } // namespace media |
| 101 | 106 |
| 102 #endif | 107 #endif |
| OLD | NEW |