blob: acdb7e80d082950fcac6ccfdf561e301ad5a9bb5 [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,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800243 OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700244 OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
245 OMX_Video_ControlRateMax = 0x7FFFFFFF
246} OMX_VIDEO_CONTROLRATETYPE;
247
248
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800249/**
250 * Structure for configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700251 *
252 * STRUCT MEMBERS:
253 * nSize : Size of the struct in bytes
254 * nVersion : OMX spec version info
255 * nPortIndex : Port that this struct applies to
256 * eControlRate : Control rate type enum
257 * nTargetBitrate : Target bitrate to encode with
258 */
259typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800260 OMX_U32 nSize;
261 OMX_VERSIONTYPE nVersion;
262 OMX_U32 nPortIndex;
263 OMX_VIDEO_CONTROLRATETYPE eControlRate;
264 OMX_U32 nTargetBitrate;
James Dong334de522012-03-12 12:47:14 -0700265} OMX_VIDEO_PARAM_BITRATETYPE;
266
267
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800268/**
269 * Enumeration of possible motion vector (MV) types
James Dong334de522012-03-12 12:47:14 -0700270 */
271typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
272 OMX_Video_MotionVectorPixel,
273 OMX_Video_MotionVectorHalfPel,
274 OMX_Video_MotionVectorQuarterPel,
275 OMX_Video_MotionVectorEighthPel,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800276 OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700277 OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
278 OMX_Video_MotionVectorMax = 0x7FFFFFFF
279} OMX_VIDEO_MOTIONVECTORTYPE;
280
281
282/**
283 * Structure for configuring the number of motion vectors used as well
284 * as their accuracy.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800285 *
James Dong334de522012-03-12 12:47:14 -0700286 * STRUCT MEMBERS:
287 * nSize : Size of the struct in bytes
288 * nVersion : OMX spec version info
289 * nPortIndex : port that this structure applies to
290 * eAccuracy : Enumerated MV accuracy
291 * bUnrestrictedMVs : Allow unrestricted MVs
292 * bFourMV : Allow use of 4 MVs
293 * sXSearchRange : Search range in horizontal direction for MVs
294 * sYSearchRange : Search range in vertical direction for MVs
295 */
296typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
297 OMX_U32 nSize;
298 OMX_VERSIONTYPE nVersion;
299 OMX_U32 nPortIndex;
300 OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
301 OMX_BOOL bUnrestrictedMVs;
302 OMX_BOOL bFourMV;
303 OMX_S32 sXSearchRange;
304 OMX_S32 sYSearchRange;
305} OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
306
307
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800308/**
309 * Enumeration of possible methods to use for Intra Refresh
James Dong334de522012-03-12 12:47:14 -0700310 */
311typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
312 OMX_VIDEO_IntraRefreshCyclic,
313 OMX_VIDEO_IntraRefreshAdaptive,
314 OMX_VIDEO_IntraRefreshBoth,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800315 OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700316 OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
317 OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
318} OMX_VIDEO_INTRAREFRESHTYPE;
319
320
321/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800322 * Structure for configuring intra refresh mode
323 *
James Dong334de522012-03-12 12:47:14 -0700324 * STRUCT MEMBERS:
325 * nSize : Size of the structure in bytes
326 * nVersion : OMX specification version information
327 * nPortIndex : Port that this structure applies to
328 * eRefreshMode : Cyclic, Adaptive, or Both
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800329 * nAirMBs : Number of intra macroblocks to refresh in a frame when
James Dong334de522012-03-12 12:47:14 -0700330 * AIR is enabled
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800331 * nAirRef : Number of times a motion marked macroblock has to be
James Dong334de522012-03-12 12:47:14 -0700332 * intra coded
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800333 * nCirMBs : Number of consecutive macroblocks to be coded as "intra"
James Dong334de522012-03-12 12:47:14 -0700334 * when CIR is enabled
335 */
336typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
337 OMX_U32 nSize;
338 OMX_VERSIONTYPE nVersion;
339 OMX_U32 nPortIndex;
340 OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
341 OMX_U32 nAirMBs;
342 OMX_U32 nAirRef;
343 OMX_U32 nCirMBs;
344} OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
345
346
347/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800348 * Structure for enabling various error correction methods for video
James Dong334de522012-03-12 12:47:14 -0700349 * compression.
350 *
351 * STRUCT MEMBERS:
352 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800353 * nVersion : OMX specification version information
354 * nPortIndex : Port that this structure applies to
James Dong334de522012-03-12 12:47:14 -0700355 * bEnableHEC : Enable/disable header extension codes (HEC)
356 * bEnableResync : Enable/disable resynchronization markers
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800357 * nResynchMarkerSpacing : Resynch markers interval (in bits) to be
358 * applied in the stream
359 * bEnableDataPartitioning : Enable/disable data partitioning
360 * bEnableRVLC : Enable/disable reversible variable length
James Dong334de522012-03-12 12:47:14 -0700361 * coding
362 */
363typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
364 OMX_U32 nSize;
365 OMX_VERSIONTYPE nVersion;
366 OMX_U32 nPortIndex;
367 OMX_BOOL bEnableHEC;
368 OMX_BOOL bEnableResync;
369 OMX_U32 nResynchMarkerSpacing;
370 OMX_BOOL bEnableDataPartitioning;
371 OMX_BOOL bEnableRVLC;
372} OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
373
374
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800375/**
376 * Configuration of variable block-size motion compensation (VBSMC)
377 *
James Dong334de522012-03-12 12:47:14 -0700378 * STRUCT MEMBERS:
379 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800380 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700381 * nPortIndex : Port that this structure applies to
382 * b16x16 : Enable inter block search 16x16
383 * b16x8 : Enable inter block search 16x8
384 * b8x16 : Enable inter block search 8x16
385 * b8x8 : Enable inter block search 8x8
386 * b8x4 : Enable inter block search 8x4
387 * b4x8 : Enable inter block search 4x8
388 * b4x4 : Enable inter block search 4x4
389 */
390typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800391 OMX_U32 nSize;
392 OMX_VERSIONTYPE nVersion;
393 OMX_U32 nPortIndex;
394 OMX_BOOL b16x16;
395 OMX_BOOL b16x8;
James Dong334de522012-03-12 12:47:14 -0700396 OMX_BOOL b8x16;
397 OMX_BOOL b8x8;
398 OMX_BOOL b8x4;
399 OMX_BOOL b4x8;
400 OMX_BOOL b4x4;
401} OMX_VIDEO_PARAM_VBSMCTYPE;
402
403
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800404/**
405 * H.263 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700406 * performance bounds and different annexes.
407 *
408 * ENUMS:
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800409 * Baseline : Baseline Profile: H.263 (V1), no optional modes
410 * H320 Coding : H.320 Coding Efficiency Backward Compatibility
James Dong334de522012-03-12 12:47:14 -0700411 * Profile: H.263+ (V2), includes annexes I, J, L.4
412 * and T
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800413 * BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
414 * includes annex F
415 * ISWV2 : Interactive Streaming Wireless Profile: H.263+
416 * (V2), includes annexes I, J, K and T
417 * ISWV3 : Interactive Streaming Wireless Profile: H.263++
418 * (V3), includes profile 3 and annexes V and W.6.3.8
419 * HighCompression : Conversational High Compression Profile: H.263++
420 * (V3), includes profiles 1 & 2 and annexes D and U
421 * Internet : Conversational Internet Profile: H.263++ (V3),
422 * includes profile 5 and annex K
423 * Interlace : Conversational Interlace Profile: H.263++ (V3),
424 * includes profile 5 and annex W.6.3.11
425 * HighLatency : High Latency Profile: H.263++ (V3), includes
426 * profile 6 and annexes O.1 and P.5
James Dong334de522012-03-12 12:47:14 -0700427 */
428typedef enum OMX_VIDEO_H263PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800429 OMX_VIDEO_H263ProfileBaseline = 0x01,
430 OMX_VIDEO_H263ProfileH320Coding = 0x02,
431 OMX_VIDEO_H263ProfileBackwardCompatible = 0x04,
432 OMX_VIDEO_H263ProfileISWV2 = 0x08,
433 OMX_VIDEO_H263ProfileISWV3 = 0x10,
434 OMX_VIDEO_H263ProfileHighCompression = 0x20,
435 OMX_VIDEO_H263ProfileInternet = 0x40,
436 OMX_VIDEO_H263ProfileInterlace = 0x80,
437 OMX_VIDEO_H263ProfileHighLatency = 0x100,
438 OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700439 OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800440 OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700441} OMX_VIDEO_H263PROFILETYPE;
442
443
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800444/**
445 * H.263 level types, each level indicates support for various frame sizes,
James Dong334de522012-03-12 12:47:14 -0700446 * bit rates, decoder frame rates.
447 */
448typedef enum OMX_VIDEO_H263LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800449 OMX_VIDEO_H263Level10 = 0x01,
450 OMX_VIDEO_H263Level20 = 0x02,
451 OMX_VIDEO_H263Level30 = 0x04,
452 OMX_VIDEO_H263Level40 = 0x08,
453 OMX_VIDEO_H263Level45 = 0x10,
454 OMX_VIDEO_H263Level50 = 0x20,
455 OMX_VIDEO_H263Level60 = 0x40,
456 OMX_VIDEO_H263Level70 = 0x80,
457 OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700458 OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800459 OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700460} OMX_VIDEO_H263LEVELTYPE;
461
462
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800463/**
464 * Specifies the picture type. These values should be OR'd to signal all
James Dong334de522012-03-12 12:47:14 -0700465 * pictures types which are allowed.
466 *
467 * ENUMS:
468 * Generic Picture Types: I, P and B
469 * H.263 Specific Picture Types: SI and SP
470 * H.264 Specific Picture Types: EI and EP
471 * MPEG-4 Specific Picture Types: S
472 */
473typedef enum OMX_VIDEO_PICTURETYPE {
474 OMX_VIDEO_PictureTypeI = 0x01,
475 OMX_VIDEO_PictureTypeP = 0x02,
476 OMX_VIDEO_PictureTypeB = 0x04,
477 OMX_VIDEO_PictureTypeSI = 0x08,
478 OMX_VIDEO_PictureTypeSP = 0x10,
479 OMX_VIDEO_PictureTypeEI = 0x11,
480 OMX_VIDEO_PictureTypeEP = 0x12,
481 OMX_VIDEO_PictureTypeS = 0x14,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800482 OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700483 OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
484 OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
485} OMX_VIDEO_PICTURETYPE;
486
487
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800488/**
489 * H.263 Params
James Dong334de522012-03-12 12:47:14 -0700490 *
491 * STRUCT MEMBERS:
492 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800493 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700494 * nPortIndex : Port that this structure applies to
495 * nPFrames : Number of P frames between each I frame
496 * nBFrames : Number of B frames between each I frame
497 * eProfile : H.263 profile(s) to use
498 * eLevel : H.263 level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800499 * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE
500 * (specified in the 1998 version of H.263) to
501 * indicate custom picture sizes or clock
502 * frequencies
503 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700504 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800505 * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
506 * not constrained. It is recommended to change
507 * the value of the RTYPE bit for each reference
James Dong334de522012-03-12 12:47:14 -0700508 * picture in error-free communication
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800509 * nPictureHeaderRepetition : Specifies the frequency of picture header
James Dong334de522012-03-12 12:47:14 -0700510 * repetition
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800511 * nGOBHeaderInterval : Specifies the interval of non-empty GOB
James Dong334de522012-03-12 12:47:14 -0700512 * headers in units of GOBs
513 */
514typedef struct OMX_VIDEO_PARAM_H263TYPE {
515 OMX_U32 nSize;
516 OMX_VERSIONTYPE nVersion;
517 OMX_U32 nPortIndex;
518 OMX_U32 nPFrames;
519 OMX_U32 nBFrames;
520 OMX_VIDEO_H263PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800521 OMX_VIDEO_H263LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700522 OMX_BOOL bPLUSPTYPEAllowed;
523 OMX_U32 nAllowedPictureTypes;
524 OMX_BOOL bForceRoundingTypeToZero;
525 OMX_U32 nPictureHeaderRepetition;
526 OMX_U32 nGOBHeaderInterval;
527} OMX_VIDEO_PARAM_H263TYPE;
528
529
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800530/**
531 * MPEG-2 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700532 * performance bounds and different annexes.
533 */
534typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
535 OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */
536 OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */
537 OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */
538 OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */
539 OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */
540 OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800541 OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700542 OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800543 OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700544} OMX_VIDEO_MPEG2PROFILETYPE;
545
546
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800547/**
548 * MPEG-2 level types, each level indicates support for various frame
549 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700550 */
551typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800552 OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */
553 OMX_VIDEO_MPEG2LevelML, /**< Main Level */
554 OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */
555 OMX_VIDEO_MPEG2LevelHL, /**< High Level */
556 OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700557 OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800558 OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700559} OMX_VIDEO_MPEG2LEVELTYPE;
560
561
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800562/**
563 * MPEG-2 params
James Dong334de522012-03-12 12:47:14 -0700564 *
565 * STRUCT MEMBERS:
566 * nSize : Size of the structure in bytes
567 * nVersion : OMX specification version information
568 * nPortIndex : Port that this structure applies to
569 * nPFrames : Number of P frames between each I frame
570 * nBFrames : Number of B frames between each I frame
571 * eProfile : MPEG-2 profile(s) to use
572 * eLevel : MPEG-2 levels(s) to use
573 */
574typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800575 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700576 OMX_VERSIONTYPE nVersion;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800577 OMX_U32 nPortIndex;
578 OMX_U32 nPFrames;
579 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700580 OMX_VIDEO_MPEG2PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800581 OMX_VIDEO_MPEG2LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700582} OMX_VIDEO_PARAM_MPEG2TYPE;
583
584
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800585/**
586 * MPEG-4 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700587 * performance bounds and different annexes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800588 *
James Dong334de522012-03-12 12:47:14 -0700589 * ENUMS:
590 * - Simple Profile, Levels 1-3
591 * - Simple Scalable Profile, Levels 1-2
592 * - Core Profile, Levels 1-2
593 * - Main Profile, Levels 2-4
594 * - N-bit Profile, Level 2
595 * - Scalable Texture Profile, Level 1
596 * - Simple Face Animation Profile, Levels 1-2
597 * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
598 * - Basic Animated Texture Profile, Levels 1-2
599 * - Hybrid Profile, Levels 1-2
600 * - Advanced Real Time Simple Profiles, Levels 1-4
601 * - Core Scalable Profile, Levels 1-3
602 * - Advanced Coding Efficiency Profile, Levels 1-4
603 * - Advanced Core Profile, Levels 1-2
604 * - Advanced Scalable Texture, Levels 2-3
605 */
606typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800607 OMX_VIDEO_MPEG4ProfileSimple = 0x01,
608 OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
609 OMX_VIDEO_MPEG4ProfileCore = 0x04,
610 OMX_VIDEO_MPEG4ProfileMain = 0x08,
611 OMX_VIDEO_MPEG4ProfileNbit = 0x10,
612 OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
613 OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
614 OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
615 OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
616 OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
617 OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
618 OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
619 OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
620 OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
James Dong334de522012-03-12 12:47:14 -0700621 OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
622 OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800623 OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700624 OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800625 OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700626} OMX_VIDEO_MPEG4PROFILETYPE;
627
628
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800629/**
630 * MPEG-4 level types, each level indicates support for various frame
631 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700632 */
633typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800634 OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
635 OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
636 OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
637 OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
638 OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700639 /* normally levels are powers of 2s, but 3b was missed and levels must be properly ordered */
640 OMX_VIDEO_MPEG4Level3b = 0x18, /**< Level 3a */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800641 OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
642 OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
643 OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700644 OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 6 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800645 OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700646 OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800647 OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700648} OMX_VIDEO_MPEG4LEVELTYPE;
649
650
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800651/**
James Dong334de522012-03-12 12:47:14 -0700652 * MPEG-4 configuration. This structure handles configuration options
653 * which are specific to MPEG4 algorithms
654 *
655 * STRUCT MEMBERS:
656 * nSize : Size of the structure in bytes
657 * nVersion : OMX specification version information
658 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800659 * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
James Dong334de522012-03-12 12:47:14 -0700660 * Annex K). Put zero if not used
661 * bSVH : Enable Short Video Header mode
662 * bGov : Flag to enable GOV
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800663 * nPFrames : Number of P frames between each I frame (also called
James Dong334de522012-03-12 12:47:14 -0700664 * GOV period)
665 * nBFrames : Number of B frames between each I frame
666 * nIDCVLCThreshold : Value of intra DC VLC threshold
667 * bACPred : Flag to use ac prediction
668 * nMaxPacketSize : Maximum size of packet in bytes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800669 * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
James Dong334de522012-03-12 12:47:14 -0700670 * Interpreted as described in MPEG4 standard.
671 * eProfile : MPEG-4 profile(s) to use.
672 * eLevel : MPEG-4 level(s) to use.
673 * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
674 * nHeaderExtension : Specifies the number of consecutive video packet
675 * headers within a VOP
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800676 * bReversibleVLC : Specifies whether reversible variable length coding
James Dong334de522012-03-12 12:47:14 -0700677 * is in use
678 */
679typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
680 OMX_U32 nSize;
681 OMX_VERSIONTYPE nVersion;
682 OMX_U32 nPortIndex;
683 OMX_U32 nSliceHeaderSpacing;
684 OMX_BOOL bSVH;
685 OMX_BOOL bGov;
686 OMX_U32 nPFrames;
687 OMX_U32 nBFrames;
688 OMX_U32 nIDCVLCThreshold;
689 OMX_BOOL bACPred;
690 OMX_U32 nMaxPacketSize;
691 OMX_U32 nTimeIncRes;
692 OMX_VIDEO_MPEG4PROFILETYPE eProfile;
693 OMX_VIDEO_MPEG4LEVELTYPE eLevel;
694 OMX_U32 nAllowedPictureTypes;
695 OMX_U32 nHeaderExtension;
696 OMX_BOOL bReversibleVLC;
697} OMX_VIDEO_PARAM_MPEG4TYPE;
698
699
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800700/**
701 * WMV Versions
James Dong334de522012-03-12 12:47:14 -0700702 */
703typedef enum OMX_VIDEO_WMVFORMATTYPE {
704 OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
705 OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
706 OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
707 OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800708 OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700709 OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
710 OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
711} OMX_VIDEO_WMVFORMATTYPE;
712
713
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800714/**
715 * WMV Params
James Dong334de522012-03-12 12:47:14 -0700716 *
717 * STRUCT MEMBERS:
718 * nSize : Size of the structure in bytes
719 * nVersion : OMX specification version information
720 * nPortIndex : Port that this structure applies to
721 * eFormat : Version of WMV stream / data
722 */
723typedef struct OMX_VIDEO_PARAM_WMVTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800724 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700725 OMX_VERSIONTYPE nVersion;
726 OMX_U32 nPortIndex;
727 OMX_VIDEO_WMVFORMATTYPE eFormat;
728} OMX_VIDEO_PARAM_WMVTYPE;
729
730
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800731/**
732 * Real Video Version
James Dong334de522012-03-12 12:47:14 -0700733 */
734typedef enum OMX_VIDEO_RVFORMATTYPE {
735 OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
736 OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
737 OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
738 OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800739 OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700740 OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
741 OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
742} OMX_VIDEO_RVFORMATTYPE;
743
744
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800745/**
746 * Real Video Params
James Dong334de522012-03-12 12:47:14 -0700747 *
748 * STUCT MEMBERS:
749 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800750 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700751 * nPortIndex : Port that this structure applies to
752 * eFormat : Version of RV stream / data
753 * nBitsPerPixel : Bits per pixel coded in the frame
754 * nPaddedWidth : Padded width in pixel of a video frame
755 * nPaddedHeight : Padded Height in pixels of a video frame
756 * nFrameRate : Rate of video in frames per second
757 * nBitstreamFlags : Flags which internal information about the bitstream
758 * nBitstreamVersion : Bitstream version
759 * nMaxEncodeFrameSize: Max encoded frame size
760 * bEnablePostFilter : Turn on/off post filter
761 * bEnableTemporalInterpolation : Turn on/off temporal interpolation
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800762 * bEnableLatencyMode : When enabled, the decoder does not display a decoded
763 * frame until it has detected that no enhancement layer
764 * frames or dependent B frames will be coming. This
765 * detection usually occurs when a subsequent non-B
766 * frame is encountered
James Dong334de522012-03-12 12:47:14 -0700767 */
768typedef struct OMX_VIDEO_PARAM_RVTYPE {
769 OMX_U32 nSize;
770 OMX_VERSIONTYPE nVersion;
771 OMX_U32 nPortIndex;
772 OMX_VIDEO_RVFORMATTYPE eFormat;
773 OMX_U16 nBitsPerPixel;
774 OMX_U16 nPaddedWidth;
775 OMX_U16 nPaddedHeight;
776 OMX_U32 nFrameRate;
777 OMX_U32 nBitstreamFlags;
778 OMX_U32 nBitstreamVersion;
779 OMX_U32 nMaxEncodeFrameSize;
780 OMX_BOOL bEnablePostFilter;
781 OMX_BOOL bEnableTemporalInterpolation;
782 OMX_BOOL bEnableLatencyMode;
783} OMX_VIDEO_PARAM_RVTYPE;
784
785
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800786/**
787 * AVC profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700788 * performance bounds and different annexes.
789 */
790typedef enum OMX_VIDEO_AVCPROFILETYPE {
791 OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
792 OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
793 OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
794 OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
795 OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
796 OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
797 OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800798 OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700799 OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800800 OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700801} OMX_VIDEO_AVCPROFILETYPE;
802
803
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800804/**
805 * AVC level types, each level indicates support for various frame sizes,
806 * bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700807 */
808typedef enum OMX_VIDEO_AVCLEVELTYPE {
809 OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
810 OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
811 OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
812 OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
813 OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
814 OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
815 OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
816 OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
817 OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
818 OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
819 OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
820 OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
821 OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
822 OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
823 OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
824 OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
Lajos Molnarcd57b412014-10-01 21:49:18 -0700825 OMX_VIDEO_AVCLevel52 = 0x10000, /**< Level 5.2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800826 OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700827 OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800828 OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700829} OMX_VIDEO_AVCLEVELTYPE;
830
831
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800832/**
833 * AVC loop filter modes
James Dong334de522012-03-12 12:47:14 -0700834 *
835 * OMX_VIDEO_AVCLoopFilterEnable : Enable
836 * OMX_VIDEO_AVCLoopFilterDisable : Disable
837 * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
838 */
839typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
840 OMX_VIDEO_AVCLoopFilterEnable = 0,
841 OMX_VIDEO_AVCLoopFilterDisable,
842 OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800843 OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700844 OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
845 OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
846} OMX_VIDEO_AVCLOOPFILTERTYPE;
847
848
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800849/**
850 * AVC params
James Dong334de522012-03-12 12:47:14 -0700851 *
852 * STRUCT MEMBERS:
853 * nSize : Size of the structure in bytes
854 * nVersion : OMX specification version information
855 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800856 * nSliceHeaderSpacing : Number of macroblocks between slice header, put
James Dong334de522012-03-12 12:47:14 -0700857 * zero if not used
858 * nPFrames : Number of P frames between each I frame
859 * nBFrames : Number of B frames between each I frame
860 * bUseHadamard : Enable/disable Hadamard transform
861 * nRefFrames : Max number of reference frames to use for inter
862 * motion search (1-16)
863 * nRefIdxTrailing : Pic param set ref frame index (index into ref
864 * frame buffer of trailing frames list), B frame
865 * support
866 * nRefIdxForward : Pic param set ref frame index (index into ref
867 * frame buffer of forward frames list), B frame
868 * support
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800869 * bEnableUEP : Enable/disable unequal error protection. This
James Dong334de522012-03-12 12:47:14 -0700870 * is only valid of data partitioning is enabled.
871 * bEnableFMO : Enable/disable flexible macroblock ordering
872 * bEnableASO : Enable/disable arbitrary slice ordering
873 * bEnableRS : Enable/disable sending of redundant slices
874 * eProfile : AVC profile(s) to use
875 * eLevel : AVC level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800876 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700877 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800878 * bFrameMBsOnly : specifies that every coded picture of the
879 * coded video sequence is a coded frame
James Dong334de522012-03-12 12:47:14 -0700880 * containing only frame macroblocks
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800881 * bMBAFF : Enable/disable switching between frame and
James Dong334de522012-03-12 12:47:14 -0700882 * field macroblocks within a picture
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800883 * bEntropyCodingCABAC : Entropy decoding method to be applied for the
884 * syntax elements for which two descriptors appear
James Dong334de522012-03-12 12:47:14 -0700885 * in the syntax tables
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800886 * bWeightedPPrediction : Enable/disable weighted prediction shall not
James Dong334de522012-03-12 12:47:14 -0700887 * be applied to P and SP slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800888 * nWeightedBipredicitonMode : Default weighted prediction is applied to B
889 * slices
James Dong334de522012-03-12 12:47:14 -0700890 * bconstIpred : Enable/disable intra prediction
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800891 * bDirect8x8Inference : Specifies the method used in the derivation
892 * process for luma motion vectors for B_Skip,
893 * B_Direct_16x16 and B_Direct_8x8 as specified
894 * in subclause 8.4.1.2 of the AVC spec
James Dong334de522012-03-12 12:47:14 -0700895 * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800896 * mode used in B slice coding (related to
897 * bDirect8x8Inference) . Spatial direct mode is
James Dong334de522012-03-12 12:47:14 -0700898 * more common and should be the default.
899 * nCabacInitIdx : Index used to init CABAC contexts
900 * eLoopFilterMode : Enable/disable loop filter
901 */
902typedef struct OMX_VIDEO_PARAM_AVCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800903 OMX_U32 nSize;
904 OMX_VERSIONTYPE nVersion;
905 OMX_U32 nPortIndex;
906 OMX_U32 nSliceHeaderSpacing;
907 OMX_U32 nPFrames;
908 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700909 OMX_BOOL bUseHadamard;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800910 OMX_U32 nRefFrames;
911 OMX_U32 nRefIdx10ActiveMinus1;
912 OMX_U32 nRefIdx11ActiveMinus1;
913 OMX_BOOL bEnableUEP;
914 OMX_BOOL bEnableFMO;
915 OMX_BOOL bEnableASO;
916 OMX_BOOL bEnableRS;
James Dong334de522012-03-12 12:47:14 -0700917 OMX_VIDEO_AVCPROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800918 OMX_VIDEO_AVCLEVELTYPE eLevel;
919 OMX_U32 nAllowedPictureTypes;
920 OMX_BOOL bFrameMBsOnly;
921 OMX_BOOL bMBAFF;
922 OMX_BOOL bEntropyCodingCABAC;
923 OMX_BOOL bWeightedPPrediction;
924 OMX_U32 nWeightedBipredicitonMode;
James Dong334de522012-03-12 12:47:14 -0700925 OMX_BOOL bconstIpred ;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800926 OMX_BOOL bDirect8x8Inference;
927 OMX_BOOL bDirectSpatialTemporal;
928 OMX_U32 nCabacInitIdc;
929 OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
James Dong334de522012-03-12 12:47:14 -0700930} OMX_VIDEO_PARAM_AVCTYPE;
931
932typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800933 OMX_U32 nSize;
934 OMX_VERSIONTYPE nVersion;
935 OMX_U32 nPortIndex;
936 OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
James Dong334de522012-03-12 12:47:14 -0700937 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800938 OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
James Dong334de522012-03-12 12:47:14 -0700939 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
940 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800941 This parameter is valid only for
James Dong334de522012-03-12 12:47:14 -0700942 OMX_IndexParamVideoProfileLevelQuerySupported index,
943 For all other indices this parameter is to be ignored. */
944} OMX_VIDEO_PARAM_PROFILELEVELTYPE;
945
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800946/**
947 * Structure for dynamically configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700948 *
949 * STRUCT MEMBERS:
950 * nSize : Size of the struct in bytes
951 * nVersion : OMX spec version info
952 * nPortIndex : Port that this struct applies to
953 * nEncodeBitrate : Target average bitrate to be generated in bps
954 */
955typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800956 OMX_U32 nSize;
957 OMX_VERSIONTYPE nVersion;
958 OMX_U32 nPortIndex;
959 OMX_U32 nEncodeBitrate;
James Dong334de522012-03-12 12:47:14 -0700960} OMX_VIDEO_CONFIG_BITRATETYPE;
961
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800962/**
James Dong334de522012-03-12 12:47:14 -0700963 * Defines Encoder Frame Rate setting
964 *
965 * STRUCT MEMBERS:
966 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800967 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700968 * nPortIndex : Port that this structure applies to
969 * xEncodeFramerate : Encoding framerate represented in Q16 format
970 */
971typedef struct OMX_CONFIG_FRAMERATETYPE {
972 OMX_U32 nSize;
973 OMX_VERSIONTYPE nVersion;
974 OMX_U32 nPortIndex;
975 OMX_U32 xEncodeFramerate; /* Q16 format */
976} OMX_CONFIG_FRAMERATETYPE;
977
978typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
979 OMX_U32 nSize;
980 OMX_VERSIONTYPE nVersion;
981 OMX_U32 nPortIndex;
982 OMX_BOOL IntraRefreshVOP;
983} OMX_CONFIG_INTRAREFRESHVOPTYPE;
984
985typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
986 OMX_U32 nSize;
987 OMX_VERSIONTYPE nVersion;
988 OMX_U32 nPortIndex;
989 OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
990 OMX_U8 ErrMap[1]; /* Error map hint */
991} OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
992
993typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
994 OMX_U32 nSize;
995 OMX_VERSIONTYPE nVersion;
996 OMX_U32 nPortIndex;
997 OMX_BOOL bEnabled;
998} OMX_CONFIG_MBERRORREPORTINGTYPE;
999
1000typedef struct OMX_PARAM_MACROBLOCKSTYPE {
1001 OMX_U32 nSize;
1002 OMX_VERSIONTYPE nVersion;
1003 OMX_U32 nPortIndex;
1004 OMX_U32 nMacroblocks;
1005} OMX_PARAM_MACROBLOCKSTYPE;
1006
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001007/**
1008 * AVC Slice Mode modes
James Dong334de522012-03-12 12:47:14 -07001009 *
1010 * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
1011 * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
1012 * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
1013 */
1014typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
1015 OMX_VIDEO_SLICEMODE_AVCDefault = 0,
1016 OMX_VIDEO_SLICEMODE_AVCMBSlice,
1017 OMX_VIDEO_SLICEMODE_AVCByteSlice,
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001018 OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001019 OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1020 OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
1021} OMX_VIDEO_AVCSLICEMODETYPE;
1022
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001023/**
1024 * AVC FMO Slice Mode Params
James Dong334de522012-03-12 12:47:14 -07001025 *
1026 * STRUCT MEMBERS:
1027 * nSize : Size of the structure in bytes
1028 * nVersion : OMX specification version information
1029 * nPortIndex : Port that this structure applies to
1030 * nNumSliceGroups : Specifies the number of slice groups
1031 * nSliceGroupMapType : Specifies the type of slice groups
1032 * eSliceMode : Specifies the type of slice
1033 */
1034typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001035 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001036 OMX_VERSIONTYPE nVersion;
1037 OMX_U32 nPortIndex;
1038 OMX_U8 nNumSliceGroups;
1039 OMX_U8 nSliceGroupMapType;
1040 OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1041} OMX_VIDEO_PARAM_AVCSLICEFMO;
1042
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001043/**
James Dong334de522012-03-12 12:47:14 -07001044 * AVC IDR Period Configs
1045 *
1046 * STRUCT MEMBERS:
1047 * nSize : Size of the structure in bytes
1048 * nVersion : OMX specification version information
1049 * nPortIndex : Port that this structure applies to
1050 * nIDRPeriod : Specifies periodicity of IDR frames
1051 * nPFrames : Specifies internal of coding Intra frames
1052 */
1053typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001054 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001055 OMX_VERSIONTYPE nVersion;
1056 OMX_U32 nPortIndex;
1057 OMX_U32 nIDRPeriod;
1058 OMX_U32 nPFrames;
1059} OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1060
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001061/**
James Dong334de522012-03-12 12:47:14 -07001062 * AVC NAL Size Configs
1063 *
1064 * STRUCT MEMBERS:
1065 * nSize : Size of the structure in bytes
1066 * nVersion : OMX specification version information
1067 * nPortIndex : Port that this structure applies to
1068 * nNaluBytes : Specifies the NAL unit size
1069 */
1070typedef struct OMX_VIDEO_CONFIG_NALSIZE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001071 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001072 OMX_VERSIONTYPE nVersion;
1073 OMX_U32 nPortIndex;
1074 OMX_U32 nNaluBytes;
1075} OMX_VIDEO_CONFIG_NALSIZE;
1076
1077/** @} */
1078
1079#ifdef __cplusplus
1080}
1081#endif /* __cplusplus */
1082
1083#endif
1084/* File EOF */
1085