blob: dc5cdab5d676742c4a1347c236cc79c24d11e2da [file] [log] [blame]
James Dong334de522012-03-12 12:47:14 -07001/* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
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
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -080019 * Copyright (c) 2008 The Khronos Group Inc.
20 *
James Dong334de522012-03-12 12:47:14 -070021 * Permission is hereby granted, free of charge, to any person obtaining
22 * a copy of this software and associated documentation files (the
23 * "Software"), to deal in the Software without restriction, including
24 * without limitation the rights to use, copy, modify, merge, publish,
25 * distribute, sublicense, and/or sell copies of the Software, and to
26 * permit persons to whom the Software is furnished to do so, subject
Lajos Molnara1ae5a42014-11-06 17:05:46 -080027 * to the following conditions:
James Dong334de522012-03-12 12:47:14 -070028 * The above copyright notice and this permission notice shall be included
Lajos Molnara1ae5a42014-11-06 17:05:46 -080029 * in all copies or substantial portions of the Software.
30 *
James Dong334de522012-03-12 12:47:14 -070031 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Lajos Molnara1ae5a42014-11-06 17:05:46 -080037 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
James Dong334de522012-03-12 12:47:14 -070038 *
39 */
40
Lajos Molnara1ae5a42014-11-06 17:05:46 -080041/**
James Dong334de522012-03-12 12:47:14 -070042 * @file OMX_Video.h - OpenMax IL version 1.1.2
Lajos Molnara1ae5a42014-11-06 17:05:46 -080043 * The structures is needed by Video components to exchange parameters
James Dong334de522012-03-12 12:47:14 -070044 * and configuration data with OMX components.
45 */
46#ifndef OMX_Video_h
47#define OMX_Video_h
48
49/** @defgroup video OpenMAX IL Video Domain
50 * @ingroup iv
51 * Structures for OpenMAX IL Video domain
52 * @{
53 */
54
55#ifdef __cplusplus
56extern "C" {
57#endif /* __cplusplus */
58
59
60/**
61 * Each OMX header must include all required header files to allow the
62 * header to compile without errors. The includes below are required
Lajos Molnara1ae5a42014-11-06 17:05:46 -080063 * for this header file to compile successfully
James Dong334de522012-03-12 12:47:14 -070064 */
65
66#include <OMX_IVCommon.h>
67
68
69/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -080070 * Enumeration used to define the possible video compression codings.
71 * NOTE: This essentially refers to file extensions. If the coding is
72 * being used to specify the ENCODE type, then additional work
73 * must be done to configure the exact flavor of the compression
74 * to be used. For decode cases where the user application can
75 * not differentiate between MPEG-4 and H.264 bit streams, it is
James Dong334de522012-03-12 12:47:14 -070076 * up to the codec to handle this.
77 */
78typedef enum OMX_VIDEO_CODINGTYPE {
79 OMX_VIDEO_CodingUnused, /**< Value when coding is N/A */
80 OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
81 OMX_VIDEO_CodingMPEG2, /**< AKA: H.262 */
82 OMX_VIDEO_CodingH263, /**< H.263 */
83 OMX_VIDEO_CodingMPEG4, /**< MPEG-4 */
84 OMX_VIDEO_CodingWMV, /**< all versions of Windows Media Video */
85 OMX_VIDEO_CodingRV, /**< all versions of Real Video */
86 OMX_VIDEO_CodingAVC, /**< H.264/AVC */
87 OMX_VIDEO_CodingMJPEG, /**< Motion JPEG */
hkuang5195e082013-06-24 11:06:44 -070088 OMX_VIDEO_CodingVP8, /**< Google VP8, formerly known as On2 VP8 */
89 OMX_VIDEO_CodingVP9, /**< Google VP9 */
Rachad184077d2014-05-01 18:42:43 -070090 OMX_VIDEO_CodingHEVC, /**< ITU H.265/HEVC */
Ronghua Wud561fb52016-01-08 10:38:57 -080091 OMX_VIDEO_CodingDolbyVision,/**< Dolby Vision */
Lajos Molnara1ae5a42014-11-06 17:05:46 -080092 OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -070093 OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
94 OMX_VIDEO_CodingMax = 0x7FFFFFFF
95} OMX_VIDEO_CODINGTYPE;
96
97
98/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -080099 * Data structure used to define a video path. The number of Video paths for
100 * input and output will vary by type of the Video component.
101 *
James Dong334de522012-03-12 12:47:14 -0700102 * Input (aka Source) : zero Inputs, one Output,
103 * Splitter : one Input, 2 or more Outputs,
104 * Processing Element : one Input, one output,
105 * Mixer : 2 or more inputs, one output,
106 * Output (aka Sink) : one Input, zero outputs.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800107 *
108 * The PortDefinition structure is used to define all of the parameters
109 * necessary for the compliant component to setup an input or an output video
110 * path. If additional vendor specific data is required, it should be
111 * transmitted to the component using the CustomCommand function. Compliant
112 * components will prepopulate this structure with optimal values during the
James Dong334de522012-03-12 12:47:14 -0700113 * GetDefaultInitParams command.
114 *
115 * STRUCT MEMBERS:
116 * cMIMEType : MIME type of data for the port
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800117 * pNativeRender : Platform specific reference for a display if a
James Dong334de522012-03-12 12:47:14 -0700118 * sync, otherwise this field is 0
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800119 * nFrameWidth : Width of frame to be used on channel if
James Dong334de522012-03-12 12:47:14 -0700120 * uncompressed format is used. Use 0 for unknown,
121 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800122 * nFrameHeight : Height of frame to be used on channel if
James Dong334de522012-03-12 12:47:14 -0700123 * uncompressed format is used. Use 0 for unknown,
124 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800125 * nStride : Number of bytes per span of an image
James Dong334de522012-03-12 12:47:14 -0700126 * (i.e. indicates the number of bytes to get
127 * from span N to span N+1, where negative stride
128 * indicates the image is bottom up
129 * nSliceHeight : Height used when encoding in slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800130 * nBitrate : Bit rate of frame to be used on channel if
131 * compressed format is used. Use 0 for unknown,
James Dong334de522012-03-12 12:47:14 -0700132 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800133 * xFramerate : Frame rate to be used on channel if uncompressed
134 * format is used. Use 0 for unknown, don't care or
James Dong334de522012-03-12 12:47:14 -0700135 * variable. Units are Q16 frames per second.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800136 * bFlagErrorConcealment : Turns on error concealment if it is supported by
James Dong334de522012-03-12 12:47:14 -0700137 * the OMX component
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800138 * eCompressionFormat : Compression format used in this instance of the
139 * component. When OMX_VIDEO_CodingUnused is
James Dong334de522012-03-12 12:47:14 -0700140 * specified, eColorFormat is used
141 * eColorFormat : Decompressed format used by this component
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800142 * pNativeWindow : Platform specific reference for a window object if a
143 * display sink , otherwise this field is 0x0.
James Dong334de522012-03-12 12:47:14 -0700144 */
145typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
146 OMX_STRING cMIMEType;
147 OMX_NATIVE_DEVICETYPE pNativeRender;
148 OMX_U32 nFrameWidth;
149 OMX_U32 nFrameHeight;
150 OMX_S32 nStride;
151 OMX_U32 nSliceHeight;
152 OMX_U32 nBitrate;
153 OMX_U32 xFramerate;
154 OMX_BOOL bFlagErrorConcealment;
155 OMX_VIDEO_CODINGTYPE eCompressionFormat;
156 OMX_COLOR_FORMATTYPE eColorFormat;
157 OMX_NATIVE_WINDOWTYPE pNativeWindow;
158} OMX_VIDEO_PORTDEFINITIONTYPE;
159
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800160/**
161 * Port format parameter. This structure is used to enumerate the various
James Dong334de522012-03-12 12:47:14 -0700162 * data input/output format supported by the port.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800163 *
James Dong334de522012-03-12 12:47:14 -0700164 * STRUCT MEMBERS:
165 * nSize : Size of the structure in bytes
166 * nVersion : OMX specification version information
167 * nPortIndex : Indicates which port to set
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800168 * nIndex : Indicates the enumeration index for the format from
James Dong334de522012-03-12 12:47:14 -0700169 * 0x0 to N-1
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800170 * eCompressionFormat : Compression format used in this instance of the
171 * component. When OMX_VIDEO_CodingUnused is specified,
172 * eColorFormat is used
James Dong334de522012-03-12 12:47:14 -0700173 * eColorFormat : Decompressed format used by this component
174 * xFrameRate : Indicates the video frame rate in Q16 format
175 */
176typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
177 OMX_U32 nSize;
178 OMX_VERSIONTYPE nVersion;
179 OMX_U32 nPortIndex;
180 OMX_U32 nIndex;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800181 OMX_VIDEO_CODINGTYPE eCompressionFormat;
James Dong334de522012-03-12 12:47:14 -0700182 OMX_COLOR_FORMATTYPE eColorFormat;
183 OMX_U32 xFramerate;
184} OMX_VIDEO_PARAM_PORTFORMATTYPE;
185
186
187/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800188 * This is a structure for configuring video compression quantization
James Dong334de522012-03-12 12:47:14 -0700189 * parameter values. Codecs may support different QP values for different
190 * frame types.
191 *
192 * STRUCT MEMBERS:
193 * nSize : Size of the structure in bytes
194 * nVersion : OMX specification version info
195 * nPortIndex : Port that this structure applies to
196 * nQpI : QP value to use for index frames
197 * nQpP : QP value to use for P frames
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800198 * nQpB : QP values to use for bidirectional frames
James Dong334de522012-03-12 12:47:14 -0700199 */
200typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800201 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700202 OMX_VERSIONTYPE nVersion;
203 OMX_U32 nPortIndex;
204 OMX_U32 nQpI;
205 OMX_U32 nQpP;
206 OMX_U32 nQpB;
207} OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
208
209
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800210/**
211 * Structure for configuration of video fast update parameters.
212 *
James Dong334de522012-03-12 12:47:14 -0700213 * STRUCT MEMBERS:
214 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800215 * nVersion : OMX specification version info
James Dong334de522012-03-12 12:47:14 -0700216 * nPortIndex : Port that this structure applies to
217 * bEnableVFU : Enable/Disable video fast update
218 * nFirstGOB : Specifies the number of the first macroblock row
219 * nFirstMB : specifies the first MB relative to the specified first GOB
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800220 * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB
James Dong334de522012-03-12 12:47:14 -0700221 * and nFirstMB
222 */
223typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800224 OMX_U32 nSize;
225 OMX_VERSIONTYPE nVersion;
226 OMX_U32 nPortIndex;
227 OMX_BOOL bEnableVFU;
228 OMX_U32 nFirstGOB;
229 OMX_U32 nFirstMB;
230 OMX_U32 nNumMBs;
James Dong334de522012-03-12 12:47:14 -0700231} OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
232
233
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800234/**
235 * Enumeration of possible bitrate control types
James Dong334de522012-03-12 12:47:14 -0700236 */
237typedef enum OMX_VIDEO_CONTROLRATETYPE {
238 OMX_Video_ControlRateDisable,
239 OMX_Video_ControlRateVariable,
240 OMX_Video_ControlRateConstant,
241 OMX_Video_ControlRateVariableSkipFrames,
242 OMX_Video_ControlRateConstantSkipFrames,
Chong Zhang64e8b412018-01-22 15:33:03 -0800243 OMX_Video_ControlRateConstantQuality,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800244 OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700245 OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
246 OMX_Video_ControlRateMax = 0x7FFFFFFF
247} OMX_VIDEO_CONTROLRATETYPE;
248
249
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800250/**
251 * Structure for configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700252 *
253 * STRUCT MEMBERS:
254 * nSize : Size of the struct in bytes
255 * nVersion : OMX spec version info
256 * nPortIndex : Port that this struct applies to
257 * eControlRate : Control rate type enum
Chong Zhang64e8b412018-01-22 15:33:03 -0800258 * nTargetBitrate : Target bitrate to encode with (used when eControlRate is
259 * not OMX_Video_ControlRateConstantQuality)
260 * nQualityFactor : Quality to encode with (used when eControlRate is
261 * OMX_Video_ControlRateConstantQuality only)
James Dong334de522012-03-12 12:47:14 -0700262 */
263typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800264 OMX_U32 nSize;
265 OMX_VERSIONTYPE nVersion;
266 OMX_U32 nPortIndex;
267 OMX_VIDEO_CONTROLRATETYPE eControlRate;
Chong Zhang64e8b412018-01-22 15:33:03 -0800268 union {
269 OMX_U32 nTargetBitrate;
270 OMX_U32 nQualityFactor;
271 };
James Dong334de522012-03-12 12:47:14 -0700272} OMX_VIDEO_PARAM_BITRATETYPE;
273
274
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800275/**
276 * Enumeration of possible motion vector (MV) types
James Dong334de522012-03-12 12:47:14 -0700277 */
278typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
279 OMX_Video_MotionVectorPixel,
280 OMX_Video_MotionVectorHalfPel,
281 OMX_Video_MotionVectorQuarterPel,
282 OMX_Video_MotionVectorEighthPel,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800283 OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700284 OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
285 OMX_Video_MotionVectorMax = 0x7FFFFFFF
286} OMX_VIDEO_MOTIONVECTORTYPE;
287
288
289/**
290 * Structure for configuring the number of motion vectors used as well
291 * as their accuracy.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800292 *
James Dong334de522012-03-12 12:47:14 -0700293 * STRUCT MEMBERS:
294 * nSize : Size of the struct in bytes
295 * nVersion : OMX spec version info
296 * nPortIndex : port that this structure applies to
297 * eAccuracy : Enumerated MV accuracy
298 * bUnrestrictedMVs : Allow unrestricted MVs
299 * bFourMV : Allow use of 4 MVs
300 * sXSearchRange : Search range in horizontal direction for MVs
301 * sYSearchRange : Search range in vertical direction for MVs
302 */
303typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
304 OMX_U32 nSize;
305 OMX_VERSIONTYPE nVersion;
306 OMX_U32 nPortIndex;
307 OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
308 OMX_BOOL bUnrestrictedMVs;
309 OMX_BOOL bFourMV;
310 OMX_S32 sXSearchRange;
311 OMX_S32 sYSearchRange;
312} OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
313
314
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800315/**
316 * Enumeration of possible methods to use for Intra Refresh
James Dong334de522012-03-12 12:47:14 -0700317 */
318typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
319 OMX_VIDEO_IntraRefreshCyclic,
320 OMX_VIDEO_IntraRefreshAdaptive,
321 OMX_VIDEO_IntraRefreshBoth,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800322 OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700323 OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
324 OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
325} OMX_VIDEO_INTRAREFRESHTYPE;
326
327
328/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800329 * Structure for configuring intra refresh mode
330 *
James Dong334de522012-03-12 12:47:14 -0700331 * STRUCT MEMBERS:
332 * nSize : Size of the structure in bytes
333 * nVersion : OMX specification version information
334 * nPortIndex : Port that this structure applies to
335 * eRefreshMode : Cyclic, Adaptive, or Both
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800336 * nAirMBs : Number of intra macroblocks to refresh in a frame when
James Dong334de522012-03-12 12:47:14 -0700337 * AIR is enabled
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800338 * nAirRef : Number of times a motion marked macroblock has to be
James Dong334de522012-03-12 12:47:14 -0700339 * intra coded
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800340 * nCirMBs : Number of consecutive macroblocks to be coded as "intra"
James Dong334de522012-03-12 12:47:14 -0700341 * when CIR is enabled
342 */
343typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
344 OMX_U32 nSize;
345 OMX_VERSIONTYPE nVersion;
346 OMX_U32 nPortIndex;
347 OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
348 OMX_U32 nAirMBs;
349 OMX_U32 nAirRef;
350 OMX_U32 nCirMBs;
351} OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
352
353
354/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800355 * Structure for enabling various error correction methods for video
James Dong334de522012-03-12 12:47:14 -0700356 * compression.
357 *
358 * STRUCT MEMBERS:
359 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800360 * nVersion : OMX specification version information
361 * nPortIndex : Port that this structure applies to
James Dong334de522012-03-12 12:47:14 -0700362 * bEnableHEC : Enable/disable header extension codes (HEC)
363 * bEnableResync : Enable/disable resynchronization markers
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800364 * nResynchMarkerSpacing : Resynch markers interval (in bits) to be
365 * applied in the stream
366 * bEnableDataPartitioning : Enable/disable data partitioning
367 * bEnableRVLC : Enable/disable reversible variable length
James Dong334de522012-03-12 12:47:14 -0700368 * coding
369 */
370typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
371 OMX_U32 nSize;
372 OMX_VERSIONTYPE nVersion;
373 OMX_U32 nPortIndex;
374 OMX_BOOL bEnableHEC;
375 OMX_BOOL bEnableResync;
376 OMX_U32 nResynchMarkerSpacing;
377 OMX_BOOL bEnableDataPartitioning;
378 OMX_BOOL bEnableRVLC;
379} OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
380
381
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800382/**
383 * Configuration of variable block-size motion compensation (VBSMC)
384 *
James Dong334de522012-03-12 12:47:14 -0700385 * STRUCT MEMBERS:
386 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800387 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700388 * nPortIndex : Port that this structure applies to
389 * b16x16 : Enable inter block search 16x16
390 * b16x8 : Enable inter block search 16x8
391 * b8x16 : Enable inter block search 8x16
392 * b8x8 : Enable inter block search 8x8
393 * b8x4 : Enable inter block search 8x4
394 * b4x8 : Enable inter block search 4x8
395 * b4x4 : Enable inter block search 4x4
396 */
397typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800398 OMX_U32 nSize;
399 OMX_VERSIONTYPE nVersion;
400 OMX_U32 nPortIndex;
401 OMX_BOOL b16x16;
402 OMX_BOOL b16x8;
James Dong334de522012-03-12 12:47:14 -0700403 OMX_BOOL b8x16;
404 OMX_BOOL b8x8;
405 OMX_BOOL b8x4;
406 OMX_BOOL b4x8;
407 OMX_BOOL b4x4;
408} OMX_VIDEO_PARAM_VBSMCTYPE;
409
410
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800411/**
412 * H.263 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700413 * performance bounds and different annexes.
414 *
415 * ENUMS:
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800416 * Baseline : Baseline Profile: H.263 (V1), no optional modes
417 * H320 Coding : H.320 Coding Efficiency Backward Compatibility
James Dong334de522012-03-12 12:47:14 -0700418 * Profile: H.263+ (V2), includes annexes I, J, L.4
419 * and T
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800420 * BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
421 * includes annex F
422 * ISWV2 : Interactive Streaming Wireless Profile: H.263+
423 * (V2), includes annexes I, J, K and T
424 * ISWV3 : Interactive Streaming Wireless Profile: H.263++
425 * (V3), includes profile 3 and annexes V and W.6.3.8
426 * HighCompression : Conversational High Compression Profile: H.263++
427 * (V3), includes profiles 1 & 2 and annexes D and U
428 * Internet : Conversational Internet Profile: H.263++ (V3),
429 * includes profile 5 and annex K
430 * Interlace : Conversational Interlace Profile: H.263++ (V3),
431 * includes profile 5 and annex W.6.3.11
432 * HighLatency : High Latency Profile: H.263++ (V3), includes
433 * profile 6 and annexes O.1 and P.5
James Dong334de522012-03-12 12:47:14 -0700434 */
435typedef enum OMX_VIDEO_H263PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800436 OMX_VIDEO_H263ProfileBaseline = 0x01,
437 OMX_VIDEO_H263ProfileH320Coding = 0x02,
438 OMX_VIDEO_H263ProfileBackwardCompatible = 0x04,
439 OMX_VIDEO_H263ProfileISWV2 = 0x08,
440 OMX_VIDEO_H263ProfileISWV3 = 0x10,
441 OMX_VIDEO_H263ProfileHighCompression = 0x20,
442 OMX_VIDEO_H263ProfileInternet = 0x40,
443 OMX_VIDEO_H263ProfileInterlace = 0x80,
444 OMX_VIDEO_H263ProfileHighLatency = 0x100,
445 OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700446 OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800447 OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700448} OMX_VIDEO_H263PROFILETYPE;
449
450
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800451/**
452 * H.263 level types, each level indicates support for various frame sizes,
James Dong334de522012-03-12 12:47:14 -0700453 * bit rates, decoder frame rates.
454 */
455typedef enum OMX_VIDEO_H263LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800456 OMX_VIDEO_H263Level10 = 0x01,
457 OMX_VIDEO_H263Level20 = 0x02,
458 OMX_VIDEO_H263Level30 = 0x04,
459 OMX_VIDEO_H263Level40 = 0x08,
460 OMX_VIDEO_H263Level45 = 0x10,
461 OMX_VIDEO_H263Level50 = 0x20,
462 OMX_VIDEO_H263Level60 = 0x40,
463 OMX_VIDEO_H263Level70 = 0x80,
464 OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700465 OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800466 OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700467} OMX_VIDEO_H263LEVELTYPE;
468
469
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800470/**
471 * Specifies the picture type. These values should be OR'd to signal all
James Dong334de522012-03-12 12:47:14 -0700472 * pictures types which are allowed.
473 *
474 * ENUMS:
475 * Generic Picture Types: I, P and B
476 * H.263 Specific Picture Types: SI and SP
477 * H.264 Specific Picture Types: EI and EP
478 * MPEG-4 Specific Picture Types: S
479 */
480typedef enum OMX_VIDEO_PICTURETYPE {
481 OMX_VIDEO_PictureTypeI = 0x01,
482 OMX_VIDEO_PictureTypeP = 0x02,
483 OMX_VIDEO_PictureTypeB = 0x04,
484 OMX_VIDEO_PictureTypeSI = 0x08,
485 OMX_VIDEO_PictureTypeSP = 0x10,
486 OMX_VIDEO_PictureTypeEI = 0x11,
487 OMX_VIDEO_PictureTypeEP = 0x12,
488 OMX_VIDEO_PictureTypeS = 0x14,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800489 OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700490 OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
491 OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
492} OMX_VIDEO_PICTURETYPE;
493
494
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800495/**
496 * H.263 Params
James Dong334de522012-03-12 12:47:14 -0700497 *
498 * STRUCT MEMBERS:
499 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800500 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700501 * nPortIndex : Port that this structure applies to
502 * nPFrames : Number of P frames between each I frame
503 * nBFrames : Number of B frames between each I frame
504 * eProfile : H.263 profile(s) to use
505 * eLevel : H.263 level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800506 * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE
507 * (specified in the 1998 version of H.263) to
508 * indicate custom picture sizes or clock
509 * frequencies
510 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700511 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800512 * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
513 * not constrained. It is recommended to change
514 * the value of the RTYPE bit for each reference
James Dong334de522012-03-12 12:47:14 -0700515 * picture in error-free communication
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800516 * nPictureHeaderRepetition : Specifies the frequency of picture header
James Dong334de522012-03-12 12:47:14 -0700517 * repetition
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800518 * nGOBHeaderInterval : Specifies the interval of non-empty GOB
James Dong334de522012-03-12 12:47:14 -0700519 * headers in units of GOBs
520 */
521typedef struct OMX_VIDEO_PARAM_H263TYPE {
522 OMX_U32 nSize;
523 OMX_VERSIONTYPE nVersion;
524 OMX_U32 nPortIndex;
525 OMX_U32 nPFrames;
526 OMX_U32 nBFrames;
527 OMX_VIDEO_H263PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800528 OMX_VIDEO_H263LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700529 OMX_BOOL bPLUSPTYPEAllowed;
530 OMX_U32 nAllowedPictureTypes;
531 OMX_BOOL bForceRoundingTypeToZero;
532 OMX_U32 nPictureHeaderRepetition;
533 OMX_U32 nGOBHeaderInterval;
534} OMX_VIDEO_PARAM_H263TYPE;
535
536
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800537/**
538 * MPEG-2 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700539 * performance bounds and different annexes.
540 */
541typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
542 OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */
543 OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */
544 OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */
545 OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */
546 OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */
547 OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800548 OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700549 OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800550 OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700551} OMX_VIDEO_MPEG2PROFILETYPE;
552
553
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800554/**
555 * MPEG-2 level types, each level indicates support for various frame
556 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700557 */
558typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800559 OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */
560 OMX_VIDEO_MPEG2LevelML, /**< Main Level */
561 OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */
562 OMX_VIDEO_MPEG2LevelHL, /**< High Level */
Lajos Molnar9e332ba2016-05-24 07:02:01 -0700563 OMX_VIDEO_MPEG2LevelHP, /**< HighP Level */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800564 OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700565 OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800566 OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700567} OMX_VIDEO_MPEG2LEVELTYPE;
568
569
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800570/**
571 * MPEG-2 params
James Dong334de522012-03-12 12:47:14 -0700572 *
573 * STRUCT MEMBERS:
574 * nSize : Size of the structure in bytes
575 * nVersion : OMX specification version information
576 * nPortIndex : Port that this structure applies to
577 * nPFrames : Number of P frames between each I frame
578 * nBFrames : Number of B frames between each I frame
579 * eProfile : MPEG-2 profile(s) to use
580 * eLevel : MPEG-2 levels(s) to use
581 */
582typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800583 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700584 OMX_VERSIONTYPE nVersion;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800585 OMX_U32 nPortIndex;
586 OMX_U32 nPFrames;
587 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700588 OMX_VIDEO_MPEG2PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800589 OMX_VIDEO_MPEG2LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700590} OMX_VIDEO_PARAM_MPEG2TYPE;
591
592
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800593/**
594 * MPEG-4 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700595 * performance bounds and different annexes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800596 *
James Dong334de522012-03-12 12:47:14 -0700597 * ENUMS:
598 * - Simple Profile, Levels 1-3
599 * - Simple Scalable Profile, Levels 1-2
600 * - Core Profile, Levels 1-2
601 * - Main Profile, Levels 2-4
602 * - N-bit Profile, Level 2
603 * - Scalable Texture Profile, Level 1
604 * - Simple Face Animation Profile, Levels 1-2
605 * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
606 * - Basic Animated Texture Profile, Levels 1-2
607 * - Hybrid Profile, Levels 1-2
608 * - Advanced Real Time Simple Profiles, Levels 1-4
609 * - Core Scalable Profile, Levels 1-3
610 * - Advanced Coding Efficiency Profile, Levels 1-4
611 * - Advanced Core Profile, Levels 1-2
612 * - Advanced Scalable Texture, Levels 2-3
613 */
614typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800615 OMX_VIDEO_MPEG4ProfileSimple = 0x01,
616 OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
617 OMX_VIDEO_MPEG4ProfileCore = 0x04,
618 OMX_VIDEO_MPEG4ProfileMain = 0x08,
619 OMX_VIDEO_MPEG4ProfileNbit = 0x10,
620 OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
621 OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
622 OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
623 OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
624 OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
625 OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
626 OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
627 OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
628 OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
James Dong334de522012-03-12 12:47:14 -0700629 OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
630 OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800631 OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700632 OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800633 OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700634} OMX_VIDEO_MPEG4PROFILETYPE;
635
636
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800637/**
638 * MPEG-4 level types, each level indicates support for various frame
639 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700640 */
641typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800642 OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
643 OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
644 OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
645 OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
646 OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700647 /* normally levels are powers of 2s, but 3b was missed and levels must be properly ordered */
648 OMX_VIDEO_MPEG4Level3b = 0x18, /**< Level 3a */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800649 OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
650 OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
651 OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700652 OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 6 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800653 OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700654 OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800655 OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700656} OMX_VIDEO_MPEG4LEVELTYPE;
657
658
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800659/**
James Dong334de522012-03-12 12:47:14 -0700660 * MPEG-4 configuration. This structure handles configuration options
661 * which are specific to MPEG4 algorithms
662 *
663 * STRUCT MEMBERS:
664 * nSize : Size of the structure in bytes
665 * nVersion : OMX specification version information
666 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800667 * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
James Dong334de522012-03-12 12:47:14 -0700668 * Annex K). Put zero if not used
669 * bSVH : Enable Short Video Header mode
670 * bGov : Flag to enable GOV
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800671 * nPFrames : Number of P frames between each I frame (also called
James Dong334de522012-03-12 12:47:14 -0700672 * GOV period)
673 * nBFrames : Number of B frames between each I frame
674 * nIDCVLCThreshold : Value of intra DC VLC threshold
675 * bACPred : Flag to use ac prediction
676 * nMaxPacketSize : Maximum size of packet in bytes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800677 * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
James Dong334de522012-03-12 12:47:14 -0700678 * Interpreted as described in MPEG4 standard.
679 * eProfile : MPEG-4 profile(s) to use.
680 * eLevel : MPEG-4 level(s) to use.
681 * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
682 * nHeaderExtension : Specifies the number of consecutive video packet
683 * headers within a VOP
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800684 * bReversibleVLC : Specifies whether reversible variable length coding
James Dong334de522012-03-12 12:47:14 -0700685 * is in use
686 */
687typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
688 OMX_U32 nSize;
689 OMX_VERSIONTYPE nVersion;
690 OMX_U32 nPortIndex;
691 OMX_U32 nSliceHeaderSpacing;
692 OMX_BOOL bSVH;
693 OMX_BOOL bGov;
694 OMX_U32 nPFrames;
695 OMX_U32 nBFrames;
696 OMX_U32 nIDCVLCThreshold;
697 OMX_BOOL bACPred;
698 OMX_U32 nMaxPacketSize;
699 OMX_U32 nTimeIncRes;
700 OMX_VIDEO_MPEG4PROFILETYPE eProfile;
701 OMX_VIDEO_MPEG4LEVELTYPE eLevel;
702 OMX_U32 nAllowedPictureTypes;
703 OMX_U32 nHeaderExtension;
704 OMX_BOOL bReversibleVLC;
705} OMX_VIDEO_PARAM_MPEG4TYPE;
706
707
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800708/**
709 * WMV Versions
James Dong334de522012-03-12 12:47:14 -0700710 */
711typedef enum OMX_VIDEO_WMVFORMATTYPE {
712 OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
713 OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
714 OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
715 OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800716 OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700717 OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
718 OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
719} OMX_VIDEO_WMVFORMATTYPE;
720
721
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800722/**
723 * WMV Params
James Dong334de522012-03-12 12:47:14 -0700724 *
725 * STRUCT MEMBERS:
726 * nSize : Size of the structure in bytes
727 * nVersion : OMX specification version information
728 * nPortIndex : Port that this structure applies to
729 * eFormat : Version of WMV stream / data
730 */
731typedef struct OMX_VIDEO_PARAM_WMVTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800732 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700733 OMX_VERSIONTYPE nVersion;
734 OMX_U32 nPortIndex;
735 OMX_VIDEO_WMVFORMATTYPE eFormat;
736} OMX_VIDEO_PARAM_WMVTYPE;
737
738
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800739/**
740 * Real Video Version
James Dong334de522012-03-12 12:47:14 -0700741 */
742typedef enum OMX_VIDEO_RVFORMATTYPE {
743 OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
744 OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
745 OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
746 OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800747 OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700748 OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
749 OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
750} OMX_VIDEO_RVFORMATTYPE;
751
752
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800753/**
754 * Real Video Params
James Dong334de522012-03-12 12:47:14 -0700755 *
756 * STUCT MEMBERS:
757 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800758 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700759 * nPortIndex : Port that this structure applies to
760 * eFormat : Version of RV stream / data
761 * nBitsPerPixel : Bits per pixel coded in the frame
762 * nPaddedWidth : Padded width in pixel of a video frame
763 * nPaddedHeight : Padded Height in pixels of a video frame
764 * nFrameRate : Rate of video in frames per second
765 * nBitstreamFlags : Flags which internal information about the bitstream
766 * nBitstreamVersion : Bitstream version
767 * nMaxEncodeFrameSize: Max encoded frame size
768 * bEnablePostFilter : Turn on/off post filter
769 * bEnableTemporalInterpolation : Turn on/off temporal interpolation
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800770 * bEnableLatencyMode : When enabled, the decoder does not display a decoded
771 * frame until it has detected that no enhancement layer
772 * frames or dependent B frames will be coming. This
773 * detection usually occurs when a subsequent non-B
774 * frame is encountered
James Dong334de522012-03-12 12:47:14 -0700775 */
776typedef struct OMX_VIDEO_PARAM_RVTYPE {
777 OMX_U32 nSize;
778 OMX_VERSIONTYPE nVersion;
779 OMX_U32 nPortIndex;
780 OMX_VIDEO_RVFORMATTYPE eFormat;
781 OMX_U16 nBitsPerPixel;
782 OMX_U16 nPaddedWidth;
783 OMX_U16 nPaddedHeight;
784 OMX_U32 nFrameRate;
785 OMX_U32 nBitstreamFlags;
786 OMX_U32 nBitstreamVersion;
787 OMX_U32 nMaxEncodeFrameSize;
788 OMX_BOOL bEnablePostFilter;
789 OMX_BOOL bEnableTemporalInterpolation;
790 OMX_BOOL bEnableLatencyMode;
791} OMX_VIDEO_PARAM_RVTYPE;
792
793
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800794/**
795 * AVC profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700796 * performance bounds and different annexes.
797 */
798typedef enum OMX_VIDEO_AVCPROFILETYPE {
799 OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
800 OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
801 OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
802 OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
803 OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
804 OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
805 OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800806 OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700807 OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800808 OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700809} OMX_VIDEO_AVCPROFILETYPE;
810
811
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800812/**
813 * AVC level types, each level indicates support for various frame sizes,
814 * bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700815 */
816typedef enum OMX_VIDEO_AVCLEVELTYPE {
817 OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
818 OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
819 OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
820 OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
821 OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
822 OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
823 OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
824 OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
825 OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
826 OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
827 OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
828 OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
829 OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
830 OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
831 OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
832 OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
Lajos Molnarcd57b412014-10-01 21:49:18 -0700833 OMX_VIDEO_AVCLevel52 = 0x10000, /**< Level 5.2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800834 OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700835 OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800836 OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700837} OMX_VIDEO_AVCLEVELTYPE;
838
839
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800840/**
841 * AVC loop filter modes
James Dong334de522012-03-12 12:47:14 -0700842 *
843 * OMX_VIDEO_AVCLoopFilterEnable : Enable
844 * OMX_VIDEO_AVCLoopFilterDisable : Disable
845 * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
846 */
847typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
848 OMX_VIDEO_AVCLoopFilterEnable = 0,
849 OMX_VIDEO_AVCLoopFilterDisable,
850 OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800851 OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700852 OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
853 OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
854} OMX_VIDEO_AVCLOOPFILTERTYPE;
855
856
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800857/**
858 * AVC params
James Dong334de522012-03-12 12:47:14 -0700859 *
860 * STRUCT MEMBERS:
861 * nSize : Size of the structure in bytes
862 * nVersion : OMX specification version information
863 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800864 * nSliceHeaderSpacing : Number of macroblocks between slice header, put
James Dong334de522012-03-12 12:47:14 -0700865 * zero if not used
866 * nPFrames : Number of P frames between each I frame
867 * nBFrames : Number of B frames between each I frame
868 * bUseHadamard : Enable/disable Hadamard transform
869 * nRefFrames : Max number of reference frames to use for inter
870 * motion search (1-16)
871 * nRefIdxTrailing : Pic param set ref frame index (index into ref
872 * frame buffer of trailing frames list), B frame
873 * support
874 * nRefIdxForward : Pic param set ref frame index (index into ref
875 * frame buffer of forward frames list), B frame
876 * support
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800877 * bEnableUEP : Enable/disable unequal error protection. This
James Dong334de522012-03-12 12:47:14 -0700878 * is only valid of data partitioning is enabled.
879 * bEnableFMO : Enable/disable flexible macroblock ordering
880 * bEnableASO : Enable/disable arbitrary slice ordering
881 * bEnableRS : Enable/disable sending of redundant slices
882 * eProfile : AVC profile(s) to use
883 * eLevel : AVC level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800884 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700885 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800886 * bFrameMBsOnly : specifies that every coded picture of the
887 * coded video sequence is a coded frame
James Dong334de522012-03-12 12:47:14 -0700888 * containing only frame macroblocks
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800889 * bMBAFF : Enable/disable switching between frame and
James Dong334de522012-03-12 12:47:14 -0700890 * field macroblocks within a picture
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800891 * bEntropyCodingCABAC : Entropy decoding method to be applied for the
892 * syntax elements for which two descriptors appear
James Dong334de522012-03-12 12:47:14 -0700893 * in the syntax tables
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800894 * bWeightedPPrediction : Enable/disable weighted prediction shall not
James Dong334de522012-03-12 12:47:14 -0700895 * be applied to P and SP slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800896 * nWeightedBipredicitonMode : Default weighted prediction is applied to B
897 * slices
James Dong334de522012-03-12 12:47:14 -0700898 * bconstIpred : Enable/disable intra prediction
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800899 * bDirect8x8Inference : Specifies the method used in the derivation
900 * process for luma motion vectors for B_Skip,
901 * B_Direct_16x16 and B_Direct_8x8 as specified
902 * in subclause 8.4.1.2 of the AVC spec
James Dong334de522012-03-12 12:47:14 -0700903 * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800904 * mode used in B slice coding (related to
905 * bDirect8x8Inference) . Spatial direct mode is
James Dong334de522012-03-12 12:47:14 -0700906 * more common and should be the default.
907 * nCabacInitIdx : Index used to init CABAC contexts
908 * eLoopFilterMode : Enable/disable loop filter
909 */
910typedef struct OMX_VIDEO_PARAM_AVCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800911 OMX_U32 nSize;
912 OMX_VERSIONTYPE nVersion;
913 OMX_U32 nPortIndex;
914 OMX_U32 nSliceHeaderSpacing;
915 OMX_U32 nPFrames;
916 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700917 OMX_BOOL bUseHadamard;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800918 OMX_U32 nRefFrames;
919 OMX_U32 nRefIdx10ActiveMinus1;
920 OMX_U32 nRefIdx11ActiveMinus1;
921 OMX_BOOL bEnableUEP;
922 OMX_BOOL bEnableFMO;
923 OMX_BOOL bEnableASO;
924 OMX_BOOL bEnableRS;
James Dong334de522012-03-12 12:47:14 -0700925 OMX_VIDEO_AVCPROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800926 OMX_VIDEO_AVCLEVELTYPE eLevel;
927 OMX_U32 nAllowedPictureTypes;
928 OMX_BOOL bFrameMBsOnly;
929 OMX_BOOL bMBAFF;
930 OMX_BOOL bEntropyCodingCABAC;
931 OMX_BOOL bWeightedPPrediction;
932 OMX_U32 nWeightedBipredicitonMode;
James Dong334de522012-03-12 12:47:14 -0700933 OMX_BOOL bconstIpred ;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800934 OMX_BOOL bDirect8x8Inference;
935 OMX_BOOL bDirectSpatialTemporal;
936 OMX_U32 nCabacInitIdc;
937 OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
James Dong334de522012-03-12 12:47:14 -0700938} OMX_VIDEO_PARAM_AVCTYPE;
939
940typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800941 OMX_U32 nSize;
942 OMX_VERSIONTYPE nVersion;
943 OMX_U32 nPortIndex;
944 OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
James Dong334de522012-03-12 12:47:14 -0700945 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800946 OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
James Dong334de522012-03-12 12:47:14 -0700947 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
948 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800949 This parameter is valid only for
James Dong334de522012-03-12 12:47:14 -0700950 OMX_IndexParamVideoProfileLevelQuerySupported index,
951 For all other indices this parameter is to be ignored. */
952} OMX_VIDEO_PARAM_PROFILELEVELTYPE;
953
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800954/**
955 * Structure for dynamically configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700956 *
957 * STRUCT MEMBERS:
958 * nSize : Size of the struct in bytes
959 * nVersion : OMX spec version info
960 * nPortIndex : Port that this struct applies to
961 * nEncodeBitrate : Target average bitrate to be generated in bps
962 */
963typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800964 OMX_U32 nSize;
965 OMX_VERSIONTYPE nVersion;
966 OMX_U32 nPortIndex;
967 OMX_U32 nEncodeBitrate;
James Dong334de522012-03-12 12:47:14 -0700968} OMX_VIDEO_CONFIG_BITRATETYPE;
969
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800970/**
James Dong334de522012-03-12 12:47:14 -0700971 * Defines Encoder Frame Rate setting
972 *
973 * STRUCT MEMBERS:
974 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800975 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700976 * nPortIndex : Port that this structure applies to
977 * xEncodeFramerate : Encoding framerate represented in Q16 format
978 */
979typedef struct OMX_CONFIG_FRAMERATETYPE {
980 OMX_U32 nSize;
981 OMX_VERSIONTYPE nVersion;
982 OMX_U32 nPortIndex;
983 OMX_U32 xEncodeFramerate; /* Q16 format */
984} OMX_CONFIG_FRAMERATETYPE;
985
986typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
987 OMX_U32 nSize;
988 OMX_VERSIONTYPE nVersion;
989 OMX_U32 nPortIndex;
990 OMX_BOOL IntraRefreshVOP;
991} OMX_CONFIG_INTRAREFRESHVOPTYPE;
992
993typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
994 OMX_U32 nSize;
995 OMX_VERSIONTYPE nVersion;
996 OMX_U32 nPortIndex;
997 OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
998 OMX_U8 ErrMap[1]; /* Error map hint */
999} OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
1000
1001typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
1002 OMX_U32 nSize;
1003 OMX_VERSIONTYPE nVersion;
1004 OMX_U32 nPortIndex;
1005 OMX_BOOL bEnabled;
1006} OMX_CONFIG_MBERRORREPORTINGTYPE;
1007
1008typedef struct OMX_PARAM_MACROBLOCKSTYPE {
1009 OMX_U32 nSize;
1010 OMX_VERSIONTYPE nVersion;
1011 OMX_U32 nPortIndex;
1012 OMX_U32 nMacroblocks;
1013} OMX_PARAM_MACROBLOCKSTYPE;
1014
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001015/**
1016 * AVC Slice Mode modes
James Dong334de522012-03-12 12:47:14 -07001017 *
1018 * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
1019 * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
1020 * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
1021 */
1022typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
1023 OMX_VIDEO_SLICEMODE_AVCDefault = 0,
1024 OMX_VIDEO_SLICEMODE_AVCMBSlice,
1025 OMX_VIDEO_SLICEMODE_AVCByteSlice,
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001026 OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001027 OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1028 OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
1029} OMX_VIDEO_AVCSLICEMODETYPE;
1030
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001031/**
1032 * AVC FMO Slice Mode Params
James Dong334de522012-03-12 12:47:14 -07001033 *
1034 * STRUCT MEMBERS:
1035 * nSize : Size of the structure in bytes
1036 * nVersion : OMX specification version information
1037 * nPortIndex : Port that this structure applies to
1038 * nNumSliceGroups : Specifies the number of slice groups
1039 * nSliceGroupMapType : Specifies the type of slice groups
1040 * eSliceMode : Specifies the type of slice
1041 */
1042typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001043 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001044 OMX_VERSIONTYPE nVersion;
1045 OMX_U32 nPortIndex;
1046 OMX_U8 nNumSliceGroups;
1047 OMX_U8 nSliceGroupMapType;
1048 OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1049} OMX_VIDEO_PARAM_AVCSLICEFMO;
1050
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001051/**
James Dong334de522012-03-12 12:47:14 -07001052 * AVC IDR Period Configs
1053 *
1054 * STRUCT MEMBERS:
1055 * nSize : Size of the structure in bytes
1056 * nVersion : OMX specification version information
1057 * nPortIndex : Port that this structure applies to
1058 * nIDRPeriod : Specifies periodicity of IDR frames
1059 * nPFrames : Specifies internal of coding Intra frames
1060 */
1061typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001062 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001063 OMX_VERSIONTYPE nVersion;
1064 OMX_U32 nPortIndex;
1065 OMX_U32 nIDRPeriod;
1066 OMX_U32 nPFrames;
1067} OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1068
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001069/**
James Dong334de522012-03-12 12:47:14 -07001070 * AVC NAL Size Configs
1071 *
1072 * STRUCT MEMBERS:
1073 * nSize : Size of the structure in bytes
1074 * nVersion : OMX specification version information
1075 * nPortIndex : Port that this structure applies to
1076 * nNaluBytes : Specifies the NAL unit size
1077 */
1078typedef struct OMX_VIDEO_CONFIG_NALSIZE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001079 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001080 OMX_VERSIONTYPE nVersion;
1081 OMX_U32 nPortIndex;
1082 OMX_U32 nNaluBytes;
1083} OMX_VIDEO_CONFIG_NALSIZE;
1084
1085/** @} */
1086
1087#ifdef __cplusplus
1088}
1089#endif /* __cplusplus */
1090
1091#endif
1092/* File EOF */
1093