| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TYPES_H_ | 5 #ifndef MEDIA_BASE_VIDEO_TYPES_H_ |
| 6 #define MEDIA_BASE_VIDEO_TYPES_H_ | 6 #define MEDIA_BASE_VIDEO_TYPES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 PIXEL_FORMAT_NV12 = | 27 PIXEL_FORMAT_NV12 = |
| 28 6, // 12bpp with Y plane followed by a 2x2 interleaved UV plane. | 28 6, // 12bpp with Y plane followed by a 2x2 interleaved UV plane. |
| 29 #endif | 29 #endif |
| 30 PIXEL_FORMAT_ARGB = 7, // 32bpp ARGB, 1 plane. | 30 PIXEL_FORMAT_ARGB = 7, // 32bpp ARGB, 1 plane. |
| 31 PIXEL_FORMAT_XRGB = 8, // 24bpp XRGB, 1 plane. | 31 PIXEL_FORMAT_XRGB = 8, // 24bpp XRGB, 1 plane. |
| 32 // Please update UMA histogram enumeration when adding new formats here. | 32 // Please update UMA histogram enumeration when adding new formats here. |
| 33 PIXEL_FORMAT_MAX = | 33 PIXEL_FORMAT_MAX = |
| 34 PIXEL_FORMAT_XRGB, // Must always be equal to largest entry logged. | 34 PIXEL_FORMAT_XRGB, // Must always be equal to largest entry logged. |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // Color space or color range used for the pixels, in general this is left | 37 // Color space or color range used for the pixels. |
| 38 // unspecified, meaning Rec601 (SD) is assumed. | |
| 39 // Logged to UMA, so never reuse values. Leave gaps if necessary. | 38 // Logged to UMA, so never reuse values. Leave gaps if necessary. |
| 40 enum ColorSpace { | 39 enum ColorSpace { |
| 41 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. | 40 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. |
| 42 COLOR_SPACE_JPEG = 1, // JPEG color range. | 41 COLOR_SPACE_JPEG = 1, // JPEG color range. |
| 43 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. | 42 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. |
| 44 COLOR_SPACE_MAX = COLOR_SPACE_HD_REC709, | 43 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. |
| 44 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 // Returns the name of a Format as a string. | 47 // Returns the name of a Format as a string. |
| 48 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); | 48 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); |
| 49 | 49 |
| 50 // Returns true if |format| is a YUV non interleaved format. | 50 // Returns true if |format| is a YUV non interleaved format. |
| 51 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); | 51 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); |
| 52 | 52 |
| 53 } // namespace media | 53 } // namespace media |
| 54 | 54 |
| 55 #endif // MEDIA_BASE_VIDEO_TYPES_H_ | 55 #endif // MEDIA_BASE_VIDEO_TYPES_H_ |
| OLD | NEW |