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

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

Issue 2113243003: media: Introduce Y8 and Y16 video pixel format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to land Created 4 years, 2 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 | « 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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.
62 PIXEL_FORMAT_Y16 = 26, // single 16bpp plane.
63
61 // Please update UMA histogram enumeration when adding new formats here. 64 // Please update UMA histogram enumeration when adding new formats here.
62 PIXEL_FORMAT_MAX = 65 PIXEL_FORMAT_MAX =
63 PIXEL_FORMAT_YUV444P12, // Must always be equal to largest entry logged. 66 PIXEL_FORMAT_Y16, // Must always be equal to largest entry logged.
64 }; 67 };
65 68
66 // Color space or color range used for the pixels. 69 // Color space or color range used for the pixels.
67 // Logged to UMA, so never reuse values. Leave gaps if necessary. 70 // Logged to UMA, so never reuse values. Leave gaps if necessary.
68 enum ColorSpace { 71 enum ColorSpace {
69 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. 72 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601.
70 // The JPEG color space is the combination of Rec.601 and full range colors 73 // The JPEG color space is the combination of Rec.601 and full range colors
71 // (aka pc range colors). 74 // (aka pc range colors).
72 COLOR_SPACE_JPEG = 1, 75 COLOR_SPACE_JPEG = 1,
73 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. 76 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space.
74 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. 77 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space.
75 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, 78 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601,
76 }; 79 };
77 80
78 // Returns the name of a Format as a string. 81 // Returns the name of a Format as a string.
79 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); 82 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format);
80 83
81 // Returns true if |format| is a YUV format with multiple planes. 84 // Returns true if |format| is a YUV format with multiple planes.
82 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); 85 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format);
83 86
84 // Returns true if |format| has no Alpha channel (hence is always opaque). 87 // Returns true if |format| has no Alpha channel (hence is always opaque).
85 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format); 88 MEDIA_EXPORT bool IsOpaque(VideoPixelFormat format);
86 89
87 } // namespace media 90 } // namespace media
88 91
89 #endif // MEDIA_BASE_VIDEO_TYPES_H_ 92 #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