• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2015 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __MPP_FRAME_H__
18 #define __MPP_FRAME_H__
19 
20 #include "mpp_buffer.h"
21 #include "mpp_meta.h"
22 
23 /*
24  * bit definition for mode flag in MppFrame
25  */
26 /* progressive frame */
27 #define MPP_FRAME_FLAG_FRAME            (0x00000000)
28 /* top field only */
29 #define MPP_FRAME_FLAG_TOP_FIELD        (0x00000001)
30 /* bottom field only */
31 #define MPP_FRAME_FLAG_BOT_FIELD        (0x00000002)
32 /* paired field */
33 #define MPP_FRAME_FLAG_PAIRED_FIELD     (MPP_FRAME_FLAG_TOP_FIELD|MPP_FRAME_FLAG_BOT_FIELD)
34 /* paired field with field order of top first */
35 #define MPP_FRAME_FLAG_TOP_FIRST        (0x00000004)
36 /* paired field with field order of bottom first */
37 #define MPP_FRAME_FLAG_BOT_FIRST        (0x00000008)
38 /* paired field with unknown field order (MBAFF) */
39 #define MPP_FRAME_FLAG_DEINTERLACED     (MPP_FRAME_FLAG_TOP_FIRST|MPP_FRAME_FLAG_BOT_FIRST)
40 #define MPP_FRAME_FLAG_FIELD_ORDER_MASK (0x0000000C)
41 // for multiview stream
42 #define MPP_FRAME_FLAG_VIEW_ID_MASK     (0x000000f0)
43 
44 #define MPP_FRAME_FLAG_IEP_DEI_MASK     (0x00000f00)
45 #define MPP_FRAME_FLAG_IEP_DEI_I2O1     (0x00000100)
46 #define MPP_FRAME_FLAG_IEP_DEI_I4O2     (0x00000200)
47 #define MPP_FRAME_FLAG_IEP_DEI_I4O1     (0x00000300)
48 
49 /*
50  * MPEG vs JPEG YUV range.
51  */
52 typedef enum {
53     MPP_FRAME_RANGE_UNSPECIFIED = 0,
54     MPP_FRAME_RANGE_MPEG        = 1,    ///< the normal 219*2^(n-8) "MPEG" YUV ranges
55     MPP_FRAME_RANGE_JPEG        = 2,    ///< the normal     2^n-1   "JPEG" YUV ranges
56     MPP_FRAME_RANGE_NB,                 ///< Not part of ABI
57 } MppFrameColorRange;
58 
59 typedef enum {
60     MPP_FRAME_VIDEO_FMT_COMPONEMT   = 0,
61     MPP_FRAME_VIDEO_FMT_PAL         = 1,
62     MPP_FRAME_VIDEO_FMT_NTSC        = 2,
63     MPP_FRAME_VIDEO_FMT_SECAM       = 3,
64     MPP_FRAME_VIDEO_FMT_MAC         = 4,
65     MPP_FRAME_VIDEO_FMT_UNSPECIFIED = 5,
66     MPP_FRAME_VIDEO_FMT_RESERVED0   = 6,
67     MPP_FRAME_VIDEO_FMT_RESERVED1   = 7,
68 } MppFrameVideoFormat;
69 
70 /*
71  * Chromaticity coordinates of the source primaries.
72  */
73 typedef enum {
74     MPP_FRAME_PRI_RESERVED0     = 0,
75     MPP_FRAME_PRI_BT709         = 1,    ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
76     MPP_FRAME_PRI_UNSPECIFIED   = 2,
77     MPP_FRAME_PRI_RESERVED      = 3,
78     MPP_FRAME_PRI_BT470M        = 4,    ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
79 
80     MPP_FRAME_PRI_BT470BG       = 5,    ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
81     MPP_FRAME_PRI_SMPTE170M     = 6,    ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
82     MPP_FRAME_PRI_SMPTE240M     = 7,    ///< functionally identical to above
83     MPP_FRAME_PRI_FILM          = 8,    ///< colour filters using Illuminant C
84     MPP_FRAME_PRI_BT2020        = 9,    ///< ITU-R BT2020
85     MPP_FRAME_PRI_SMPTEST428_1  = 10,   ///< SMPTE ST 428-1 (CIE 1931 XYZ)
86     MPP_FRAME_PRI_SMPTE431      = 11,   ///< SMPTE ST 431-2 (2011) / DCI P3
87     MPP_FRAME_PRI_SMPTE432      = 12,   ///< SMPTE ST 432-1 (2010) / P3 D65 / Display P3
88     MPP_FRAME_PRI_JEDEC_P22     = 22,   ///< JEDEC P22 phosphors
89     MPP_FRAME_PRI_NB,                   ///< Not part of ABI
90 } MppFrameColorPrimaries;
91 
92 /*
93  * Color Transfer Characteristic.
94  */
95 typedef enum {
96     MPP_FRAME_TRC_RESERVED0    = 0,
97     MPP_FRAME_TRC_BT709        = 1,     ///< also ITU-R BT1361
98     MPP_FRAME_TRC_UNSPECIFIED  = 2,
99     MPP_FRAME_TRC_RESERVED     = 3,
100     MPP_FRAME_TRC_GAMMA22      = 4,     ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
101     MPP_FRAME_TRC_GAMMA28      = 5,     ///< also ITU-R BT470BG
102     MPP_FRAME_TRC_SMPTE170M    = 6,     ///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
103     MPP_FRAME_TRC_SMPTE240M    = 7,
104     MPP_FRAME_TRC_LINEAR       = 8,     ///< "Linear transfer characteristics"
105     MPP_FRAME_TRC_LOG          = 9,     ///< "Logarithmic transfer characteristic (100:1 range)"
106     MPP_FRAME_TRC_LOG_SQRT     = 10,    ///< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
107     MPP_FRAME_TRC_IEC61966_2_4 = 11,    ///< IEC 61966-2-4
108     MPP_FRAME_TRC_BT1361_ECG   = 12,    ///< ITU-R BT1361 Extended Colour Gamut
109     MPP_FRAME_TRC_IEC61966_2_1 = 13,    ///< IEC 61966-2-1 (sRGB or sYCC)
110     MPP_FRAME_TRC_BT2020_10    = 14,    ///< ITU-R BT2020 for 10 bit system
111     MPP_FRAME_TRC_BT2020_12    = 15,    ///< ITU-R BT2020 for 12 bit system
112     MPP_FRAME_TRC_SMPTEST2084  = 16,    ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
113     MPP_FRAME_TRC_SMPTEST428_1 = 17,    ///< SMPTE ST 428-1
114     MPP_FRAME_TRC_ARIB_STD_B67 = 18,    ///< ARIB STD-B67, known as "Hybrid log-gamma"
115     MPP_FRAME_TRC_NB,                   ///< Not part of ABI
116 } MppFrameColorTransferCharacteristic;
117 
118 /*
119  * YUV colorspace type.
120  */
121 typedef enum {
122     MPP_FRAME_SPC_RGB         = 0,      ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
123     MPP_FRAME_SPC_BT709       = 1,      ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
124     MPP_FRAME_SPC_UNSPECIFIED = 2,
125     MPP_FRAME_SPC_RESERVED    = 3,
126     MPP_FRAME_SPC_FCC         = 4,      ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
127     MPP_FRAME_SPC_BT470BG     = 5,      ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
128     MPP_FRAME_SPC_SMPTE170M   = 6,      ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
129     MPP_FRAME_SPC_SMPTE240M   = 7,
130     MPP_FRAME_SPC_YCOCG       = 8,      ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
131     MPP_FRAME_SPC_BT2020_NCL  = 9,      ///< ITU-R BT2020 non-constant luminance system
132     MPP_FRAME_SPC_BT2020_CL   = 10,     ///< ITU-R BT2020 constant luminance system
133     MPP_FRAME_SPC_SMPTE2085   = 11,     ///< SMPTE 2085, Y'D'zD'x
134     MPP_FRAME_SPC_CHROMA_DERIVED_NCL = 12,  ///< Chromaticity-derived non-constant luminance system
135     MPP_FRAME_SPC_CHROMA_DERIVED_CL = 13,   ///< Chromaticity-derived constant luminance system
136     MPP_FRAME_SPC_ICTCP       = 14,     ///< ITU-R BT.2100-0, ICtCp
137     MPP_FRAME_SPC_NB,                   ///< Not part of ABI
138 } MppFrameColorSpace;
139 
140 /*
141  * Location of chroma samples.
142  *
143  * Illustration showing the location of the first (top left) chroma sample of the
144  * image, the left shows only luma, the right
145  * shows the location of the chroma sample, the 2 could be imagined to overlay
146  * each other but are drawn separately due to limitations of ASCII
147  *
148  *                1st 2nd       1st 2nd horizontal luma sample positions
149  *                 v   v         v   v
150  *                 ______        ______
151  *1st luma line > |X   X ...    |3 4 X ...     X are luma samples,
152  *                |             |1 2           1-6 are possible chroma positions
153  *2nd luma line > |X   X ...    |5 6 X ...     0 is undefined/unknown position
154  */
155 typedef enum {
156     MPP_CHROMA_LOC_UNSPECIFIED = 0,
157     MPP_CHROMA_LOC_LEFT        = 1,     ///< mpeg2/4 4:2:0, h264 default for 4:2:0
158     MPP_CHROMA_LOC_CENTER      = 2,     ///< mpeg1 4:2:0, jpeg 4:2:0, h263 4:2:0
159     MPP_CHROMA_LOC_TOPLEFT     = 3,     ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2
160     MPP_CHROMA_LOC_TOP         = 4,
161     MPP_CHROMA_LOC_BOTTOMLEFT  = 5,
162     MPP_CHROMA_LOC_BOTTOM      = 6,
163     MPP_CHROMA_LOC_NB,                  ///< Not part of ABI
164 } MppFrameChromaLocation;
165 
166 #define MPP_FRAME_FMT_MASK          (0x000fffff)
167 
168 #define MPP_FRAME_FMT_COLOR_MASK    (0x000f0000)
169 #define MPP_FRAME_FMT_YUV           (0x00000000)
170 #define MPP_FRAME_FMT_RGB           (0x00010000)
171 
172 #define MPP_FRAME_FBC_MASK          (0x00f00000)
173 #define MPP_FRAME_FBC_NONE          (0x00000000)
174 /*
175  * AFBC_V1 is for ISP output.
176  * It has default payload offset to be calculated * from width and height:
177  * Payload offset = MPP_ALIGN(MPP_ALIGN(width, 16) * MPP_ALIGN(height, 16) / 16, SZ_4K)
178  */
179 #define MPP_FRAME_FBC_AFBC_V1       (0x00100000)
180 /*
181  * AFBC_V2 is for video decoder output.
182  * It stores payload offset in first 32-bit in header address
183  * Payload offset is always set to zero.
184  */
185 #define MPP_FRAME_FBC_AFBC_V2       (0x00200000)
186 
187 #define MPP_FRAME_FMT_LE_MASK       (0x01000000)
188 
189 #define MPP_FRAME_FMT_IS_YUV(fmt)   (((fmt & MPP_FRAME_FMT_COLOR_MASK) == MPP_FRAME_FMT_YUV) && \
190                                      ((fmt & MPP_FRAME_FMT_MASK) < MPP_FMT_YUV_BUTT))
191 #define MPP_FRAME_FMT_IS_RGB(fmt)   (((fmt & MPP_FRAME_FMT_COLOR_MASK) == MPP_FRAME_FMT_RGB) && \
192                                      ((fmt & MPP_FRAME_FMT_MASK) < MPP_FMT_RGB_BUTT))
193 
194 /*
195  * For MPP_FRAME_FBC_AFBC_V1 the 16byte aligned stride is used.
196  */
197 #define MPP_FRAME_FMT_IS_FBC(fmt)   (fmt & MPP_FRAME_FBC_MASK)
198 
199 #define MPP_FRAME_FMT_IS_LE(fmt)    ((fmt & MPP_FRAME_FMT_LE_MASK) == MPP_FRAME_FMT_LE_MASK)
200 #define MPP_FRAME_FMT_IS_BE(fmt)    ((fmt & MPP_FRAME_FMT_LE_MASK) == 0)
201 
202 /* mpp color format index definition */
203 typedef enum {
204     MPP_FMT_YUV420SP        = (MPP_FRAME_FMT_YUV + 0),  /* YYYY... UV... (NV12)     */
205     /*
206      * A rockchip specific pixel format, without gap between pixel aganist
207      * the P010_10LE/P010_10BE
208      */
209     MPP_FMT_YUV420SP_10BIT  = (MPP_FRAME_FMT_YUV + 1),
210     MPP_FMT_YUV422SP        = (MPP_FRAME_FMT_YUV + 2),  /* YYYY... UVUV... (NV16)   */
211     MPP_FMT_YUV422SP_10BIT  = (MPP_FRAME_FMT_YUV + 3),  ///< Not part of ABI
212     MPP_FMT_YUV420P         = (MPP_FRAME_FMT_YUV + 4),  /* YYYY... U...V...  (I420) */
213     MPP_FMT_YUV420SP_VU     = (MPP_FRAME_FMT_YUV + 5),  /* YYYY... VUVUVU... (NV21) */
214     MPP_FMT_YUV422P         = (MPP_FRAME_FMT_YUV + 6),  /* YYYY... UU...VV...(422P) */
215     MPP_FMT_YUV422SP_VU     = (MPP_FRAME_FMT_YUV + 7),  /* YYYY... VUVUVU... (NV61) */
216     MPP_FMT_YUV422_YUYV     = (MPP_FRAME_FMT_YUV + 8),  /* YUYVYUYV... (YUY2)       */
217     MPP_FMT_YUV422_YVYU     = (MPP_FRAME_FMT_YUV + 9),  /* YVYUYVYU... (YVY2)       */
218     MPP_FMT_YUV422_UYVY     = (MPP_FRAME_FMT_YUV + 10), /* UYVYUYVY... (UYVY)       */
219     MPP_FMT_YUV422_VYUY     = (MPP_FRAME_FMT_YUV + 11), /* VYUYVYUY... (VYUY)       */
220     MPP_FMT_YUV400          = (MPP_FRAME_FMT_YUV + 12), /* YYYY...                  */
221     MPP_FMT_YUV440SP        = (MPP_FRAME_FMT_YUV + 13), /* YYYY... UVUV...          */
222     MPP_FMT_YUV411SP        = (MPP_FRAME_FMT_YUV + 14), /* YYYY... UV...            */
223     MPP_FMT_YUV444SP        = (MPP_FRAME_FMT_YUV + 15), /* YYYY... UVUVUVUV...      */
224     MPP_FMT_YUV444P         = (MPP_FRAME_FMT_YUV + 16), /* YYYY... UUUU... VVVV...  */
225     MPP_FMT_YUV_BUTT,
226 
227     MPP_FMT_RGB565          = (MPP_FRAME_FMT_RGB + 0),  /* 16-bit RGB               */
228     MPP_FMT_BGR565          = (MPP_FRAME_FMT_RGB + 1),  /* 16-bit RGB               */
229     MPP_FMT_RGB555          = (MPP_FRAME_FMT_RGB + 2),  /* 15-bit RGB               */
230     MPP_FMT_BGR555          = (MPP_FRAME_FMT_RGB + 3),  /* 15-bit RGB               */
231     MPP_FMT_RGB444          = (MPP_FRAME_FMT_RGB + 4),  /* 12-bit RGB               */
232     MPP_FMT_BGR444          = (MPP_FRAME_FMT_RGB + 5),  /* 12-bit RGB               */
233     MPP_FMT_RGB888          = (MPP_FRAME_FMT_RGB + 6),  /* 24-bit RGB               */
234     MPP_FMT_BGR888          = (MPP_FRAME_FMT_RGB + 7),  /* 24-bit RGB               */
235     MPP_FMT_RGB101010       = (MPP_FRAME_FMT_RGB + 8),  /* 30-bit RGB               */
236     MPP_FMT_BGR101010       = (MPP_FRAME_FMT_RGB + 9),  /* 30-bit RGB               */
237     MPP_FMT_ARGB8888        = (MPP_FRAME_FMT_RGB + 10), /* 32-bit RGB               */
238     MPP_FMT_ABGR8888        = (MPP_FRAME_FMT_RGB + 11), /* 32-bit RGB               */
239     MPP_FMT_BGRA8888        = (MPP_FRAME_FMT_RGB + 12), /* 32-bit RGB               */
240     MPP_FMT_RGBA8888        = (MPP_FRAME_FMT_RGB + 13), /* 32-bit RGB               */
241     MPP_FMT_RGB_BUTT,
242 
243     MPP_FMT_BUTT,
244 } MppFrameFormat;
245 
246 /**
247  * Rational number (pair of numerator and denominator).
248  */
249 typedef struct MppFrameRational {
250     RK_S32 num; ///< Numerator
251     RK_S32 den; ///< Denominator
252 } MppFrameRational;
253 
254 typedef struct MppFrameMasteringDisplayMetadata {
255     RK_U16 display_primaries[3][2];
256     RK_U16 white_point[2];
257     RK_U32 max_luminance;
258     RK_U32 min_luminance;
259 } MppFrameMasteringDisplayMetadata;
260 
261 typedef struct MppFrameContentLightMetadata {
262     RK_U16 MaxCLL;
263     RK_U16 MaxFALL;
264 } MppFrameContentLightMetadata;
265 
266 typedef enum {
267     MPP_FRAME_ERR_UNKNOW           = 0x0001,
268     MPP_FRAME_ERR_UNSUPPORT        = 0x0002,
269 } MPP_FRAME_ERR;
270 
271 #ifdef __cplusplus
272 extern "C" {
273 #endif
274 
275 /*
276  * MppFrame interface
277  */
278 MPP_RET mpp_frame_init(MppFrame *frame);
279 MPP_RET mpp_frame_deinit(MppFrame *frame);
280 
281 /*
282  * normal parameter
283  *
284  *    offset_x
285  *   <-------->
286  *
287  *   <---------------+      hor_stride      +--------------->
288  *
289  *   +------------------------------------------------------+   ^   ^
290  *   |                                                      |   |   |
291  *   |                                                      |   |   | offset_y
292  *   |                                                      |   |   |
293  *   |        +--------------------------------+  ^         |   |   v
294  *   |        |                                |  |         |   |
295  *   |        |                                |  +         |   +
296  *   |        |                                |            |
297  *   |        |        valid data area         | height     | ver_stride
298  *   |        |                                |            |
299  *   |        |                                |  +         |   +
300  *   |        |                                |  |         |   |
301  *   |        +--------------------------------+  v         |   |
302  *   |                                                      |   |
303  *   |        <----------+   width   +--------->            |   |
304  *   |                                                      |   |
305  *   +------------------------------------------------------+   v
306  *
307  */
308 RK_U32  mpp_frame_get_width(const MppFrame frame);
309 void    mpp_frame_set_width(MppFrame frame, RK_U32 width);
310 RK_U32  mpp_frame_get_height(const MppFrame frame);
311 void    mpp_frame_set_height(MppFrame frame, RK_U32 height);
312 RK_U32  mpp_frame_get_hor_stride(const MppFrame frame);
313 void    mpp_frame_set_hor_stride(MppFrame frame, RK_U32 hor_stride);
314 RK_U32  mpp_frame_get_ver_stride(const MppFrame frame);
315 void    mpp_frame_set_ver_stride(MppFrame frame, RK_U32 ver_stride);
316 void    mpp_frame_set_hor_stride_pixel(MppFrame frame, RK_U32 hor_stride_pixel);
317 RK_U32  mpp_frame_get_hor_stride_pixel(const MppFrame frame);
318 void    mpp_frame_set_fbc_hdr_stride(MppFrame frame, RK_U32 fbc_hdr_stride);
319 RK_U32  mpp_frame_get_fbc_hdr_stride(const MppFrame frame);
320 
321 RK_U32  mpp_frame_get_offset_x(const MppFrame frame);
322 void    mpp_frame_set_offset_x(MppFrame frame, RK_U32 offset_x);
323 RK_U32  mpp_frame_get_offset_y(const MppFrame frame);
324 void    mpp_frame_set_offset_y(MppFrame frame, RK_U32 offset_y);
325 RK_U32  mpp_frame_get_mode(const MppFrame frame);
326 void    mpp_frame_set_mode(MppFrame frame, RK_U32 mode);
327 RK_U32  mpp_frame_get_discard(const MppFrame frame);
328 void    mpp_frame_set_discard(MppFrame frame, RK_U32 discard);
329 RK_U32  mpp_frame_get_viewid(const MppFrame frame);
330 void    mpp_frame_set_viewid(MppFrame frame, RK_U32 viewid);
331 RK_U32  mpp_frame_get_poc(const MppFrame frame);
332 void    mpp_frame_set_poc(MppFrame frame, RK_U32 poc);
333 RK_S64  mpp_frame_get_pts(const MppFrame frame);
334 void    mpp_frame_set_pts(MppFrame frame, RK_S64 pts);
335 RK_S64  mpp_frame_get_dts(const MppFrame frame);
336 void    mpp_frame_set_dts(MppFrame frame, RK_S64 dts);
337 RK_U32  mpp_frame_get_errinfo(const MppFrame frame);
338 void    mpp_frame_set_errinfo(MppFrame frame, RK_U32 errinfo);
339 size_t  mpp_frame_get_buf_size(const MppFrame frame);
340 void    mpp_frame_set_buf_size(MppFrame frame, size_t buf_size);
341 /*
342  * flow control parmeter
343  */
344 RK_U32  mpp_frame_get_eos(const MppFrame frame);
345 void    mpp_frame_set_eos(MppFrame frame, RK_U32 eos);
346 RK_U32  mpp_frame_get_info_change(const MppFrame frame);
347 void    mpp_frame_set_info_change(MppFrame frame, RK_U32 info_change);
348 
349 /*
350  * buffer parameter
351  */
352 MppBuffer mpp_frame_get_buffer(const MppFrame frame);
353 void    mpp_frame_set_buffer(MppFrame frame, MppBuffer buffer);
354 
355 /*
356  * meta data parameter
357  */
358 RK_S32  mpp_frame_has_meta(const MppFrame frame);
359 MppMeta mpp_frame_get_meta(const MppFrame frame);
360 void    mpp_frame_set_meta(MppFrame frame, MppMeta meta);
361 
362 /*
363  * color related parameter
364  */
365 MppFrameColorRange mpp_frame_get_color_range(const MppFrame frame);
366 void    mpp_frame_set_color_range(MppFrame frame, MppFrameColorRange color_range);
367 MppFrameColorPrimaries mpp_frame_get_color_primaries(const MppFrame frame);
368 void    mpp_frame_set_color_primaries(MppFrame frame, MppFrameColorPrimaries color_primaries);
369 MppFrameColorTransferCharacteristic mpp_frame_get_color_trc(const MppFrame frame);
370 void    mpp_frame_set_color_trc(MppFrame frame, MppFrameColorTransferCharacteristic color_trc);
371 MppFrameColorSpace mpp_frame_get_colorspace(const MppFrame frame);
372 void    mpp_frame_set_colorspace(MppFrame frame, MppFrameColorSpace colorspace);
373 MppFrameChromaLocation mpp_frame_get_chroma_location(const MppFrame frame);
374 void    mpp_frame_set_chroma_location(MppFrame frame, MppFrameChromaLocation chroma_location);
375 MppFrameFormat mpp_frame_get_fmt(MppFrame frame);
376 void    mpp_frame_set_fmt(MppFrame frame, MppFrameFormat fmt);
377 MppFrameRational mpp_frame_get_sar(const MppFrame frame);
378 void    mpp_frame_set_sar(MppFrame frame, MppFrameRational sar);
379 MppFrameMasteringDisplayMetadata mpp_frame_get_mastering_display(const MppFrame frame);
380 void    mpp_frame_set_mastering_display(MppFrame frame, MppFrameMasteringDisplayMetadata mastering_display);
381 MppFrameContentLightMetadata mpp_frame_get_content_light(const MppFrame frame);
382 void    mpp_frame_set_content_light(MppFrame frame, MppFrameContentLightMetadata content_light);
383 
384 /*
385  * HDR parameter
386  */
387 
388 #ifdef __cplusplus
389 }
390 #endif
391 
392 #endif /*__MPP_FRAME_H__*/
393