blob: b6edaa900e4f423c18d468b05865644dd315c842 [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 */
Chong Zhang93c3a402018-02-28 16:07:44 -080092 OMX_VIDEO_CodingImageHEIC, /**< HEIF image encoded with HEVC */
Lajos Molnara1ae5a42014-11-06 17:05:46 -080093 OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -070094 OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
95 OMX_VIDEO_CodingMax = 0x7FFFFFFF
96} OMX_VIDEO_CODINGTYPE;
97
98
99/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800100 * Data structure used to define a video path. The number of Video paths for
101 * input and output will vary by type of the Video component.
102 *
James Dong334de522012-03-12 12:47:14 -0700103 * Input (aka Source) : zero Inputs, one Output,
104 * Splitter : one Input, 2 or more Outputs,
105 * Processing Element : one Input, one output,
106 * Mixer : 2 or more inputs, one output,
107 * Output (aka Sink) : one Input, zero outputs.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800108 *
109 * The PortDefinition structure is used to define all of the parameters
110 * necessary for the compliant component to setup an input or an output video
111 * path. If additional vendor specific data is required, it should be
112 * transmitted to the component using the CustomCommand function. Compliant
113 * components will prepopulate this structure with optimal values during the
James Dong334de522012-03-12 12:47:14 -0700114 * GetDefaultInitParams command.
115 *
116 * STRUCT MEMBERS:
117 * cMIMEType : MIME type of data for the port
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800118 * pNativeRender : Platform specific reference for a display if a
James Dong334de522012-03-12 12:47:14 -0700119 * sync, otherwise this field is 0
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800120 * nFrameWidth : Width of frame to be used on channel if
James Dong334de522012-03-12 12:47:14 -0700121 * uncompressed format is used. Use 0 for unknown,
122 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800123 * nFrameHeight : Height of frame to be used on channel if
James Dong334de522012-03-12 12:47:14 -0700124 * uncompressed format is used. Use 0 for unknown,
125 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800126 * nStride : Number of bytes per span of an image
James Dong334de522012-03-12 12:47:14 -0700127 * (i.e. indicates the number of bytes to get
128 * from span N to span N+1, where negative stride
129 * indicates the image is bottom up
130 * nSliceHeight : Height used when encoding in slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800131 * nBitrate : Bit rate of frame to be used on channel if
132 * compressed format is used. Use 0 for unknown,
James Dong334de522012-03-12 12:47:14 -0700133 * don't care or variable
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800134 * xFramerate : Frame rate to be used on channel if uncompressed
135 * format is used. Use 0 for unknown, don't care or
James Dong334de522012-03-12 12:47:14 -0700136 * variable. Units are Q16 frames per second.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800137 * bFlagErrorConcealment : Turns on error concealment if it is supported by
James Dong334de522012-03-12 12:47:14 -0700138 * the OMX component
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800139 * eCompressionFormat : Compression format used in this instance of the
140 * component. When OMX_VIDEO_CodingUnused is
James Dong334de522012-03-12 12:47:14 -0700141 * specified, eColorFormat is used
142 * eColorFormat : Decompressed format used by this component
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800143 * pNativeWindow : Platform specific reference for a window object if a
144 * display sink , otherwise this field is 0x0.
James Dong334de522012-03-12 12:47:14 -0700145 */
146typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
147 OMX_STRING cMIMEType;
148 OMX_NATIVE_DEVICETYPE pNativeRender;
149 OMX_U32 nFrameWidth;
150 OMX_U32 nFrameHeight;
151 OMX_S32 nStride;
152 OMX_U32 nSliceHeight;
153 OMX_U32 nBitrate;
154 OMX_U32 xFramerate;
155 OMX_BOOL bFlagErrorConcealment;
156 OMX_VIDEO_CODINGTYPE eCompressionFormat;
157 OMX_COLOR_FORMATTYPE eColorFormat;
158 OMX_NATIVE_WINDOWTYPE pNativeWindow;
159} OMX_VIDEO_PORTDEFINITIONTYPE;
160
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800161/**
162 * Port format parameter. This structure is used to enumerate the various
James Dong334de522012-03-12 12:47:14 -0700163 * data input/output format supported by the port.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800164 *
James Dong334de522012-03-12 12:47:14 -0700165 * STRUCT MEMBERS:
166 * nSize : Size of the structure in bytes
167 * nVersion : OMX specification version information
168 * nPortIndex : Indicates which port to set
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800169 * nIndex : Indicates the enumeration index for the format from
James Dong334de522012-03-12 12:47:14 -0700170 * 0x0 to N-1
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800171 * eCompressionFormat : Compression format used in this instance of the
172 * component. When OMX_VIDEO_CodingUnused is specified,
173 * eColorFormat is used
James Dong334de522012-03-12 12:47:14 -0700174 * eColorFormat : Decompressed format used by this component
175 * xFrameRate : Indicates the video frame rate in Q16 format
176 */
177typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
178 OMX_U32 nSize;
179 OMX_VERSIONTYPE nVersion;
180 OMX_U32 nPortIndex;
181 OMX_U32 nIndex;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800182 OMX_VIDEO_CODINGTYPE eCompressionFormat;
James Dong334de522012-03-12 12:47:14 -0700183 OMX_COLOR_FORMATTYPE eColorFormat;
184 OMX_U32 xFramerate;
185} OMX_VIDEO_PARAM_PORTFORMATTYPE;
186
187
188/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800189 * This is a structure for configuring video compression quantization
James Dong334de522012-03-12 12:47:14 -0700190 * parameter values. Codecs may support different QP values for different
191 * frame types.
192 *
193 * STRUCT MEMBERS:
194 * nSize : Size of the structure in bytes
195 * nVersion : OMX specification version info
196 * nPortIndex : Port that this structure applies to
197 * nQpI : QP value to use for index frames
198 * nQpP : QP value to use for P frames
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800199 * nQpB : QP values to use for bidirectional frames
James Dong334de522012-03-12 12:47:14 -0700200 */
201typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800202 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700203 OMX_VERSIONTYPE nVersion;
204 OMX_U32 nPortIndex;
205 OMX_U32 nQpI;
206 OMX_U32 nQpP;
207 OMX_U32 nQpB;
208} OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
209
210
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800211/**
212 * Structure for configuration of video fast update parameters.
213 *
James Dong334de522012-03-12 12:47:14 -0700214 * STRUCT MEMBERS:
215 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800216 * nVersion : OMX specification version info
James Dong334de522012-03-12 12:47:14 -0700217 * nPortIndex : Port that this structure applies to
218 * bEnableVFU : Enable/Disable video fast update
219 * nFirstGOB : Specifies the number of the first macroblock row
220 * nFirstMB : specifies the first MB relative to the specified first GOB
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800221 * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB
James Dong334de522012-03-12 12:47:14 -0700222 * and nFirstMB
223 */
224typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800225 OMX_U32 nSize;
226 OMX_VERSIONTYPE nVersion;
227 OMX_U32 nPortIndex;
228 OMX_BOOL bEnableVFU;
229 OMX_U32 nFirstGOB;
230 OMX_U32 nFirstMB;
231 OMX_U32 nNumMBs;
James Dong334de522012-03-12 12:47:14 -0700232} OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
233
234
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800235/**
236 * Enumeration of possible bitrate control types
James Dong334de522012-03-12 12:47:14 -0700237 */
238typedef enum OMX_VIDEO_CONTROLRATETYPE {
239 OMX_Video_ControlRateDisable,
240 OMX_Video_ControlRateVariable,
241 OMX_Video_ControlRateConstant,
242 OMX_Video_ControlRateVariableSkipFrames,
243 OMX_Video_ControlRateConstantSkipFrames,
Chong Zhang64e8b412018-01-22 15:33:03 -0800244 OMX_Video_ControlRateConstantQuality,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800245 OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700246 OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
247 OMX_Video_ControlRateMax = 0x7FFFFFFF
248} OMX_VIDEO_CONTROLRATETYPE;
249
250
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800251/**
252 * Structure for configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700253 *
254 * STRUCT MEMBERS:
255 * nSize : Size of the struct in bytes
256 * nVersion : OMX spec version info
257 * nPortIndex : Port that this struct applies to
258 * eControlRate : Control rate type enum
Chong Zhang64e8b412018-01-22 15:33:03 -0800259 * nTargetBitrate : Target bitrate to encode with (used when eControlRate is
260 * not OMX_Video_ControlRateConstantQuality)
261 * nQualityFactor : Quality to encode with (used when eControlRate is
262 * OMX_Video_ControlRateConstantQuality only)
James Dong334de522012-03-12 12:47:14 -0700263 */
264typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800265 OMX_U32 nSize;
266 OMX_VERSIONTYPE nVersion;
267 OMX_U32 nPortIndex;
268 OMX_VIDEO_CONTROLRATETYPE eControlRate;
Chong Zhang64e8b412018-01-22 15:33:03 -0800269 union {
270 OMX_U32 nTargetBitrate;
271 OMX_U32 nQualityFactor;
272 };
James Dong334de522012-03-12 12:47:14 -0700273} OMX_VIDEO_PARAM_BITRATETYPE;
274
275
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800276/**
277 * Enumeration of possible motion vector (MV) types
James Dong334de522012-03-12 12:47:14 -0700278 */
279typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
280 OMX_Video_MotionVectorPixel,
281 OMX_Video_MotionVectorHalfPel,
282 OMX_Video_MotionVectorQuarterPel,
283 OMX_Video_MotionVectorEighthPel,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800284 OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700285 OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
286 OMX_Video_MotionVectorMax = 0x7FFFFFFF
287} OMX_VIDEO_MOTIONVECTORTYPE;
288
289
290/**
291 * Structure for configuring the number of motion vectors used as well
292 * as their accuracy.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800293 *
James Dong334de522012-03-12 12:47:14 -0700294 * STRUCT MEMBERS:
295 * nSize : Size of the struct in bytes
296 * nVersion : OMX spec version info
297 * nPortIndex : port that this structure applies to
298 * eAccuracy : Enumerated MV accuracy
299 * bUnrestrictedMVs : Allow unrestricted MVs
300 * bFourMV : Allow use of 4 MVs
301 * sXSearchRange : Search range in horizontal direction for MVs
302 * sYSearchRange : Search range in vertical direction for MVs
303 */
304typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
305 OMX_U32 nSize;
306 OMX_VERSIONTYPE nVersion;
307 OMX_U32 nPortIndex;
308 OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
309 OMX_BOOL bUnrestrictedMVs;
310 OMX_BOOL bFourMV;
311 OMX_S32 sXSearchRange;
312 OMX_S32 sYSearchRange;
313} OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
314
315
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800316/**
317 * Enumeration of possible methods to use for Intra Refresh
James Dong334de522012-03-12 12:47:14 -0700318 */
319typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
320 OMX_VIDEO_IntraRefreshCyclic,
321 OMX_VIDEO_IntraRefreshAdaptive,
322 OMX_VIDEO_IntraRefreshBoth,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800323 OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700324 OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
325 OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
326} OMX_VIDEO_INTRAREFRESHTYPE;
327
328
329/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800330 * Structure for configuring intra refresh mode
331 *
James Dong334de522012-03-12 12:47:14 -0700332 * STRUCT MEMBERS:
333 * nSize : Size of the structure in bytes
334 * nVersion : OMX specification version information
335 * nPortIndex : Port that this structure applies to
336 * eRefreshMode : Cyclic, Adaptive, or Both
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800337 * nAirMBs : Number of intra macroblocks to refresh in a frame when
James Dong334de522012-03-12 12:47:14 -0700338 * AIR is enabled
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800339 * nAirRef : Number of times a motion marked macroblock has to be
James Dong334de522012-03-12 12:47:14 -0700340 * intra coded
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800341 * nCirMBs : Number of consecutive macroblocks to be coded as "intra"
James Dong334de522012-03-12 12:47:14 -0700342 * when CIR is enabled
343 */
344typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
345 OMX_U32 nSize;
346 OMX_VERSIONTYPE nVersion;
347 OMX_U32 nPortIndex;
348 OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
349 OMX_U32 nAirMBs;
350 OMX_U32 nAirRef;
351 OMX_U32 nCirMBs;
352} OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
353
354
355/**
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800356 * Structure for enabling various error correction methods for video
James Dong334de522012-03-12 12:47:14 -0700357 * compression.
358 *
359 * STRUCT MEMBERS:
360 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800361 * nVersion : OMX specification version information
362 * nPortIndex : Port that this structure applies to
James Dong334de522012-03-12 12:47:14 -0700363 * bEnableHEC : Enable/disable header extension codes (HEC)
364 * bEnableResync : Enable/disable resynchronization markers
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800365 * nResynchMarkerSpacing : Resynch markers interval (in bits) to be
366 * applied in the stream
367 * bEnableDataPartitioning : Enable/disable data partitioning
368 * bEnableRVLC : Enable/disable reversible variable length
James Dong334de522012-03-12 12:47:14 -0700369 * coding
370 */
371typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
372 OMX_U32 nSize;
373 OMX_VERSIONTYPE nVersion;
374 OMX_U32 nPortIndex;
375 OMX_BOOL bEnableHEC;
376 OMX_BOOL bEnableResync;
377 OMX_U32 nResynchMarkerSpacing;
378 OMX_BOOL bEnableDataPartitioning;
379 OMX_BOOL bEnableRVLC;
380} OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
381
382
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800383/**
384 * Configuration of variable block-size motion compensation (VBSMC)
385 *
James Dong334de522012-03-12 12:47:14 -0700386 * STRUCT MEMBERS:
387 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800388 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700389 * nPortIndex : Port that this structure applies to
390 * b16x16 : Enable inter block search 16x16
391 * b16x8 : Enable inter block search 16x8
392 * b8x16 : Enable inter block search 8x16
393 * b8x8 : Enable inter block search 8x8
394 * b8x4 : Enable inter block search 8x4
395 * b4x8 : Enable inter block search 4x8
396 * b4x4 : Enable inter block search 4x4
397 */
398typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800399 OMX_U32 nSize;
400 OMX_VERSIONTYPE nVersion;
401 OMX_U32 nPortIndex;
402 OMX_BOOL b16x16;
403 OMX_BOOL b16x8;
James Dong334de522012-03-12 12:47:14 -0700404 OMX_BOOL b8x16;
405 OMX_BOOL b8x8;
406 OMX_BOOL b8x4;
407 OMX_BOOL b4x8;
408 OMX_BOOL b4x4;
409} OMX_VIDEO_PARAM_VBSMCTYPE;
410
411
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800412/**
413 * H.263 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700414 * performance bounds and different annexes.
415 *
416 * ENUMS:
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800417 * Baseline : Baseline Profile: H.263 (V1), no optional modes
418 * H320 Coding : H.320 Coding Efficiency Backward Compatibility
James Dong334de522012-03-12 12:47:14 -0700419 * Profile: H.263+ (V2), includes annexes I, J, L.4
420 * and T
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800421 * BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
422 * includes annex F
423 * ISWV2 : Interactive Streaming Wireless Profile: H.263+
424 * (V2), includes annexes I, J, K and T
425 * ISWV3 : Interactive Streaming Wireless Profile: H.263++
426 * (V3), includes profile 3 and annexes V and W.6.3.8
427 * HighCompression : Conversational High Compression Profile: H.263++
428 * (V3), includes profiles 1 & 2 and annexes D and U
429 * Internet : Conversational Internet Profile: H.263++ (V3),
430 * includes profile 5 and annex K
431 * Interlace : Conversational Interlace Profile: H.263++ (V3),
432 * includes profile 5 and annex W.6.3.11
433 * HighLatency : High Latency Profile: H.263++ (V3), includes
434 * profile 6 and annexes O.1 and P.5
James Dong334de522012-03-12 12:47:14 -0700435 */
436typedef enum OMX_VIDEO_H263PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800437 OMX_VIDEO_H263ProfileBaseline = 0x01,
438 OMX_VIDEO_H263ProfileH320Coding = 0x02,
439 OMX_VIDEO_H263ProfileBackwardCompatible = 0x04,
440 OMX_VIDEO_H263ProfileISWV2 = 0x08,
441 OMX_VIDEO_H263ProfileISWV3 = 0x10,
442 OMX_VIDEO_H263ProfileHighCompression = 0x20,
443 OMX_VIDEO_H263ProfileInternet = 0x40,
444 OMX_VIDEO_H263ProfileInterlace = 0x80,
445 OMX_VIDEO_H263ProfileHighLatency = 0x100,
446 OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700447 OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800448 OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700449} OMX_VIDEO_H263PROFILETYPE;
450
451
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800452/**
453 * H.263 level types, each level indicates support for various frame sizes,
James Dong334de522012-03-12 12:47:14 -0700454 * bit rates, decoder frame rates.
455 */
456typedef enum OMX_VIDEO_H263LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800457 OMX_VIDEO_H263Level10 = 0x01,
458 OMX_VIDEO_H263Level20 = 0x02,
459 OMX_VIDEO_H263Level30 = 0x04,
460 OMX_VIDEO_H263Level40 = 0x08,
461 OMX_VIDEO_H263Level45 = 0x10,
462 OMX_VIDEO_H263Level50 = 0x20,
463 OMX_VIDEO_H263Level60 = 0x40,
464 OMX_VIDEO_H263Level70 = 0x80,
465 OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700466 OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800467 OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700468} OMX_VIDEO_H263LEVELTYPE;
469
470
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800471/**
472 * Specifies the picture type. These values should be OR'd to signal all
James Dong334de522012-03-12 12:47:14 -0700473 * pictures types which are allowed.
474 *
475 * ENUMS:
476 * Generic Picture Types: I, P and B
477 * H.263 Specific Picture Types: SI and SP
478 * H.264 Specific Picture Types: EI and EP
479 * MPEG-4 Specific Picture Types: S
480 */
481typedef enum OMX_VIDEO_PICTURETYPE {
482 OMX_VIDEO_PictureTypeI = 0x01,
483 OMX_VIDEO_PictureTypeP = 0x02,
484 OMX_VIDEO_PictureTypeB = 0x04,
485 OMX_VIDEO_PictureTypeSI = 0x08,
486 OMX_VIDEO_PictureTypeSP = 0x10,
487 OMX_VIDEO_PictureTypeEI = 0x11,
488 OMX_VIDEO_PictureTypeEP = 0x12,
489 OMX_VIDEO_PictureTypeS = 0x14,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800490 OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700491 OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
492 OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
493} OMX_VIDEO_PICTURETYPE;
494
495
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800496/**
497 * H.263 Params
James Dong334de522012-03-12 12:47:14 -0700498 *
499 * STRUCT MEMBERS:
500 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800501 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700502 * nPortIndex : Port that this structure applies to
503 * nPFrames : Number of P frames between each I frame
504 * nBFrames : Number of B frames between each I frame
505 * eProfile : H.263 profile(s) to use
506 * eLevel : H.263 level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800507 * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE
508 * (specified in the 1998 version of H.263) to
509 * indicate custom picture sizes or clock
510 * frequencies
511 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700512 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800513 * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
514 * not constrained. It is recommended to change
515 * the value of the RTYPE bit for each reference
James Dong334de522012-03-12 12:47:14 -0700516 * picture in error-free communication
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800517 * nPictureHeaderRepetition : Specifies the frequency of picture header
James Dong334de522012-03-12 12:47:14 -0700518 * repetition
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800519 * nGOBHeaderInterval : Specifies the interval of non-empty GOB
James Dong334de522012-03-12 12:47:14 -0700520 * headers in units of GOBs
521 */
522typedef struct OMX_VIDEO_PARAM_H263TYPE {
523 OMX_U32 nSize;
524 OMX_VERSIONTYPE nVersion;
525 OMX_U32 nPortIndex;
526 OMX_U32 nPFrames;
527 OMX_U32 nBFrames;
528 OMX_VIDEO_H263PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800529 OMX_VIDEO_H263LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700530 OMX_BOOL bPLUSPTYPEAllowed;
531 OMX_U32 nAllowedPictureTypes;
532 OMX_BOOL bForceRoundingTypeToZero;
533 OMX_U32 nPictureHeaderRepetition;
534 OMX_U32 nGOBHeaderInterval;
535} OMX_VIDEO_PARAM_H263TYPE;
536
537
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800538/**
539 * MPEG-2 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700540 * performance bounds and different annexes.
541 */
542typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
543 OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */
544 OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */
545 OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */
546 OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */
547 OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */
548 OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800549 OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700550 OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800551 OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700552} OMX_VIDEO_MPEG2PROFILETYPE;
553
554
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800555/**
556 * MPEG-2 level types, each level indicates support for various frame
557 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700558 */
559typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800560 OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */
561 OMX_VIDEO_MPEG2LevelML, /**< Main Level */
562 OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */
563 OMX_VIDEO_MPEG2LevelHL, /**< High Level */
Lajos Molnar9e332ba2016-05-24 07:02:01 -0700564 OMX_VIDEO_MPEG2LevelHP, /**< HighP Level */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800565 OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700566 OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800567 OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700568} OMX_VIDEO_MPEG2LEVELTYPE;
569
570
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800571/**
572 * MPEG-2 params
James Dong334de522012-03-12 12:47:14 -0700573 *
574 * STRUCT MEMBERS:
575 * nSize : Size of the structure in bytes
576 * nVersion : OMX specification version information
577 * nPortIndex : Port that this structure applies to
578 * nPFrames : Number of P frames between each I frame
579 * nBFrames : Number of B frames between each I frame
580 * eProfile : MPEG-2 profile(s) to use
581 * eLevel : MPEG-2 levels(s) to use
582 */
583typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800584 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700585 OMX_VERSIONTYPE nVersion;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800586 OMX_U32 nPortIndex;
587 OMX_U32 nPFrames;
588 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700589 OMX_VIDEO_MPEG2PROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800590 OMX_VIDEO_MPEG2LEVELTYPE eLevel;
James Dong334de522012-03-12 12:47:14 -0700591} OMX_VIDEO_PARAM_MPEG2TYPE;
592
593
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800594/**
595 * MPEG-4 profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700596 * performance bounds and different annexes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800597 *
James Dong334de522012-03-12 12:47:14 -0700598 * ENUMS:
599 * - Simple Profile, Levels 1-3
600 * - Simple Scalable Profile, Levels 1-2
601 * - Core Profile, Levels 1-2
602 * - Main Profile, Levels 2-4
603 * - N-bit Profile, Level 2
604 * - Scalable Texture Profile, Level 1
605 * - Simple Face Animation Profile, Levels 1-2
606 * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
607 * - Basic Animated Texture Profile, Levels 1-2
608 * - Hybrid Profile, Levels 1-2
609 * - Advanced Real Time Simple Profiles, Levels 1-4
610 * - Core Scalable Profile, Levels 1-3
611 * - Advanced Coding Efficiency Profile, Levels 1-4
612 * - Advanced Core Profile, Levels 1-2
613 * - Advanced Scalable Texture, Levels 2-3
614 */
615typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800616 OMX_VIDEO_MPEG4ProfileSimple = 0x01,
617 OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
618 OMX_VIDEO_MPEG4ProfileCore = 0x04,
619 OMX_VIDEO_MPEG4ProfileMain = 0x08,
620 OMX_VIDEO_MPEG4ProfileNbit = 0x10,
621 OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
622 OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
623 OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
624 OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
625 OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
626 OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
627 OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
628 OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
629 OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
James Dong334de522012-03-12 12:47:14 -0700630 OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
631 OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800632 OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700633 OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800634 OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700635} OMX_VIDEO_MPEG4PROFILETYPE;
636
637
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800638/**
639 * MPEG-4 level types, each level indicates support for various frame
640 * sizes, bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700641 */
642typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800643 OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
644 OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
645 OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
646 OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
647 OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700648 /* normally levels are powers of 2s, but 3b was missed and levels must be properly ordered */
649 OMX_VIDEO_MPEG4Level3b = 0x18, /**< Level 3a */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800650 OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
651 OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
652 OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
Lajos Molnar059e2982016-05-19 15:27:31 -0700653 OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 6 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800654 OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700655 OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800656 OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700657} OMX_VIDEO_MPEG4LEVELTYPE;
658
659
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800660/**
James Dong334de522012-03-12 12:47:14 -0700661 * MPEG-4 configuration. This structure handles configuration options
662 * which are specific to MPEG4 algorithms
663 *
664 * STRUCT MEMBERS:
665 * nSize : Size of the structure in bytes
666 * nVersion : OMX specification version information
667 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800668 * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
James Dong334de522012-03-12 12:47:14 -0700669 * Annex K). Put zero if not used
670 * bSVH : Enable Short Video Header mode
671 * bGov : Flag to enable GOV
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800672 * nPFrames : Number of P frames between each I frame (also called
James Dong334de522012-03-12 12:47:14 -0700673 * GOV period)
674 * nBFrames : Number of B frames between each I frame
675 * nIDCVLCThreshold : Value of intra DC VLC threshold
676 * bACPred : Flag to use ac prediction
677 * nMaxPacketSize : Maximum size of packet in bytes.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800678 * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
James Dong334de522012-03-12 12:47:14 -0700679 * Interpreted as described in MPEG4 standard.
680 * eProfile : MPEG-4 profile(s) to use.
681 * eLevel : MPEG-4 level(s) to use.
682 * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
683 * nHeaderExtension : Specifies the number of consecutive video packet
684 * headers within a VOP
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800685 * bReversibleVLC : Specifies whether reversible variable length coding
James Dong334de522012-03-12 12:47:14 -0700686 * is in use
687 */
688typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
689 OMX_U32 nSize;
690 OMX_VERSIONTYPE nVersion;
691 OMX_U32 nPortIndex;
692 OMX_U32 nSliceHeaderSpacing;
693 OMX_BOOL bSVH;
694 OMX_BOOL bGov;
695 OMX_U32 nPFrames;
696 OMX_U32 nBFrames;
697 OMX_U32 nIDCVLCThreshold;
698 OMX_BOOL bACPred;
699 OMX_U32 nMaxPacketSize;
700 OMX_U32 nTimeIncRes;
701 OMX_VIDEO_MPEG4PROFILETYPE eProfile;
702 OMX_VIDEO_MPEG4LEVELTYPE eLevel;
703 OMX_U32 nAllowedPictureTypes;
704 OMX_U32 nHeaderExtension;
705 OMX_BOOL bReversibleVLC;
706} OMX_VIDEO_PARAM_MPEG4TYPE;
707
708
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800709/**
710 * WMV Versions
James Dong334de522012-03-12 12:47:14 -0700711 */
712typedef enum OMX_VIDEO_WMVFORMATTYPE {
713 OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
714 OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
715 OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
716 OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800717 OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700718 OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
719 OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
720} OMX_VIDEO_WMVFORMATTYPE;
721
722
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800723/**
724 * WMV Params
James Dong334de522012-03-12 12:47:14 -0700725 *
726 * STRUCT MEMBERS:
727 * nSize : Size of the structure in bytes
728 * nVersion : OMX specification version information
729 * nPortIndex : Port that this structure applies to
730 * eFormat : Version of WMV stream / data
731 */
732typedef struct OMX_VIDEO_PARAM_WMVTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800733 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -0700734 OMX_VERSIONTYPE nVersion;
735 OMX_U32 nPortIndex;
736 OMX_VIDEO_WMVFORMATTYPE eFormat;
737} OMX_VIDEO_PARAM_WMVTYPE;
738
739
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800740/**
741 * Real Video Version
James Dong334de522012-03-12 12:47:14 -0700742 */
743typedef enum OMX_VIDEO_RVFORMATTYPE {
744 OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
745 OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
746 OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
747 OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800748 OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700749 OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
750 OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
751} OMX_VIDEO_RVFORMATTYPE;
752
753
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800754/**
755 * Real Video Params
James Dong334de522012-03-12 12:47:14 -0700756 *
757 * STUCT MEMBERS:
758 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800759 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700760 * nPortIndex : Port that this structure applies to
761 * eFormat : Version of RV stream / data
762 * nBitsPerPixel : Bits per pixel coded in the frame
763 * nPaddedWidth : Padded width in pixel of a video frame
764 * nPaddedHeight : Padded Height in pixels of a video frame
765 * nFrameRate : Rate of video in frames per second
766 * nBitstreamFlags : Flags which internal information about the bitstream
767 * nBitstreamVersion : Bitstream version
768 * nMaxEncodeFrameSize: Max encoded frame size
769 * bEnablePostFilter : Turn on/off post filter
770 * bEnableTemporalInterpolation : Turn on/off temporal interpolation
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800771 * bEnableLatencyMode : When enabled, the decoder does not display a decoded
772 * frame until it has detected that no enhancement layer
773 * frames or dependent B frames will be coming. This
774 * detection usually occurs when a subsequent non-B
775 * frame is encountered
James Dong334de522012-03-12 12:47:14 -0700776 */
777typedef struct OMX_VIDEO_PARAM_RVTYPE {
778 OMX_U32 nSize;
779 OMX_VERSIONTYPE nVersion;
780 OMX_U32 nPortIndex;
781 OMX_VIDEO_RVFORMATTYPE eFormat;
782 OMX_U16 nBitsPerPixel;
783 OMX_U16 nPaddedWidth;
784 OMX_U16 nPaddedHeight;
785 OMX_U32 nFrameRate;
786 OMX_U32 nBitstreamFlags;
787 OMX_U32 nBitstreamVersion;
788 OMX_U32 nMaxEncodeFrameSize;
789 OMX_BOOL bEnablePostFilter;
790 OMX_BOOL bEnableTemporalInterpolation;
791 OMX_BOOL bEnableLatencyMode;
792} OMX_VIDEO_PARAM_RVTYPE;
793
794
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800795/**
796 * AVC profile types, each profile indicates support for various
James Dong334de522012-03-12 12:47:14 -0700797 * performance bounds and different annexes.
798 */
799typedef enum OMX_VIDEO_AVCPROFILETYPE {
800 OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
801 OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
802 OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
803 OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
804 OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
805 OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
806 OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800807 OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700808 OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800809 OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700810} OMX_VIDEO_AVCPROFILETYPE;
811
812
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800813/**
814 * AVC level types, each level indicates support for various frame sizes,
815 * bit rates, decoder frame rates. No need
James Dong334de522012-03-12 12:47:14 -0700816 */
817typedef enum OMX_VIDEO_AVCLEVELTYPE {
818 OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
819 OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
820 OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
821 OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
822 OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
823 OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
824 OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
825 OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
826 OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
827 OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
828 OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
829 OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
830 OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
831 OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
832 OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
833 OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
Lajos Molnarcd57b412014-10-01 21:49:18 -0700834 OMX_VIDEO_AVCLevel52 = 0x10000, /**< Level 5.2 */
Lajos Molnar80c29f12019-01-16 13:34:53 -0800835 OMX_VIDEO_AVCLevel6 = 0x20000, /**< Level 6 */
836 OMX_VIDEO_AVCLevel61 = 0x40000, /**< Level 6.1 */
837 OMX_VIDEO_AVCLevel62 = 0x80000, /**< Level 6.2 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800838 OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700839 OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800840 OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700841} OMX_VIDEO_AVCLEVELTYPE;
842
843
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800844/**
845 * AVC loop filter modes
James Dong334de522012-03-12 12:47:14 -0700846 *
847 * OMX_VIDEO_AVCLoopFilterEnable : Enable
848 * OMX_VIDEO_AVCLoopFilterDisable : Disable
849 * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
850 */
851typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
852 OMX_VIDEO_AVCLoopFilterEnable = 0,
853 OMX_VIDEO_AVCLoopFilterDisable,
854 OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800855 OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700856 OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
857 OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
858} OMX_VIDEO_AVCLOOPFILTERTYPE;
859
860
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800861/**
862 * AVC params
James Dong334de522012-03-12 12:47:14 -0700863 *
864 * STRUCT MEMBERS:
865 * nSize : Size of the structure in bytes
866 * nVersion : OMX specification version information
867 * nPortIndex : Port that this structure applies to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800868 * nSliceHeaderSpacing : Number of macroblocks between slice header, put
James Dong334de522012-03-12 12:47:14 -0700869 * zero if not used
870 * nPFrames : Number of P frames between each I frame
871 * nBFrames : Number of B frames between each I frame
872 * bUseHadamard : Enable/disable Hadamard transform
873 * nRefFrames : Max number of reference frames to use for inter
874 * motion search (1-16)
875 * nRefIdxTrailing : Pic param set ref frame index (index into ref
876 * frame buffer of trailing frames list), B frame
877 * support
878 * nRefIdxForward : Pic param set ref frame index (index into ref
879 * frame buffer of forward frames list), B frame
880 * support
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800881 * bEnableUEP : Enable/disable unequal error protection. This
James Dong334de522012-03-12 12:47:14 -0700882 * is only valid of data partitioning is enabled.
883 * bEnableFMO : Enable/disable flexible macroblock ordering
884 * bEnableASO : Enable/disable arbitrary slice ordering
885 * bEnableRS : Enable/disable sending of redundant slices
886 * eProfile : AVC profile(s) to use
887 * eLevel : AVC level(s) to use
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800888 * nAllowedPictureTypes : Specifies the picture types allowed in the
James Dong334de522012-03-12 12:47:14 -0700889 * bitstream
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800890 * bFrameMBsOnly : specifies that every coded picture of the
891 * coded video sequence is a coded frame
James Dong334de522012-03-12 12:47:14 -0700892 * containing only frame macroblocks
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800893 * bMBAFF : Enable/disable switching between frame and
James Dong334de522012-03-12 12:47:14 -0700894 * field macroblocks within a picture
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800895 * bEntropyCodingCABAC : Entropy decoding method to be applied for the
896 * syntax elements for which two descriptors appear
James Dong334de522012-03-12 12:47:14 -0700897 * in the syntax tables
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800898 * bWeightedPPrediction : Enable/disable weighted prediction shall not
James Dong334de522012-03-12 12:47:14 -0700899 * be applied to P and SP slices
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800900 * nWeightedBipredicitonMode : Default weighted prediction is applied to B
901 * slices
James Dong334de522012-03-12 12:47:14 -0700902 * bconstIpred : Enable/disable intra prediction
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800903 * bDirect8x8Inference : Specifies the method used in the derivation
904 * process for luma motion vectors for B_Skip,
905 * B_Direct_16x16 and B_Direct_8x8 as specified
906 * in subclause 8.4.1.2 of the AVC spec
James Dong334de522012-03-12 12:47:14 -0700907 * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800908 * mode used in B slice coding (related to
909 * bDirect8x8Inference) . Spatial direct mode is
James Dong334de522012-03-12 12:47:14 -0700910 * more common and should be the default.
911 * nCabacInitIdx : Index used to init CABAC contexts
912 * eLoopFilterMode : Enable/disable loop filter
913 */
914typedef struct OMX_VIDEO_PARAM_AVCTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800915 OMX_U32 nSize;
916 OMX_VERSIONTYPE nVersion;
917 OMX_U32 nPortIndex;
918 OMX_U32 nSliceHeaderSpacing;
919 OMX_U32 nPFrames;
920 OMX_U32 nBFrames;
James Dong334de522012-03-12 12:47:14 -0700921 OMX_BOOL bUseHadamard;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800922 OMX_U32 nRefFrames;
923 OMX_U32 nRefIdx10ActiveMinus1;
924 OMX_U32 nRefIdx11ActiveMinus1;
925 OMX_BOOL bEnableUEP;
926 OMX_BOOL bEnableFMO;
927 OMX_BOOL bEnableASO;
928 OMX_BOOL bEnableRS;
James Dong334de522012-03-12 12:47:14 -0700929 OMX_VIDEO_AVCPROFILETYPE eProfile;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800930 OMX_VIDEO_AVCLEVELTYPE eLevel;
931 OMX_U32 nAllowedPictureTypes;
932 OMX_BOOL bFrameMBsOnly;
933 OMX_BOOL bMBAFF;
934 OMX_BOOL bEntropyCodingCABAC;
935 OMX_BOOL bWeightedPPrediction;
936 OMX_U32 nWeightedBipredicitonMode;
James Dong334de522012-03-12 12:47:14 -0700937 OMX_BOOL bconstIpred ;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800938 OMX_BOOL bDirect8x8Inference;
939 OMX_BOOL bDirectSpatialTemporal;
940 OMX_U32 nCabacInitIdc;
941 OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
James Dong334de522012-03-12 12:47:14 -0700942} OMX_VIDEO_PARAM_AVCTYPE;
943
944typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800945 OMX_U32 nSize;
946 OMX_VERSIONTYPE nVersion;
947 OMX_U32 nPortIndex;
948 OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
James Dong334de522012-03-12 12:47:14 -0700949 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800950 OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
James Dong334de522012-03-12 12:47:14 -0700951 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
952 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800953 This parameter is valid only for
James Dong334de522012-03-12 12:47:14 -0700954 OMX_IndexParamVideoProfileLevelQuerySupported index,
955 For all other indices this parameter is to be ignored. */
956} OMX_VIDEO_PARAM_PROFILELEVELTYPE;
957
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800958/**
959 * Structure for dynamically configuring bitrate mode of a codec.
James Dong334de522012-03-12 12:47:14 -0700960 *
961 * STRUCT MEMBERS:
962 * nSize : Size of the struct in bytes
963 * nVersion : OMX spec version info
964 * nPortIndex : Port that this struct applies to
965 * nEncodeBitrate : Target average bitrate to be generated in bps
966 */
967typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800968 OMX_U32 nSize;
969 OMX_VERSIONTYPE nVersion;
970 OMX_U32 nPortIndex;
971 OMX_U32 nEncodeBitrate;
James Dong334de522012-03-12 12:47:14 -0700972} OMX_VIDEO_CONFIG_BITRATETYPE;
973
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800974/**
James Dong334de522012-03-12 12:47:14 -0700975 * Defines Encoder Frame Rate setting
976 *
977 * STRUCT MEMBERS:
978 * nSize : Size of the structure in bytes
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800979 * nVersion : OMX specification version information
James Dong334de522012-03-12 12:47:14 -0700980 * nPortIndex : Port that this structure applies to
981 * xEncodeFramerate : Encoding framerate represented in Q16 format
982 */
983typedef struct OMX_CONFIG_FRAMERATETYPE {
984 OMX_U32 nSize;
985 OMX_VERSIONTYPE nVersion;
986 OMX_U32 nPortIndex;
987 OMX_U32 xEncodeFramerate; /* Q16 format */
988} OMX_CONFIG_FRAMERATETYPE;
989
990typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
991 OMX_U32 nSize;
992 OMX_VERSIONTYPE nVersion;
993 OMX_U32 nPortIndex;
994 OMX_BOOL IntraRefreshVOP;
995} OMX_CONFIG_INTRAREFRESHVOPTYPE;
996
997typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
998 OMX_U32 nSize;
999 OMX_VERSIONTYPE nVersion;
1000 OMX_U32 nPortIndex;
1001 OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
1002 OMX_U8 ErrMap[1]; /* Error map hint */
1003} OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
1004
1005typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
1006 OMX_U32 nSize;
1007 OMX_VERSIONTYPE nVersion;
1008 OMX_U32 nPortIndex;
1009 OMX_BOOL bEnabled;
1010} OMX_CONFIG_MBERRORREPORTINGTYPE;
1011
1012typedef struct OMX_PARAM_MACROBLOCKSTYPE {
1013 OMX_U32 nSize;
1014 OMX_VERSIONTYPE nVersion;
1015 OMX_U32 nPortIndex;
1016 OMX_U32 nMacroblocks;
1017} OMX_PARAM_MACROBLOCKSTYPE;
1018
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001019/**
1020 * AVC Slice Mode modes
James Dong334de522012-03-12 12:47:14 -07001021 *
1022 * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
1023 * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
1024 * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
1025 */
1026typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
1027 OMX_VIDEO_SLICEMODE_AVCDefault = 0,
1028 OMX_VIDEO_SLICEMODE_AVCMBSlice,
1029 OMX_VIDEO_SLICEMODE_AVCByteSlice,
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001030 OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001031 OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1032 OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
1033} OMX_VIDEO_AVCSLICEMODETYPE;
1034
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001035/**
1036 * AVC FMO Slice Mode Params
James Dong334de522012-03-12 12:47:14 -07001037 *
1038 * STRUCT MEMBERS:
1039 * nSize : Size of the structure in bytes
1040 * nVersion : OMX specification version information
1041 * nPortIndex : Port that this structure applies to
1042 * nNumSliceGroups : Specifies the number of slice groups
1043 * nSliceGroupMapType : Specifies the type of slice groups
1044 * eSliceMode : Specifies the type of slice
1045 */
1046typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001047 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001048 OMX_VERSIONTYPE nVersion;
1049 OMX_U32 nPortIndex;
1050 OMX_U8 nNumSliceGroups;
1051 OMX_U8 nSliceGroupMapType;
1052 OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1053} OMX_VIDEO_PARAM_AVCSLICEFMO;
1054
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001055/**
James Dong334de522012-03-12 12:47:14 -07001056 * AVC IDR Period Configs
1057 *
1058 * STRUCT MEMBERS:
1059 * nSize : Size of the structure in bytes
1060 * nVersion : OMX specification version information
1061 * nPortIndex : Port that this structure applies to
1062 * nIDRPeriod : Specifies periodicity of IDR frames
1063 * nPFrames : Specifies internal of coding Intra frames
1064 */
1065typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001066 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001067 OMX_VERSIONTYPE nVersion;
1068 OMX_U32 nPortIndex;
1069 OMX_U32 nIDRPeriod;
1070 OMX_U32 nPFrames;
1071} OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1072
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001073/**
James Dong334de522012-03-12 12:47:14 -07001074 * AVC NAL Size Configs
1075 *
1076 * STRUCT MEMBERS:
1077 * nSize : Size of the structure in bytes
1078 * nVersion : OMX specification version information
1079 * nPortIndex : Port that this structure applies to
1080 * nNaluBytes : Specifies the NAL unit size
1081 */
1082typedef struct OMX_VIDEO_CONFIG_NALSIZE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001083 OMX_U32 nSize;
James Dong334de522012-03-12 12:47:14 -07001084 OMX_VERSIONTYPE nVersion;
1085 OMX_U32 nPortIndex;
1086 OMX_U32 nNaluBytes;
1087} OMX_VIDEO_CONFIG_NALSIZE;
1088
1089/** @} */
1090
1091#ifdef __cplusplus
1092}
1093#endif /* __cplusplus */
1094
1095#endif
1096/* File EOF */
1097