Chromium Code Reviews| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 // Row pitch = ((width+15)/16) * 16. | 46 // Row pitch = ((width+15)/16) * 16. |
| 47 // Plane size = Row pitch * (((height+31)/32)*32) | 47 // Plane size = Row pitch * (((height+31)/32)*32) |
| 48 PIXEL_FORMAT_MT21 = 15, | 48 PIXEL_FORMAT_MT21 = 15, |
| 49 | 49 |
| 50 PIXEL_FORMAT_YUV420P9 = 16, | 50 PIXEL_FORMAT_YUV420P9 = 16, |
| 51 PIXEL_FORMAT_YUV420P10 = 17, | 51 PIXEL_FORMAT_YUV420P10 = 17, |
| 52 PIXEL_FORMAT_YUV422P9 = 18, | 52 PIXEL_FORMAT_YUV422P9 = 18, |
| 53 PIXEL_FORMAT_YUV422P10 = 19, | 53 PIXEL_FORMAT_YUV422P10 = 19, |
| 54 PIXEL_FORMAT_YUV444P9 = 20, | 54 PIXEL_FORMAT_YUV444P9 = 20, |
| 55 PIXEL_FORMAT_YUV444P10 = 21, | 55 PIXEL_FORMAT_YUV444P10 = 21, |
| 56 | 56 PIXEL_FORMAT_Y8 = 22, // single 8bpp plane. |
|
fbarchard1
2016/09/20 21:52:24
// Single 8 bpp plane.
dshwang
2016/09/21 09:00:00
Done.
| |
| 57 PIXEL_FORMAT_Y16 = 23, // single 16bpp plane. | |
|
fbarchard1
2016/09/20 21:52:24
// Single 16 bpp plane.
dshwang
2016/09/21 09:00:00
Done.
| |
| 57 // Please update UMA histogram enumeration when adding new formats here. | 58 // Please update UMA histogram enumeration when adding new formats here. |
| 58 PIXEL_FORMAT_MAX = | 59 PIXEL_FORMAT_MAX = |
| 59 PIXEL_FORMAT_YUV444P10, // Must always be equal to largest entry logged. | 60 PIXEL_FORMAT_Y16, // Must always be equal to largest entry logged. |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 // Color space or color range used for the pixels. | 63 // Color space or color range used for the pixels. |
| 63 // Logged to UMA, so never reuse values. Leave gaps if necessary. | 64 // Logged to UMA, so never reuse values. Leave gaps if necessary. |
| 64 enum ColorSpace { | 65 enum ColorSpace { |
| 65 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. | 66 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. |
| 66 // The JPEG color space is the combination of Rec.601 and full range colors | 67 // The JPEG color space is the combination of Rec.601 and full range colors |
| 67 // (aka pc range colors). | 68 // (aka pc range colors). |
| 68 COLOR_SPACE_JPEG = 1, | 69 COLOR_SPACE_JPEG = 1, |
| 69 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. | 70 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. |
| 70 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. | 71 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. |
| 71 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, | 72 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 // Returns the name of a Format as a string. | 75 // Returns the name of a Format as a string. |
| 75 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); | 76 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); |
| 76 | 77 |
| 77 // Returns true if |format| is a YUV format with multiple planes. | 78 // Returns true if |format| is a YUV format with multiple planes. |
| 78 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); | 79 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); |
| 79 | 80 |
| 80 // Returns true if |format| has no Alpha channel (hence is always opaque). | 81 // Returns true if |format| has no Alpha channel (hence is always opaque). |
| 81 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format); | 82 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format); |
| 82 | 83 |
| 83 } // namespace media | 84 } // namespace media |
| 84 | 85 |
| 85 #endif // MEDIA_BASE_VIDEO_TYPES_H_ | 86 #endif // MEDIA_BASE_VIDEO_TYPES_H_ |
| OLD | NEW |