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

Side by Side Diff: media/base/video_types.h

Issue 2571163002: Add PIXEL_FORMAT_I422. (Closed)
Patch Set: Created 4 years 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/base/video_frame.cc ('k') | media/base/video_types.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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 PIXEL_FORMAT_YUV444P9 = 20, 54 PIXEL_FORMAT_YUV444P9 = 20,
55 PIXEL_FORMAT_YUV444P10 = 21, 55 PIXEL_FORMAT_YUV444P10 = 21,
56 56
57 PIXEL_FORMAT_YUV420P12 = 22, 57 PIXEL_FORMAT_YUV420P12 = 22,
58 PIXEL_FORMAT_YUV422P12 = 23, 58 PIXEL_FORMAT_YUV422P12 = 23,
59 PIXEL_FORMAT_YUV444P12 = 24, 59 PIXEL_FORMAT_YUV444P12 = 24,
60 60
61 PIXEL_FORMAT_Y8 = 25, // single 8bpp plane. 61 PIXEL_FORMAT_Y8 = 25, // single 8bpp plane.
62 PIXEL_FORMAT_Y16 = 26, // single 16bpp plane. 62 PIXEL_FORMAT_Y16 = 26, // single 16bpp plane.
63 63
64 PIXEL_FORMAT_I422 =
wuchengli 2016/12/14 08:16:53 I prefer PIXEL_FORMAT_YU16 to be consistent with P
jcliang 2016/12/14 08:25:41 I followed the naming of libyuv which lists YU16 a
65 27, // 16bpp YUV planar 1x1 Y, 2x2 UV samples, a.k.a. YU16.
wuchengli 2016/12/14 08:16:53 This should be 2x1 UV samples.
jcliang 2016/12/14 08:25:41 Done.
66
64 // Please update UMA histogram enumeration when adding new formats here. 67 // Please update UMA histogram enumeration when adding new formats here.
65 PIXEL_FORMAT_MAX = 68 PIXEL_FORMAT_MAX =
66 PIXEL_FORMAT_Y16, // Must always be equal to largest entry logged. 69 PIXEL_FORMAT_I422, // Must always be equal to largest entry logged.
67 }; 70 };
68 71
69 // Color space or color range used for the pixels. 72 // Color space or color range used for the pixels.
70 // Logged to UMA, so never reuse values. Leave gaps if necessary. 73 // Logged to UMA, so never reuse values. Leave gaps if necessary.
71 enum ColorSpace { 74 enum ColorSpace {
72 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. 75 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601.
73 // The JPEG color space is the combination of Rec.601 and full range colors 76 // The JPEG color space is the combination of Rec.601 and full range colors
74 // (aka pc range colors). 77 // (aka pc range colors).
75 COLOR_SPACE_JPEG = 1, 78 COLOR_SPACE_JPEG = 1,
76 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. 79 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space.
77 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. 80 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space.
78 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, 81 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601,
79 }; 82 };
80 83
81 // Returns the name of a Format as a string. 84 // Returns the name of a Format as a string.
82 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); 85 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format);
83 86
84 // Returns true if |format| is a YUV format with multiple planes. 87 // Returns true if |format| is a YUV format with multiple planes.
85 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); 88 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format);
86 89
87 // Returns true if |format| has no Alpha channel (hence is always opaque). 90 // Returns true if |format| has no Alpha channel (hence is always opaque).
88 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format); 91 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format);
89 92
90 } // namespace media 93 } // namespace media
91 94
92 #endif // MEDIA_BASE_VIDEO_TYPES_H_ 95 #endif // MEDIA_BASE_VIDEO_TYPES_H_
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/base/video_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698