blob: 76efac9b3ea928c4c4111f8d7321b697337386f6 [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 */
Lajos Molnar9e332ba2016-05-24 07:02:01 -0700556 OMX_VIDEO_MPEG2LevelHP, /**< HighP Level */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800557 OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700558 OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800559 OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700560} OMX_VIDEO_MPEG2LEVELTYPE;
561
562
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800563/**
564 * MPEG-2 params
James Dong334de522012-03-12 12:47:14 -0700565 *
566 * STRUCT MEMBERS:
567 * nSize : Size of the structure in bytes
568 * nVersion : OMX specification version information
569 * nPortIndex : Port that this structure applies to
570 * nPFrames : Number of P frames between each I frame
571 * nBFrames : Number of B frames between each I frame
572 * eProfile : MPEG-2 profile(s) to use
573 * eLevel : MPEG-2 levels(s) to use
574 */
575typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800576 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700577 OMX_VERSIONTYPE nVersion;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800578 OMX_U32 nPortIndex;
579 OMX_U32 nPFrames;
580 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700581 OMX_VIDEO_MPEG2PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800582 OMX_VIDEO_MPEG2LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700583} OMX_VIDEO_PARAM_MPEG2TYPE;
584
585
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800586/**
587 * MPEG-4 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700588 * performance bounds and different annexes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800589 *
James Dong334de522012-03-12 12:47:14 -0700590 * ENUMS:
591 * - Simple Profile, Levels 1-3
592 * - Simple Scalable Profile, Levels 1-2
593 * - Core Profile, Levels 1-2
594 * - Main Profile, Levels 2-4
595 * - N-bit Profile, Level 2
596 * - Scalable Texture Profile, Level 1
597 * - Simple Face Animation Profile, Levels 1-2
598 * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
599 * - Basic Animated Texture Profile, Levels 1-2
600 * - Hybrid Profile, Levels 1-2
601 * - Advanced Real Time Simple Profiles, Levels 1-4
602 * - Core Scalable Profile, Levels 1-3
603 * - Advanced Coding Efficiency Profile, Levels 1-4
604 * - Advanced Core Profile, Levels 1-2
605 * - Advanced Scalable Texture, Levels 2-3
606 */
607typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800608 OMX_VIDEO_MPEG4ProfileSimple = 0x01,
609 OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
610 OMX_VIDEO_MPEG4ProfileCore = 0x04,
611 OMX_VIDEO_MPEG4ProfileMain = 0x08,
612 OMX_VIDEO_MPEG4ProfileNbit = 0x10,
613 OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
614 OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
615 OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
616 OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
617 OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
618 OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
619 OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
620 OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
621 OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
James Dong334de522012-03-12 12:47:14 -0700622 OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
623 OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800624 OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700625 OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800626 OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700627} OMX_VIDEO_MPEG4PROFILETYPE;
628
629
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800630/**
631 * MPEG-4 level types, each level indicates support for various frame
632 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700633 */
634typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800635 OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
636 OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
637 OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
638 OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
639 OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700640 /* normally levels are powers of 2s, but 3b was missed and levels must be properly ordered */
641 OMX_VIDEO_MPEG4Level3b = 0x18, /**< Level 3a */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800642 OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
643 OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
644 OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700645 OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 6 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800646 OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700647 OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800648 OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700649} OMX_VIDEO_MPEG4LEVELTYPE;
650
651
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800652/**
James Dong334de522012-03-12 12:47:14 -0700653 * MPEG-4 configuration. This structure handles configuration options
654 * which are specific to MPEG4 algorithms
655 *
656 * STRUCT MEMBERS:
657 * nSize : Size of the structure in bytes
658 * nVersion : OMX specification version information
659 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800660 * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
James Dong334de522012-03-12 12:47:14 -0700661 * Annex K). Put zero if not used
662 * bSVH : Enable Short Video Header mode
663 * bGov : Flag to enable GOV
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800664 * nPFrames : Number of P frames between each I frame (also called
James Dong334de522012-03-12 12:47:14 -0700665 * GOV period)
666 * nBFrames : Number of B frames between each I frame
667 * nIDCVLCThreshold : Value of intra DC VLC threshold
668 * bACPred : Flag to use ac prediction
669 * nMaxPacketSize : Maximum size of packet in bytes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800670 * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
James Dong334de522012-03-12 12:47:14 -0700671 * Interpreted as described in MPEG4 standard.
672 * eProfile : MPEG-4 profile(s) to use.
673 * eLevel : MPEG-4 level(s) to use.
674 * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
675 * nHeaderExtension : Specifies the number of consecutive video packet
676 * headers within a VOP
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800677 * bReversibleVLC : Specifies whether reversible variable length coding
James Dong334de522012-03-12 12:47:14 -0700678 * is in use
679 */
680typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
681 OMX_U32 nSize;
682 OMX_VERSIONTYPE nVersion;
683 OMX_U32 nPortIndex;
684 OMX_U32 nSliceHeaderSpacing;
685 OMX_BOOL bSVH;
686 OMX_BOOL bGov;
687 OMX_U32 nPFrames;
688 OMX_U32 nBFrames;
689 OMX_U32 nIDCVLCThreshold;
690 OMX_BOOL bACPred;
691 OMX_U32 nMaxPacketSize;
692 OMX_U32 nTimeIncRes;
693 OMX_VIDEO_MPEG4PROFILETYPE eProfile;
694 OMX_VIDEO_MPEG4LEVELTYPE eLevel;
695 OMX_U32 nAllowedPictureTypes;
696 OMX_U32 nHeaderExtension;
697 OMX_BOOL bReversibleVLC;
698} OMX_VIDEO_PARAM_MPEG4TYPE;
699
700
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800701/**
702 * WMV Versions
James Dong334de522012-03-12 12:47:14 -0700703 */
704typedef enum OMX_VIDEO_WMVFORMATTYPE {
705 OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
706 OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
707 OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
708 OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800709 OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700710 OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
711 OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
712} OMX_VIDEO_WMVFORMATTYPE;
713
714
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800715/**
716 * WMV Params
James Dong334de522012-03-12 12:47:14 -0700717 *
718 * STRUCT MEMBERS:
719 * nSize : Size of the structure in bytes
720 * nVersion : OMX specification version information
721 * nPortIndex : Port that this structure applies to
722 * eFormat : Version of WMV stream / data
723 */
724typedef struct OMX_VIDEO_PARAM_WMVTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800725 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700726 OMX_VERSIONTYPE nVersion;
727 OMX_U32 nPortIndex;
728 OMX_VIDEO_WMVFORMATTYPE eFormat;
729} OMX_VIDEO_PARAM_WMVTYPE;
730
731
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800732/**
733 * Real Video Version
James Dong334de522012-03-12 12:47:14 -0700734 */
735typedef enum OMX_VIDEO_RVFORMATTYPE {
736 OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
737 OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
738 OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
739 OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800740 OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700741 OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
742 OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
743} OMX_VIDEO_RVFORMATTYPE;
744
745
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800746/**
747 * Real Video Params
James Dong334de522012-03-12 12:47:14 -0700748 *
749 * STUCT MEMBERS:
750 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800751 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700752 * nPortIndex : Port that this structure applies to
753 * eFormat : Version of RV stream / data
754 * nBitsPerPixel : Bits per pixel coded in the frame
755 * nPaddedWidth : Padded width in pixel of a video frame
756 * nPaddedHeight : Padded Height in pixels of a video frame
757 * nFrameRate : Rate of video in frames per second
758 * nBitstreamFlags : Flags which internal information about the bitstream
759 * nBitstreamVersion : Bitstream version
760 * nMaxEncodeFrameSize: Max encoded frame size
761 * bEnablePostFilter : Turn on/off post filter
762 * bEnableTemporalInterpolation : Turn on/off temporal interpolation
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800763 * bEnableLatencyMode : When enabled, the decoder does not display a decoded
764 * frame until it has detected that no enhancement layer
765 * frames or dependent B frames will be coming. This
766 * detection usually occurs when a subsequent non-B
767 * frame is encountered
James Dong334de522012-03-12 12:47:14 -0700768 */
769typedef struct OMX_VIDEO_PARAM_RVTYPE {
770 OMX_U32 nSize;
771 OMX_VERSIONTYPE nVersion;
772 OMX_U32 nPortIndex;
773 OMX_VIDEO_RVFORMATTYPE eFormat;
774 OMX_U16 nBitsPerPixel;
775 OMX_U16 nPaddedWidth;
776 OMX_U16 nPaddedHeight;
777 OMX_U32 nFrameRate;
778 OMX_U32 nBitstreamFlags;
779 OMX_U32 nBitstreamVersion;
780 OMX_U32 nMaxEncodeFrameSize;
781 OMX_BOOL bEnablePostFilter;
782 OMX_BOOL bEnableTemporalInterpolation;
783 OMX_BOOL bEnableLatencyMode;
784} OMX_VIDEO_PARAM_RVTYPE;
785
786
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800787/**
788 * AVC profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700789 * performance bounds and different annexes.
790 */
791typedef enum OMX_VIDEO_AVCPROFILETYPE {
792 OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
793 OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
794 OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
795 OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
796 OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
797 OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
798 OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800799 OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700800 OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800801 OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700802} OMX_VIDEO_AVCPROFILETYPE;
803
804
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800805/**
806 * AVC level types, each level indicates support for various frame sizes,
807 * bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700808 */
809typedef enum OMX_VIDEO_AVCLEVELTYPE {
810 OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
811 OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
812 OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
813 OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
814 OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
815 OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
816 OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
817 OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
818 OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
819 OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
820 OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
821 OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
822 OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
823 OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
824 OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
825 OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
Lajos Molnarcd57b412014-10-01 21:49:18 -0700826 OMX_VIDEO_AVCLevel52 = 0x10000, /**< Level 5.2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800827 OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700828 OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800829 OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700830} OMX_VIDEO_AVCLEVELTYPE;
831
832
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800833/**
834 * AVC loop filter modes
James Dong334de522012-03-12 12:47:14 -0700835 *
836 * OMX_VIDEO_AVCLoopFilterEnable : Enable
837 * OMX_VIDEO_AVCLoopFilterDisable : Disable
838 * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
839 */
840typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
841 OMX_VIDEO_AVCLoopFilterEnable = 0,
842 OMX_VIDEO_AVCLoopFilterDisable,
843 OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800844 OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700845 OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
846 OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
847} OMX_VIDEO_AVCLOOPFILTERTYPE;
848
849
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800850/**
851 * AVC params
James Dong334de522012-03-12 12:47:14 -0700852 *
853 * STRUCT MEMBERS:
854 * nSize : Size of the structure in bytes
855 * nVersion : OMX specification version information
856 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800857 * nSliceHeaderSpacing : Number of macroblocks between slice header, put
James Dong334de522012-03-12 12:47:14 -0700858 * zero if not used
859 * nPFrames : Number of P frames between each I frame
860 * nBFrames : Number of B frames between each I frame
861 * bUseHadamard : Enable/disable Hadamard transform
862 * nRefFrames : Max number of reference frames to use for inter
863 * motion search (1-16)
864 * nRefIdxTrailing : Pic param set ref frame index (index into ref
865 * frame buffer of trailing frames list), B frame
866 * support
867 * nRefIdxForward : Pic param set ref frame index (index into ref
868 * frame buffer of forward frames list), B frame
869 * support
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800870 * bEnableUEP : Enable/disable unequal error protection. This
James Dong334de522012-03-12 12:47:14 -0700871 * is only valid of data partitioning is enabled.
872 * bEnableFMO : Enable/disable flexible macroblock ordering
873 * bEnableASO : Enable/disable arbitrary slice ordering
874 * bEnableRS : Enable/disable sending of redundant slices
875 * eProfile : AVC profile(s) to use
876 * eLevel : AVC level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800877 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700878 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800879 * bFrameMBsOnly : specifies that every coded picture of the
880 * coded video sequence is a coded frame
James Dong334de522012-03-12 12:47:14 -0700881 * containing only frame macroblocks
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800882 * bMBAFF : Enable/disable switching between frame and
James Dong334de522012-03-12 12:47:14 -0700883 * field macroblocks within a picture
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800884 * bEntropyCodingCABAC : Entropy decoding method to be applied for the
885 * syntax elements for which two descriptors appear
James Dong334de522012-03-12 12:47:14 -0700886 * in the syntax tables
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800887 * bWeightedPPrediction : Enable/disable weighted prediction shall not
James Dong334de522012-03-12 12:47:14 -0700888 * be applied to P and SP slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800889 * nWeightedBipredicitonMode : Default weighted prediction is applied to B
890 * slices
James Dong334de522012-03-12 12:47:14 -0700891 * bconstIpred : Enable/disable intra prediction
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800892 * bDirect8x8Inference : Specifies the method used in the derivation
893 * process for luma motion vectors for B_Skip,
894 * B_Direct_16x16 and B_Direct_8x8 as specified
895 * in subclause 8.4.1.2 of the AVC spec
James Dong334de522012-03-12 12:47:14 -0700896 * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800897 * mode used in B slice coding (related to
898 * bDirect8x8Inference) . Spatial direct mode is
James Dong334de522012-03-12 12:47:14 -0700899 * more common and should be the default.
900 * nCabacInitIdx : Index used to init CABAC contexts
901 * eLoopFilterMode : Enable/disable loop filter
902 */
903typedef struct OMX_VIDEO_PARAM_AVCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800904 OMX_U32 nSize;
905 OMX_VERSIONTYPE nVersion;
906 OMX_U32 nPortIndex;
907 OMX_U32 nSliceHeaderSpacing;
908 OMX_U32 nPFrames;
909 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700910 OMX_BOOL bUseHadamard;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800911 OMX_U32 nRefFrames;
912 OMX_U32 nRefIdx10ActiveMinus1;
913 OMX_U32 nRefIdx11ActiveMinus1;
914 OMX_BOOL bEnableUEP;
915 OMX_BOOL bEnableFMO;
916 OMX_BOOL bEnableASO;
917 OMX_BOOL bEnableRS;
James Dong334de522012-03-12 12:47:14 -0700918 OMX_VIDEO_AVCPROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800919 OMX_VIDEO_AVCLEVELTYPE eLevel;
920 OMX_U32 nAllowedPictureTypes;
921 OMX_BOOL bFrameMBsOnly;
922 OMX_BOOL bMBAFF;
923 OMX_BOOL bEntropyCodingCABAC;
924 OMX_BOOL bWeightedPPrediction;
925 OMX_U32 nWeightedBipredicitonMode;
James Dong334de522012-03-12 12:47:14 -0700926 OMX_BOOL bconstIpred ;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800927 OMX_BOOL bDirect8x8Inference;
928 OMX_BOOL bDirectSpatialTemporal;
929 OMX_U32 nCabacInitIdc;
930 OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
James Dong334de522012-03-12 12:47:14 -0700931} OMX_VIDEO_PARAM_AVCTYPE;
932
933typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800934 OMX_U32 nSize;
935 OMX_VERSIONTYPE nVersion;
936 OMX_U32 nPortIndex;
937 OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
James Dong334de522012-03-12 12:47:14 -0700938 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800939 OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
James Dong334de522012-03-12 12:47:14 -0700940 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
941 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800942 This parameter is valid only for
James Dong334de522012-03-12 12:47:14 -0700943 OMX_IndexParamVideoProfileLevelQuerySupported index,
944 For all other indices this parameter is to be ignored. */
945} OMX_VIDEO_PARAM_PROFILELEVELTYPE;
946
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800947/**
948 * Structure for dynamically configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700949 *
950 * STRUCT MEMBERS:
951 * nSize : Size of the struct in bytes
952 * nVersion : OMX spec version info
953 * nPortIndex : Port that this struct applies to
954 * nEncodeBitrate : Target average bitrate to be generated in bps
955 */
956typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800957 OMX_U32 nSize;
958 OMX_VERSIONTYPE nVersion;
959 OMX_U32 nPortIndex;
960 OMX_U32 nEncodeBitrate;
James Dong334de522012-03-12 12:47:14 -0700961} OMX_VIDEO_CONFIG_BITRATETYPE;
962
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800963/**
James Dong334de522012-03-12 12:47:14 -0700964 * Defines Encoder Frame Rate setting
965 *
966 * STRUCT MEMBERS:
967 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800968 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700969 * nPortIndex : Port that this structure applies to
970 * xEncodeFramerate : Encoding framerate represented in Q16 format
971 */
972typedef struct OMX_CONFIG_FRAMERATETYPE {
973 OMX_U32 nSize;
974 OMX_VERSIONTYPE nVersion;
975 OMX_U32 nPortIndex;
976 OMX_U32 xEncodeFramerate; /* Q16 format */
977} OMX_CONFIG_FRAMERATETYPE;
978
979typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
980 OMX_U32 nSize;
981 OMX_VERSIONTYPE nVersion;
982 OMX_U32 nPortIndex;
983 OMX_BOOL IntraRefreshVOP;
984} OMX_CONFIG_INTRAREFRESHVOPTYPE;
985
986typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
987 OMX_U32 nSize;
988 OMX_VERSIONTYPE nVersion;
989 OMX_U32 nPortIndex;
990 OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
991 OMX_U8 ErrMap[1]; /* Error map hint */
992} OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
993
994typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
995 OMX_U32 nSize;
996 OMX_VERSIONTYPE nVersion;
997 OMX_U32 nPortIndex;
998 OMX_BOOL bEnabled;
999} OMX_CONFIG_MBERRORREPORTINGTYPE;
1000
1001typedef struct OMX_PARAM_MACROBLOCKSTYPE {
1002 OMX_U32 nSize;
1003 OMX_VERSIONTYPE nVersion;
1004 OMX_U32 nPortIndex;
1005 OMX_U32 nMacroblocks;
1006} OMX_PARAM_MACROBLOCKSTYPE;
1007
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001008/**
1009 * AVC Slice Mode modes
James Dong334de522012-03-12 12:47:14 -07001010 *
1011 * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
1012 * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
1013 * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
1014 */
1015typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
1016 OMX_VIDEO_SLICEMODE_AVCDefault = 0,
1017 OMX_VIDEO_SLICEMODE_AVCMBSlice,
1018 OMX_VIDEO_SLICEMODE_AVCByteSlice,
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001019 OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001020 OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1021 OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
1022} OMX_VIDEO_AVCSLICEMODETYPE;
1023
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001024/**
1025 * AVC FMO Slice Mode Params
James Dong334de522012-03-12 12:47:14 -07001026 *
1027 * STRUCT MEMBERS:
1028 * nSize : Size of the structure in bytes
1029 * nVersion : OMX specification version information
1030 * nPortIndex : Port that this structure applies to
1031 * nNumSliceGroups : Specifies the number of slice groups
1032 * nSliceGroupMapType : Specifies the type of slice groups
1033 * eSliceMode : Specifies the type of slice
1034 */
1035typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001036 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001037 OMX_VERSIONTYPE nVersion;
1038 OMX_U32 nPortIndex;
1039 OMX_U8 nNumSliceGroups;
1040 OMX_U8 nSliceGroupMapType;
1041 OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1042} OMX_VIDEO_PARAM_AVCSLICEFMO;
1043
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001044/**
James Dong334de522012-03-12 12:47:14 -07001045 * AVC IDR Period Configs
1046 *
1047 * STRUCT MEMBERS:
1048 * nSize : Size of the structure in bytes
1049 * nVersion : OMX specification version information
1050 * nPortIndex : Port that this structure applies to
1051 * nIDRPeriod : Specifies periodicity of IDR frames
1052 * nPFrames : Specifies internal of coding Intra frames
1053 */
1054typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001055 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001056 OMX_VERSIONTYPE nVersion;
1057 OMX_U32 nPortIndex;
1058 OMX_U32 nIDRPeriod;
1059 OMX_U32 nPFrames;
1060} OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1061
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001062/**
James Dong334de522012-03-12 12:47:14 -07001063 * AVC NAL Size Configs
1064 *
1065 * STRUCT MEMBERS:
1066 * nSize : Size of the structure in bytes
1067 * nVersion : OMX specification version information
1068 * nPortIndex : Port that this structure applies to
1069 * nNaluBytes : Specifies the NAL unit size
1070 */
1071typedef struct OMX_VIDEO_CONFIG_NALSIZE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001072 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001073 OMX_VERSIONTYPE nVersion;
1074 OMX_U32 nPortIndex;
1075 OMX_U32 nNaluBytes;
1076} OMX_VIDEO_CONFIG_NALSIZE;
1077
1078/** @} */
1079
1080#ifdef __cplusplus
1081}
1082#endif /* __cplusplus */
1083
1084#endif
1085/* File EOF */
1086