• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef HISTREAMER_PLUGIN_COMMON_VIDEO_TAGS_H
17 #define HISTREAMER_PLUGIN_COMMON_VIDEO_TAGS_H
18 
19 #include <cstdint> // NOLINT: using uint32_t
20 
21 namespace OHOS {
22 namespace Media {
23 namespace Plugin {
24 /**
25  * @enum Video Pixel Format.
26  *
27  * @since 1.0
28  * @version 1.0
29  */
30 enum struct VideoPixelFormat : uint32_t {
31     UNKNOWN,
32     YUV410P,   ///< planar YUV 4:1:0, 1 Cr & Cb sample per 4x4 Y samples
33     YUV411P,   ///< planar YUV 4:1:1, 1 Cr & Cb sample per 4x1 Y samples
34     YUV420P,   ///< planar YUV 4:2:0, 1 Cr & Cb sample per 2x2 Y samples
35     NV12,      ///< semi-planar YUV 4:2:0, UVUV...
36     NV21,      ///< semi-planar YUV 4:2:0, VUVU...
37     YUYV422,   ///< packed YUV 4:2:2, Y0 Cb Y1 Cr
38     YUV422P,   ///< planar YUV 4:2:2, 1 Cr & Cb sample per 2x1 Y samples
39     YUV444P,   ///< planar YUV 4:4:4, 1 Cr & Cb sample per 1x1 Y samples
40     RGBA,      ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
41     ARGB,      ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
42     ABGR,      ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
43     BGRA,      ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
44     RGB24,     ///< packed RGB 8:8:8, RGBRGB...
45     BGR24,     ///< packed RGB 8:8:8, BGRBGR...
46     PAL8,      ///< 8 bit with AV_PIX_FMT_RGB32 palette
47     GRAY8,     ///< Y
48     MONOWHITE, ///< Y, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
49     MONOBLACK, ///< Y, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
50     YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG)
51     YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG)
52     YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG)
53 };
54 
55 /**
56  * @enum Video H264/AVC profile.
57  *
58  * @since 1.0
59  * @version 1.0
60  */
61 enum struct VideoH264Profile : uint32_t {
62     UNKNOWN,
63     BASELINE,  ///< Baseline profile
64     MAIN,      ///< Main profile
65     EXTENDED,  ///< Extended profile
66     HIGH,      ///< High profile
67     HIGH10,    ///< High 10 profile
68     HIGH422,   ///< High 4:2:2 profile
69     HIGH444,   ///< High 4:4:4 profile
70 };
71 
72 /**
73  * @enum Video Bit Stream format.
74  *
75  * @since 1.0
76  * @version 1.0
77  */
78 enum struct VideoBitStreamFormat : uint32_t {
79     UNKNOWN,
80     AVC1,  // H264 bit stream format
81     HEVC,  // H265 bit stream format
82     ANNEXB, // H264, H265 bit stream format
83 };
84 } // namespace Plugin
85 } // namespace Media
86 } // namespace OHOS
87 #endif // HISTREAMER_PLUGIN_COMMON_VIDEO_TAGS_H
88