1/*--------------------------------------------------------------------------
2Copyright (c) 2011,2015 The Linux Foundation. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are met:
6    * Redistributions of source code must retain the above copyright
7      notice, this list of conditions and the following disclaimer.
8    * Redistributions in binary form must reproduce the above copyright
9      notice, this list of conditions and the following disclaimer in the
10      documentation and/or other materials provided with the distribution.
11    * Neither the name of The Linux Foundation nor
12      the names of its contributors may be used to endorse or promote
13      products derived from this software without specific prior written
14      permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27--------------------------------------------------------------------------*/
28
29#ifndef __H_QOMX_VIDEOEXTENSIONS_H__
30#define __H_QOMX_VIDEOEXTENSIONS_H__
31
32/*========================================================================
33
34*//** @file QOMX_VideoExtensions.h
35
36@par FILE SERVICES:
37      Qualcomm extensions API for OpenMax IL Video.
38
39      This file contains the description of the Qualcomm OpenMax IL
40      video extention interface, through which the IL client and OpenMax
41      components can access additional video capabilities.
42
43*//*====================================================================== */
44
45
46/*========================================================================== */
47
48/*========================================================================
49
50                     INCLUDE FILES FOR MODULE
51
52========================================================================== */
53#include <OMX_Core.h>
54#include <OMX_Video.h>
55
56/*========================================================================
57
58                      DEFINITIONS AND DECLARATIONS
59
60========================================================================== */
61
62#if defined( __cplusplus )
63extern "C"
64{
65#endif /* end of macro __cplusplus */
66
67/* Video extension strings */
68#define OMX_QCOM_INDEX_PARAM_VIDEO_SYNTAXHDR                "OMX.QCOM.index.param.video.SyntaxHdr"
69#define OMX_QCOM_INDEX_PARAM_VIDEO_ENCODERMODE              "OMX.QCOM.index.param.video.EncoderMode"
70#define OMX_QCOM_INDEX_CONFIG_VIDEO_INTRAREFRESH            "OMX.QCOM.index.config.video.IntraRefresh"
71#define OMX_QCOM_INDEX_CONFIG_VIDEO_INTRAPERIOD             "OMX.QCOM.index.config.video.IntraPeriod"
72#define OMX_QCOM_INDEX_CONFIG_VIDEO_TEMPORALSPATIALTRADEOFF "OMX.QCOM.index.config.video.TemporalSpatialTradeOff"
73#define OMX_QCOM_INDEX_CONFIG_VIDEO_MBCONCEALMENTREPORTING  "OMX.QCOM.index.config.video.MBConcealmentReporting"
74#define OMX_QCOM_INDEX_PARAM_VIDEO_EXTRADATAMULTISLICEINFO  "OMX.QCOM.index.param.video.ExtraDataMultiSliceInfo" /**< reference: QOMX_ENABLETYPE */
75#define OMX_QCOM_INDEX_CONFIG_VIDEO_FLOWSTATUS              "OMX.QCOM.index.config.video.FlowStatus"             /**< reference: QOMX_FLOWSTATUSTYPE */
76#define OMX_QCOM_INDEX_PARAM_VIDEO_PICTURETYPEDECODE        "OMX.QCOM.index.param.video.PictureTypeDecode"       /**< reference: QOMX_VIDEO_DECODEPICTURETYPE */
77#define OMX_QCOM_INDEX_PARAM_VIDEO_SAMPLEASPECTRATIO        "OMX.QCOM.index.param.video.SampleAspectRatio"       /**< reference: QOMX_VIDEO_SAMPLEASPECTRATIO */
78#define OMX_QCOM_INDEX_PARAM_VIDEO_EXTRADATALTRINFO         "OMX.QCOM.index.param.video.ExtraDataLTRInfo"        /**< reference: QOMX_ENABLETYPE */
79
80/* Video coding types */
81#define OMX_QCOM_INDEX_PARAM_VIDEO_DIVX                     "OMX.QCOM.index.param.video.DivX"
82#define OMX_QCOM_INDEX_PARAM_VIDEO_VP                       "OMX.QCOM.index.param.video.VP"
83#define OMX_QCOM_INDEX_PARAM_VIDEO_SPARK                    "OMX.QCOM.index.param.video.Spark"
84#define OMX_QCOM_INDEX_PARAM_VIDEO_VC1                      "OMX.QCOM.index.param.video.VC1"
85
86/**
87 * Enumeration used to define the extended video compression
88 * codings, not present in the OpenMax IL 1.1.2 specification.
89 * NOTE:  This essentially refers to file extensions. If the
90 *        coding is being used to specify the ENCODE type, then
91 *        additional work must be done to configure the exact
92 *        flavor of the compression to be used.
93 */
94typedef enum QOMX_VIDEO_CODINGTYPE
95{
96    QOMX_VIDEO_CodingDivX   = 0x7F000001, /**< all versions of DivX */
97    QOMX_VIDEO_CodingVP     = 0x7F000002, /**< all versions of On2 VP codec */
98    QOMX_VIDEO_CodingSpark  = 0x7F000003, /**< Sorenson Spark */
99    QOMX_VIDEO_CodingVC1    = 0x7F000004, /**< VC-1 */
100    QOMX_VIDEO_MPEG1        = 0x7F000005  /**< MPEG-1 */
101} QOMX_VIDEO_CODINGTYPE;
102
103/**
104 * DivX Versions
105 */
106typedef enum QOMX_VIDEO_DIVXFORMATTYPE {
107    QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
108    QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
109    QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
110    QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
111    QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
112    QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
113    QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
114    QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
115} QOMX_VIDEO_DIVXFORMATTYPE;
116
117/**
118 * DivX profile types, each profile indicates support for
119 * various performance bounds.
120 */
121typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
122    QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
123    QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
124    QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
125    QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
126    QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
127    QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
128    QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
129    QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
130} QOMX_VIDEO_DIVXPROFILETYPE;
131
132/**
133 * DivX Video Params
134 *
135 *  STRUCT MEMBERS:
136 *  nSize      : Size of the structure in bytes
137 *  nVersion   : OMX specification version information
138 *  nPortIndex : Port that this structure applies to
139 *  eFormat    : Version of DivX stream / data
140 *  eProfile   : Profile of DivX stream / data
141 */
142typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
143    OMX_U32 nSize;
144    OMX_VERSIONTYPE nVersion;
145    OMX_U32 nPortIndex;
146    QOMX_VIDEO_DIVXFORMATTYPE eFormat;
147    QOMX_VIDEO_DIVXPROFILETYPE eProfile;
148} QOMX_VIDEO_PARAM_DIVXTYPE;
149
150/**
151 * VP Versions
152 */
153typedef enum QOMX_VIDEO_VPFORMATTYPE {
154    QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
155    QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
156    QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
157    QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
158    QOMX_VIDEO_VPFormat9      = 0x10, /**< VP9 Video Format */
159    QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
160    QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
161    QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
162} QOMX_VIDEO_VPFORMATTYPE;
163
164/**
165 * VP profile types, each profile indicates support for various
166 * encoding tools.
167 */
168typedef enum QOMX_VIDEO_VPPROFILETYPE {
169    QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
170    QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
171    QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
172    QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
173    QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
174    QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
175    QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
176    QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
177    QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
178} QOMX_VIDEO_VPPROFILETYPE;
179
180/**
181 * VP Video Params
182 *
183 *  STRUCT MEMBERS:
184 *  nSize      : Size of the structure in bytes
185 *  nVersion   : OMX specification version information
186 *  nPortIndex : Port that this structure applies to
187 *  eFormat    : Format of VP stream / data
188 *  eProfile   : Profile or Version of VP stream / data
189 */
190typedef struct QOMX_VIDEO_PARAM_VPTYPE {
191    OMX_U32 nSize;
192    OMX_VERSIONTYPE nVersion;
193    OMX_U32 nPortIndex;
194    QOMX_VIDEO_VPFORMATTYPE eFormat;
195    QOMX_VIDEO_VPPROFILETYPE eProfile;
196} QOMX_VIDEO_PARAM_VPTYPE;
197
198/**
199 * Spark Versions
200 */
201typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
202    QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
203    QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
204    QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
205    QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
206    QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
207    QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
208} QOMX_VIDEO_SPARKFORMATTYPE;
209
210/**
211 * Spark Video Params
212 *
213 *  STRUCT MEMBERS:
214 *  nSize      : Size of the structure in bytes
215 *  nVersion   : OMX specification version information
216 *  nPortIndex : Port that this structure applies to
217 *  eFormat    : Version of Spark stream / data
218 */
219typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
220    OMX_U32 nSize;
221    OMX_VERSIONTYPE nVersion;
222    OMX_U32 nPortIndex;
223    QOMX_VIDEO_SPARKFORMATTYPE eFormat;
224} QOMX_VIDEO_PARAM_SPARKTYPE;
225
226/**
227 * VC-1 profile types, each profile indicates support for
228 * various encoding tools.
229 */
230typedef enum QOMX_VIDEO_VC1PROFILETYPE {
231    QOMX_VIDEO_VC1ProfileSimple   = 0x01, /**< Simple Profile */
232    QOMX_VIDEO_VC1ProfileMain     = 0x02, /**< Main Profile */
233    QOMX_VIDEO_VC1ProfileAdvanced = 0x04, /**< Advanced Profile */
234    QOMX_VIDEO_VC1ProfileKhronosExtensions = 0x6F000000,
235    QOMX_VIDEO_VC1ProfileVendorStartUnused = 0x7F000000,
236    QOMX_VIDEO_VC1ProfileMax = 0x7FFFFFFF
237} QOMX_VIDEO_VC1PROFILETYPE;
238
239/**
240 * VC-1 level types, each level indicates support for various
241 * performance bounds.
242 */
243typedef enum QOMX_VIDEO_VC1LEVELTYPE {
244    QOMX_VIDEO_VC1LevelLow    = 0x01, /**< Low Level, applies to simple and main profiles*/
245    QOMX_VIDEO_VC1LevelMedium = 0x02, /**< Medium Level, applies to simple and main profiles */
246    QOMX_VIDEO_VC1LevelHigh   = 0x04, /**< High Level, applies to main profile only */
247    QOMX_VIDEO_VC1Level0      = 0x08, /**< Level 0, applies to advanced profile only */
248    QOMX_VIDEO_VC1Level1      = 0x10, /**< Level 1, applies to advanced profile only */
249    QOMX_VIDEO_VC1Level2      = 0x20, /**< Level 2, applies to advanced profile only */
250    QOMX_VIDEO_VC1Level3      = 0x40, /**< Level 3, applies to advanced profile only */
251    QOMX_VIDEO_VC1Level4      = 0x80, /**< Level 4, applies to advanced profile only */
252    QOMX_VIDEO_VC1LevelKhronosExtensions = 0x6F000000,
253    QOMX_VIDEO_VC1LevelVendorStartUnused = 0x7F000000,
254    QOMX_VIDEO_VC1LevelMax = 0x7FFFFFFF
255} QOMX_VIDEO_VC1LEVELTYPE;
256
257/**
258 * VC-1 Video Params
259 *
260 *  STRUCT MEMBERS:
261 *  nSize      : Size of the structure in bytes
262 *  nVersion   : OMX specification version information
263 *  nPortIndex : Port that this structure applies to
264 *  eProfile   : Profile of VC-1 stream / data
265 *  eLevel     : Level of VC-1 stream / data
266 */
267typedef struct QOMX_VIDEO_PARAM_VC1TYPE {
268    OMX_U32 nSize;
269    OMX_VERSIONTYPE nVersion;
270    OMX_U32 nPortIndex;
271    QOMX_VIDEO_VC1PROFILETYPE eProfile;
272    QOMX_VIDEO_VC1LEVELTYPE eLevel;
273} QOMX_VIDEO_PARAM_VC1TYPE;
274
275/**
276 * Extended MPEG-4 level types not defined in the OpenMax IL
277 * 1.1.2 specification, each level indicates support for various
278 * frame sizes, bit rates, decoder frame rates.
279 */
280typedef enum QOMX_VIDEO_MPEG4LEVELTYPE {
281    QOMX_VIDEO_MPEG4Level6 = 0x7F000001, /**< Level 6 */
282    QOMX_VIDEO_MPEG4Level7 = 0x7F000002, /**< Level 7 */
283    QOMX_VIDEO_MPEG4Level8 = 0x7F000003, /**< Level 8 */
284    QOMX_VIDEO_MPEG4Level9 = 0x7F000004, /**< Level 9 */
285    QOMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
286} QOMX_VIDEO_MPEG4LEVELTYPE;
287
288/**
289 * This structure is used in retrieving the syntax header from a
290 * video encoder component, or setting the out of band syntax
291 * header configuration data on a video decoder component.
292 *
293 * STRUCT MEMBERS:
294 *  nSize      : Size of the structure in bytes
295 *  nVersion   : OMX specification version info
296 *  nPortIndex : Port that this structure applies to
297 *  nBytes     : When used with OMX_GetParameter for the encoder
298 *               component, it is a read-write field. When
299 *               QOMX_VIDEO_SYNTAXHDRTYPE is passed in
300 *               OMX_GetParameter this is the size of the buffer
301 *               array pointed by data field. When the
302 *               OMX_GetParameter call returns this is the
303 *               amount of data within the buffer array.
304 *
305 *               The IL client needs to allocate the buffer
306 *               array and then request for the syntax header.
307 *               If the size of buffer array to allocate is
308 *               unknown to the IL client, then it can call
309 *               OMX_GetParamter with nBytes set to 0. In this
310 *               case, when OMX_GetParameter returns, the nBytes
311 *               field will be set to the size of the syntax
312 *               header. IL Client can then allocate a buffer of
313 *               this size and call OMX_GetParamter again.
314 *
315 *               When used with OMX_SetParameter for the decoder
316 *               component, it is a read-only field specifying
317 *               the amount of data in the buffer array.
318 *  data       : The syntax header data. The format of the
319 *               syntax header is specific to the video codec,
320 *               and is described below.
321 *
322 *   H.263      : N/A
323 *   H.264      : The SPS and PPS parameter sets
324 *   MPEG-4     : The VO, VOS, and VOL header
325 *   WMV7       : The "Extra Data" info, in the ASF Stream
326 *                Properties Object.
327 *   WMV8       : The "Extra Data" info, in the ASF Stream
328 *                Properties Object.
329 *   WMV9 SP/MP : The STRUCT_C portion of the sequence layer
330 *                meta data, defined in Table 263 of the VC-1
331 *                specification.
332 *   VC-1 SP/MP : The STRUCT_C portion of the sequence layer
333 *                meta data, defined in Table 263 of the VC-1
334 *                specification.
335 *   VC-1 AP    : The sequence and entry point header
336 *   DivX 3     : N/A
337 *   DivX 4.x   : The VO, VOS, and VOL header
338 *   DivX 5.x   : The VO, VOS, and VOL header
339 *   DivX 6.x   : The VO, VOS, and VOL header
340 *   VP6        : N/A
341 *   Spark      : N/A
342 */
343typedef struct QOMX_VIDEO_SYNTAXHDRTYPE {
344    OMX_U32 nSize;
345    OMX_VERSIONTYPE nVersion;
346    OMX_U32 nPortIndex;
347    OMX_U32 nBytes;
348    OMX_U8  data[1];
349} QOMX_VIDEO_SYNTAXHDRTYPE;
350
351
352/**
353 * Enumeration used to define the extended video intra refresh types, not
354 * present in the OpenMax IL 1.1.2 specification.
355 *
356 * ENUMS:
357 *  IntraRefreshRandom         : Random intra refresh mode.
358 */
359typedef enum QOMX_VIDEO_INTRAREFRESHTYPE
360{
361    QOMX_VIDEO_IntraRefreshRandom      = 0x7F100000
362} QOMX_VIDEO_INTRAREFRESHTYPE;
363
364
365/**
366 * This structure is used to configure the intra periodicity for encoder.
367 *
368 * STRUCT MEMBERS:
369 *  nSize      : Size of the structure in bytes
370 *  nVersion   : OMX specification version info
371 *  nPortIndex : Port that this structure applies to
372 *  nIDRPeriod : Defines the periodicity of IDR occurrence. This specifies
373 *               coding a frame as IDR after a specific number of intra
374 *               frames. The periodicity of intra frame coding is specified by
375 *               the nPFrames.  If nIDRPeriod is set to 0, only the first
376 *               frame of the encode session is an IDR frame. This field is
377 *               ignored for non-AVC codecs and is used only for codecs that
378 *               support IDR Period.
379 *  nPFrames : Specifies the number of P frames between each I Frame.
380 *  nBFrames : Specifies the number of B frames between each I Frame.
381 */
382typedef struct QOMX_VIDEO_INTRAPERIODTYPE  {
383    OMX_U32 nSize;
384    OMX_VERSIONTYPE nVersion;
385    OMX_U32 nPortIndex;
386    OMX_U32 nIDRPeriod;
387    OMX_U32 nPFrames;
388    OMX_U32 nBFrames;
389} QOMX_VIDEO_INTRAPERIODTYPE;
390
391
392/**
393 * Enumeration used to define the extended video extra data payload types not
394 * present in the OpenMax IL 1.1.2 specification.
395 *
396 * ENUMS:
397 *  VideoMultiSliceInfo : Multi slice layout information
398 *
399 *  Slice information layout:
400 *  First 4 bytes = Number of Slice Entries
401 *
402 *  Then individual slice entries: 8 bytes per entry.
403 *  Slice1 information: offset (4 bytes), Length (4 bytes)
404 *  Slice2 information: offset (4 bytes), Length (4 bytes)
405 *  Slice3 information: offset (4 bytes), Length (4 bytes)
406 *  ...................................
407 *  ...................................
408 *  SliceN information: offset (4 bytes), Length (4 bytes)
409 *
410 *
411 *  VideoNumConcealedMB : Number of concealed MBs
412 *
413 *  The data array consists of an unsigned 32-bit size field
414 *  indicating the number of concealed macroblocks in the
415 *  uncompressed frame.
416 *
417 *
418 *  QOMX_ExtraDataOMXIndex : Indicates that the data payload contains an
419 *  OpenMax index and associated payload.
420 *
421 *  The data of the extra data payload shall contain the value of the
422 *  OMX_INDEXTYPE corresponding to the requested operation as an unsigned
423 *  32 bit number occupying the first four bytes of the payload. The index
424 *  will be immediately followed by the associated structure. Padding bytes
425 *  are appended to ensure 32 bit address alignment if needed.
426 */
427typedef enum QOMX_VIDEO_EXTRADATATYPE
428{
429   QOMX_ExtraDataVideoMultiSliceInfo = 0x7F100000,
430   QOMX_ExtraDataVideoNumConcealedMB,
431   QOMX_ExtraDataOMXIndex,
432   QOMX_ExtraDataHDCPEncryptionInfo
433} QOMX_VIDEO_EXTRADATATYPE;
434
435
436/**
437 * Enumeration used to define the video encoder modes
438 *
439 * ENUMS:
440 *  EncoderModeDefault : Default video recording mode.
441 *                       All encoder settings made through
442 *                       OMX_SetParameter/OMX_SetConfig are applied. No
443 *                       parameter is overridden.
444 *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
445 *                   Service). This mode is similar to EncoderModeDefault
446 *                   except that here the Rate control mode is overridden
447 *                   internally and set as a variant of variable bitrate with
448 *                   variable frame rate. After this mode is set if the IL
449 *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
450 *                   OMX_IndexParamVideoBitrate that would be rejected. For
451 *                   this, client should set mode back to EncoderModeDefault
452 *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
453 */
454typedef enum QOMX_VIDEO_ENCODERMODETYPE
455{
456    QOMX_VIDEO_EncoderModeDefault        = 0x01,
457    QOMX_VIDEO_EncoderModeMMS            = 0x02,
458    QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
459} QOMX_VIDEO_ENCODERMODETYPE;
460
461/**
462 * This structure is used to set the video encoder mode.
463 *
464 * STRUCT MEMBERS:
465 *  nSize      : Size of the structure in bytes
466 *  nVersion   : OMX specification version info
467 *  nPortIndex : Port that this structure applies to
468 *  nMode : defines the video encoder mode
469 */
470typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
471    OMX_U32 nSize;
472    OMX_VERSIONTYPE nVersion;
473    OMX_U32 nPortIndex;
474    QOMX_VIDEO_ENCODERMODETYPE nMode;
475} QOMX_VIDEO_PARAM_ENCODERMODETYPE;
476
477
478/**
479 * This structure is used to set the temporal (picture rate) - spatial
480 * (picture quality) trade-off factor.
481 * This setting is only valid when rate control is enabled and set to a mode
482 * with variable frame rate. For all other rate control modes this setting is
483 * ignored.
484 *
485 * STRUCT MEMBERS:
486 *  nSize      : Size of the structure in bytes
487 *  nVersion   : OMX specification version info
488 *  nPortIndex : Port that this structure applies to
489 *  nTSFactor : temporal-spatial tradeoff factor value in the range of 0-100.
490 *              A factor of 0 won't emphasizes picture rate in rate
491 *  control decisions at all i.e only picture quality is emphasized. For
492 *  increasing values from 1 to 99 the emphasis of picture rate in rate
493 *  control decisions increases. A factor of 100 emphasizes only picture rate
494 *  in rate control decisions.
495 */
496typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE {
497    OMX_U32 nSize;
498    OMX_VERSIONTYPE nVersion;
499    OMX_U32 nPortIndex;
500    OMX_U32 nTSFactor;
501} QOMX_VIDEO_TEMPORALSPATIALTYPE;
502
503/**
504 * This structure is used to enable or disable the MB concealmenet reporting
505 * for the uncompressed frames emitted from the port.
506 *
507 * STRUCT MEMBERS:
508 *  nSize      : Size of the structure in bytes
509 *  nVersion   : OMX specification version info
510 *  nPortIndex : Port that this structure applies to
511 *  bEnableMBConcealmentReporting : Flag indicating whether MB concealment
512 *               reporting is enabled or disabled.
513 *               OMX_TRUE: Enables MB concealment reporting
514 *               OMX_FALSE: Disables MB concealment reporting
515 */
516typedef struct QOMX_VIDEO_MBCONCEALMENTREPORTINGTYPE {
517    OMX_U32 nSize;
518    OMX_VERSIONTYPE nVersion;
519    OMX_U32 nPortIndex;
520    OMX_BOOL bEnableMBConcealmentReporting;
521} QOMX_VIDEO_MBCONCEALMENTREPORTINGTYPE;
522
523/**
524 * Specifies the extended picture types. These values should be
525 * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
526 * signal all pictures types which are allowed.
527 *
528 * ENUMS:
529 *  H.264 Specific Picture Types:   IDR
530 */
531typedef enum QOMX_VIDEO_PICTURETYPE {
532    QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
533} QOMX_VIDEO_PICTURETYPE;
534
535/**
536 * This structure is used to configure the processing of
537 * specific picture types.
538 *
539 * STRUCT MEMBERS:
540 *  nSize         : Size of the structure in bytes
541 *  nVersion      : OMX specification version info
542 *  nPortIndex    : Port that this structure applies to
543 *  nPictureTypes : Specifies the picture type(s)
544 *                  that shall be processed. The value consists
545 *                  of the desired picture types, defined by the
546 *                  OMX_VIDEO_PICTURETYPE and
547 *                  QOMX_VIDEO_PICTURETYPE enumerations, OR'd to
548 *                  signal all the pictures types which are
549 *                  allowed.
550 */
551typedef struct QOMX_VIDEO_DECODEPICTURETYPE {
552    OMX_U32 nSize;
553    OMX_VERSIONTYPE nVersion;
554    OMX_U32 nPortIndex;
555    OMX_U32 nPictureTypes;
556} QOMX_VIDEO_DECODEPICTURETYPE;
557
558/**
559 * This structure describes the sample aspect ratio information.
560 *
561 * STRUCT MEMBERS:
562 *  nSize        : Size of the structure in bytes
563 *  nVersion     : OMX specification version info
564 *  nPortIndex   : Port that this structure applies to
565 *  nWidth       : Specifies the horizontal aspect size of
566 *                 the sample
567 *  nHeight      : Specifies the vertical aspect size of the
568 *                 sample
569 */
570typedef struct QOMX_VIDEO_SAMPLEASPECTRATIO {
571    OMX_U32 nSize;
572    OMX_VERSIONTYPE nVersion;
573    OMX_U32 nPortIndex;
574    OMX_U16 nWidth;
575    OMX_U16 nHeight;
576} QOMX_VIDEO_SAMPLEASPECTRATIO;
577
578#if defined( __cplusplus )
579}
580#endif /* end of macro __cplusplus */
581
582#endif /* end of macro __H_QOMX_VIDEOEXTENSIONS_H__ */
583