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