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

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

Issue 1326153002: Add PIXEL_FORMAT_MT21. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 19 matching lines...) Expand all
30 7, // 12bpp with Y plane followed by a 2x2 interleaved VU plane. 30 7, // 12bpp with Y plane followed by a 2x2 interleaved VU plane.
31 PIXEL_FORMAT_UYVY = 31 PIXEL_FORMAT_UYVY =
32 8, // 16bpp interleaved 2x1 U, 1x1 Y, 2x1 V, 1x1 Y samples. 32 8, // 16bpp interleaved 2x1 U, 1x1 Y, 2x1 V, 1x1 Y samples.
33 PIXEL_FORMAT_YUY2 = 33 PIXEL_FORMAT_YUY2 =
34 9, // 16bpp interleaved 1x1 Y, 2x1 U, 1x1 Y, 2x1 V samples. 34 9, // 16bpp interleaved 1x1 Y, 2x1 U, 1x1 Y, 2x1 V samples.
35 PIXEL_FORMAT_ARGB = 10, // 32bpp ARGB, 1 plane. 35 PIXEL_FORMAT_ARGB = 10, // 32bpp ARGB, 1 plane.
36 PIXEL_FORMAT_XRGB = 11, // 24bpp XRGB, 1 plane. 36 PIXEL_FORMAT_XRGB = 11, // 24bpp XRGB, 1 plane.
37 PIXEL_FORMAT_RGB24 = 12, // 24bpp BGR, 1 plane. 37 PIXEL_FORMAT_RGB24 = 12, // 24bpp BGR, 1 plane.
38 PIXEL_FORMAT_RGB32 = 13, // 32bpp BGRA, 1 plane. 38 PIXEL_FORMAT_RGB32 = 13, // 32bpp BGRA, 1 plane.
39 PIXEL_FORMAT_MJPEG = 14, // MJPEG compressed. 39 PIXEL_FORMAT_MJPEG = 14, // MJPEG compressed.
40 // MediaTek proprietary format. MT21 is similar to NV21 except the memory
41 // layout and pixel layout (swizzles). 12bpp with Y plane followed by a 2x2
42 // interleaved VU plane. Each image contains two buffers -- Y plane and VU
43 // plane. Two planes can be non-contiguous in memory. The starting addresses
44 // of Y plane and VU plane are 4KB alignment.
45 // Suppose image dimension is (width, height). For both Y plane and VU plane:
46 // Row pitch = ((width+15)/16) * 16.
47 // Plane size = Row pitch * (((height+31)/32)*32)
48 PIXEL_FORMAT_MT21 = 15,
40 // Please update UMA histogram enumeration when adding new formats here. 49 // Please update UMA histogram enumeration when adding new formats here.
41 PIXEL_FORMAT_MAX = 50 PIXEL_FORMAT_MAX =
42 PIXEL_FORMAT_MJPEG, // Must always be equal to largest entry logged. 51 PIXEL_FORMAT_MT21, // Must always be equal to largest entry logged.
43 }; 52 };
44 53
45 // Color space or color range used for the pixels. 54 // Color space or color range used for the pixels.
46 // Logged to UMA, so never reuse values. Leave gaps if necessary. 55 // Logged to UMA, so never reuse values. Leave gaps if necessary.
47 enum ColorSpace { 56 enum ColorSpace {
48 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601. 57 COLOR_SPACE_UNSPECIFIED = 0, // In general this is Rec601.
49 // The JPEG color space is the combination of Rec.601 and full range colors 58 // The JPEG color space is the combination of Rec.601 and full range colors
50 // (aka pc range colors). 59 // (aka pc range colors).
51 COLOR_SPACE_JPEG = 1, 60 COLOR_SPACE_JPEG = 1,
52 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space. 61 COLOR_SPACE_HD_REC709 = 2, // Rec709 "HD" color space.
53 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space. 62 COLOR_SPACE_SD_REC601 = 3, // Rec601 "SD" color space.
54 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601, 63 COLOR_SPACE_MAX = COLOR_SPACE_SD_REC601,
55 }; 64 };
56 65
57 // Returns the name of a Format as a string. 66 // Returns the name of a Format as a string.
58 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format); 67 MEDIA_EXPORT std::string VideoPixelFormatToString(VideoPixelFormat format);
59 68
60 // Returns true if |format| is a YUV format with multiple planes. 69 // Returns true if |format| is a YUV format with multiple planes.
61 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format); 70 MEDIA_EXPORT bool IsYuvPlanar(VideoPixelFormat format);
62 71
63 } // namespace media 72 } // namespace media
64 73
65 #endif // MEDIA_BASE_VIDEO_TYPES_H_ 74 #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