OMX_TI_Video.h revision c322989ae6ff6769490828de1b5eda12b749cce9
1/*
2 * Copyright (c) 2010, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * *  Redistributions of source code must retain the above copyright
10 *    notice, this list of conditions and the following disclaimer.
11 *
12 * *  Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 *
16 * *  Neither the name of Texas Instruments Incorporated nor the names of
17 *    its contributors may be used to endorse or promote products derived
18 *    from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/* -------------------------------------------------------------------------- */
34/*
35 * @file:Omx_ti_video.h
36 * This header defines the structures specific to the param or config indices of Openmax Video Component.
37 *
38 * @path:
39 * \WTSD_DucatiMMSW\ omx\omx_il_1_x\omx_core\
40
41 * -------------------------------------------------------------------------- */
42
43/* =========================================================================
44 *!
45 *! Revision History
46 *! =====================================================================
47 *! 24-Dec-2008  Navneet 	navneet@ti.com  	Initial Version
48 *! 14-Jul-2009	Radha Purnima  radhapurnima@ti.com
49 *! 25-Aug-2009	Radha Purnima  radhapurnima@ti.com
50 * =========================================================================*/
51
52
53#ifndef OMX_TI_VIDEO_H
54#define OMX_TI_VIDEO_H
55#define H264ENC_MAXNUMSLCGPS 2
56
57#include <OMX_Core.h>
58
59/**
60 *	@brief	mode selection for the data that is given to the Codec
61 */
62
63typedef enum OMX_VIDEO_DATASYNCMODETYPE {
64    OMX_Video_FixedLength,	//!<  Interms of multiples of 4K
65    OMX_Video_SliceMode,		//!<  Slice mode
66    OMX_Video_NumMBRows,	//!< Number of rows, each row is 16 lines of video
67    OMX_Video_EntireFrame  	//!< Processing of entire frame data
68} OMX_VIDEO_DATASYNCMODETYPE;
69
70
71/* ========================================================================== */
72/*!
73 @brief OMX_TI_VIDEO_PARAM_DATAMODE  :to configure how the input and output data is fed to the Codec
74 @param  nPortIndex  to specify the index of the port
75 @param  eDataMode 	to specify the data mode
76 						@sa  OMX_VIDEO_DATASYNCMODETYPE
77 @param  nNumDataUnits	 to specify the number of data units (where units are of type defined by eDataMode)
78 */
79/* ==========================================================================*/
80typedef struct OMX_VIDEO_PARAM_DATASYNCMODETYPE{
81	OMX_U32 nSize;
82	OMX_VERSIONTYPE nVersion;
83	OMX_U32 nPortIndex;
84	OMX_VIDEO_DATASYNCMODETYPE eDataMode;
85	OMX_U32 nNumDataUnits;
86} OMX_VIDEO_PARAM_DATASYNCMODETYPE;
87
88/**
89 *	@brief	Aspect Ratio type selection for the encoded bit stream
90 */
91typedef enum OMX_VIDEO_ASPECTRATIOTYPE{
92	OMX_Video_AR_Unspecified,  //!< Unspecified aspect ratio
93	OMX_Video_AR_Square ,  //!< 1:1 (square) aspect ratio
94	OMX_Video_AR_12_11  ,  //!<  12:11  aspect ratio
95	OMX_Video_AR_10_11  ,  //!<  10:11  aspect ratio
96	OMX_Video_AR_16_11  ,  //!<  16:11  aspect ratio
97	OMX_Video_AR_40_33  ,  //!<  40:33  aspect ratio
98	OMX_Video_AR_24_11  ,  //!<  24:11  aspect ratio
99	OMX_Video_AR_20_11  ,  //!<  20:11  aspect ratio
100	OMX_Video_AR_32_11  ,  //!<  32:11  aspect ratio
101	OMX_Video_AR_80_33  ,  //!<  80:33  aspect ratio
102	OMX_Video_AR_18_11  ,  //!<  18:11  aspect ratio
103	OMX_Video_AR_15_15  ,  //!<  15:15  aspect ratio
104	OMX_Video_AR_64_33  ,  //!<  64:33  aspect ratio
105	OMX_Video_AR_160_99 ,  //!<  160:99 aspect ratio
106	OMX_Video_AR_4_3    ,  //!<  4:3    aspect ratio
107	OMX_Video_AR_3_2    ,  //!<  3:2    aspect ratio
108	OMX_Video_AR_2_1    ,  //!<  2:1    aspect ratio
109	OMX_Video_AR_Extended = 255,       //!<  Extended aspect ratio
110   	OMX_Video_AR_Extended_MAX =  0X7FFFFFFF
111}OMX_VIDEO_ASPECTRATIOTYPE;
112
113
114/* ========================================================================== */
115/*!
116 @brief OMX_TI_VIDEO_PARAM_VUI_SELECT  :to select the VUI Settings
117 @param  bAspectRatioPresent flag to indicate the insertion of aspect ratio information in VUI part of bit-stream
118 @param  ePixelAspectRatio to specify the Aspect Ratio
119 @param  bFullRange to indicate whether pixel value range is specified as full range or not (0 to 255)
120*/
121/* ==========================================================================*/
122typedef struct OMX_VIDEO_PARAM_VUIINFOTYPE {
123	OMX_U32	 nSize;
124	OMX_VERSIONTYPE nVersion;
125	OMX_U32	 nPortIndex;
126	OMX_BOOL bAspectRatioPresent;
127	OMX_VIDEO_ASPECTRATIOTYPE ePixelAspectRatio;
128	OMX_BOOL bFullRange;
129}OMX_VIDEO_PARAM_VUIINFOTYPE;
130
131/* ========================================================================== */
132/*!
133 @brief OMX_VIDEO_CONFIG_PIXELINFOTYPE  :to specify the information related to the input pixel data (aspect ratio & range) to the Codec
134 										so that codec can incorporate this info in the coded bit stream
135 @param  nWidth 	 to specify the Aspect ratio: width of the pixel
136 @param  nHeight 	 to specify the Aspect ratio: height of the pixel
137 */
138/* ==========================================================================*/
139typedef struct OMX_VIDEO_CONFIG_PIXELINFOTYPE  {
140	OMX_U32 nSize;
141	OMX_VERSIONTYPE nVersion;
142	OMX_U32 nPortIndex;
143	OMX_U32 nWidth;
144	OMX_U32 nHeight;
145} OMX_VIDEO_CONFIG_PIXELINFOTYPE;
146
147/* ========================================================================== */
148/*!
149 @brief OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE : to configure what NALU  need to send along the frames of different types (Intra,IDR...etc)
150 @param  nStartofSequence 	to configure the different NALU (specified via enabling/disabling (1/0) the bit positions) that need to send along with the Start of sequence frame
151 @param  nEndofSequence	 	to to configure the different NALU (specified via enabling/disabling (1/0) the bit positions) that need to send along with the End of sequence frame
152 @param  nIDR 				to to configure the different NALU (specified via enabling/disabling (1/0) the bit positions) that need to send along with the IDR frame
153 @param  nIntraPicture	  		to to configure the different NALU (specified via enabling/disabling (1/0) the bit positions) that need to send along with the Intra frame
154 @param  nNonIntraPicture	  	to to configure the different NALU (specified via enabling/disabling (1/0) the bit positions) that need to send along with the Non Intra frame
155
156Bit Position:   13|       12|      11|           10|      9|    8|    7|   6|      5|         4|              3|              2|              1|          0
157NALU TYPE:  SPS_VUI|FILLER|EOSTREAM|EOSEQ|AUD|PPS|SPS|SEI|IDR_SLICE|SLICE_DP_C|SLICE_DP_B|SLICE_DP_A|SLICE|UNSPECIFIED \n
158*/
159/* ==========================================================================*/
160typedef struct OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE {
161	OMX_U32	 nSize;
162	OMX_VERSIONTYPE nVersion;
163	OMX_U32	 	nPortIndex;
164	OMX_U32 	nStartofSequence;
165	OMX_U32 	nEndofSequence;
166	OMX_U32 	nIDR;
167	OMX_U32 	nIntraPicture;
168	OMX_U32 	nNonIntraPicture;
169}OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE;
170
171
172/* ========================================================================== */
173/*!
174 @brief OMX_VIDEO_CONFIG_MESEARCHRANGETYPE : to configure Motion Estimation Parameters
175 @param  eMVAccuracy 		to specify the Motion Vector Accuracy
176 							@sa OMX_VIDEO_MOTIONVECTORTYPE
177 @param  sHorSearchRangeP	 	to Specify the Horizontal Search range for P Frame
178 @param  sVerSearchRangeP		to Specify the Vertical Search range for P Frame
179 @param  sHorSearchRangeB	  	to Specify the Horizontal Search range for B Frame
180 @param  sVerSearchRangeB	  	to Specify the Vertical Search range for B Frame
181*/
182/* ==========================================================================*/
183typedef struct OMX_VIDEO_CONFIG_MESEARCHRANGETYPE{
184	OMX_U32	 nSize;
185	OMX_VERSIONTYPE nVersion;
186	OMX_U32	 nPortIndex;
187	OMX_VIDEO_MOTIONVECTORTYPE eMVAccuracy;
188	OMX_U32	 nHorSearchRangeP;
189	OMX_U32	 nVerSearchRangeP;
190	OMX_U32	 nHorSearchRangeB;
191	OMX_U32	 nVerSearchRangeB;
192}OMX_VIDEO_CONFIG_MESEARCHRANGETYPE;
193
194/**
195 *	@brief	Block size specification
196 */
197typedef enum OMX_VIDEO_BLOCKSIZETYPE {
198	OMX_Video_Block_Size_16x16=0,
199	OMX_Video_Block_Size_8x8,
200	OMX_Video_Block_Size_8x4,
201	OMX_Video_Block_Size_4x8,
202	OMX_Video_Block_Size_4x4,
203   	OMX_Video_Block_Size_MAX =  0X7FFFFFFF
204}OMX_VIDEO_BLOCKSIZETYPE;
205
206/* ========================================================================== */
207/*!
208 @brief OMX_VIDEO_PARAM_MEBLOCKSIZETYPE : to configure the Min Motion Estimation block size for P and B frames
209 @param  eMinBlockSizeP 		to specify the Min Block size used for Motion Estimation incase of P Frames
210 							@sa OMX_VIDEO_BLOCKSIZETYPE
211 @param  eMinBlockSizeB	 	to specify the Min Block size used for Motion Estimation incase of B Frames
212*/
213/* ==========================================================================*/
214typedef struct OMX_VIDEO_PARAM_MEBLOCKSIZETYPE{
215	OMX_U32	 nSize;
216	OMX_VERSIONTYPE nVersion;
217	OMX_U32	 nPortIndex;
218	OMX_VIDEO_BLOCKSIZETYPE eMinBlockSizeP;
219	OMX_VIDEO_BLOCKSIZETYPE eMinBlockSizeB;
220}OMX_VIDEO_PARAM_MEBLOCKSIZETYPE;
221
222/**
223 *	@brief	to select the chroma component used for Intra Prediction
224 */
225typedef enum OMX_VIDEO_CHROMACOMPONENTTYPE {
226	OMX_Video_Chroma_Component_Cr_Only=0,	//!< consider only Cr chroma component for Intra prediction
227	OMX_Video_Chroma_Component_Cb_Cr_Both,  //!< consider both (Cb & Cr) chroma components for Intra prediction
228     OMX_Video_Chroma_Component_MAX =  0X7FFFFFFF
229}OMX_VIDEO_CHROMACOMPONENTTYPE;
230
231/* ========================================================================== */
232/*!
233 @brief OMX_VIDEO_PARAM_INTRAPREDTYPE : to configure the Modes for the different block sizes during Intra Prediction
234 @param  nLumaIntra4x4Enable 	 	to configure the Modes for 4x4 block size during luma intra prediction: bit position specifies the modes that are enabled/disabled
235								 HOR_UP|VERT_LEFT|HOR_DOWN|VERT_RIGHT|DIAG_DOWN_RIGHT|DIAG_DOWN_LEFT|DC|HOR|VER
236 @param  nLumaIntra8x8Enable	 	to configure the Modes for 4x4 block size during luma intra prediction
237 								HOR_UP|VERT_LEFT|HOR_DOWN|VERT_RIGHT|DIAG_DOWN_RIGHT|DIAG_DOWN_LEFT|DC|HOR|VER
238 @param  nLumaIntra16x16Enable	 	to configure the Modes for 4x4 block size during luma intra prediction
239								 PLANE|DC|HOR|VER
240 @param  nChromaIntra8x8Enable	 	to configure the Modes for 4x4 block size during luma intra prediction
241								 PLANE|DC|HOR|VER
242 @param  eChromaComponentEnable	to select the chroma components used for the intra prediction
243 								@sa OMX_VIDEO_CHROMACOMPONENTTYPE
244*/
245/* ==========================================================================*/
246typedef struct OMX_VIDEO_PARAM_INTRAPREDTYPE{
247	OMX_U32	 nSize;
248	OMX_VERSIONTYPE nVersion;
249	OMX_U32	 nPortIndex;
250	OMX_U32	 nLumaIntra4x4Enable;
251	OMX_U32 nLumaIntra8x8Enable;
252	OMX_U32 nLumaIntra16x16Enable;
253	OMX_U32 nChromaIntra8x8Enable;
254	OMX_VIDEO_CHROMACOMPONENTTYPE eChromaComponentEnable;
255}OMX_VIDEO_PARAM_INTRAPREDTYPE;
256
257
258/**
259 *	@brief	Encoding Mode Preset
260 */
261typedef enum OMX_VIDEO_ENCODING_MODE_PRESETTYPE {
262	OMX_Video_Enc_Default=0, 	//!<  for all the params default values are taken
263	OMX_Video_Enc_High_Quality, //!<  todo: mention the parameters that takes specific values depending on this selection
264	OMX_Video_Enc_User_Defined,
265	OMX_Video_Enc_High_Speed_Med_Quality,
266	OMX_Video_Enc_Med_Speed_Med_Quality,
267	OMX_Video_Enc_Med_Speed_High_Quality,
268	OMX_Video_Enc_High_Speed,
269   	OMX_Video_Enc_Preset_MAX =  0X7FFFFFFF
270}OMX_VIDEO_ENCODING_MODE_PRESETTYPE;
271
272/**
273 *	@brief	Rate Control Preset
274 */
275typedef enum OMX_VIDEO_RATECONTROL_PRESETTYPE {
276	OMX_Video_RC_Low_Delay,	//!<todo:  mention the parameters that takes specific values depending on this selection
277	OMX_Video_RC_Storage,
278	OMX_Video_RC_Twopass,
279	OMX_Video_RC_None,
280	OMX_Video_RC_User_Defined,
281   	OMX_Video_RC_MAX =  0X7FFFFFFF
282}OMX_VIDEO_RATECONTROL_PRESETTYPE;
283
284/* ========================================================================== */
285/*!
286 @brief OMX_VIDEO_PARAM_ENCODER_PRESETTYPE : to select the preset for Encoding Mode & Rate Control
287 @param  eEncodingModePreset		to specify Encoding Mode Preset
288 							@sa OMX_VIDEO_ENCODING_MODE_PRESETTYPE
289 @param  eRateControlPreset	to specify Rate Control Preset
290 							@sa OMX_VIDEO_RATECONTROL_PRESETTYPE
291*/
292/* ==========================================================================*/
293typedef struct OMX_VIDEO_PARAM_ENCODER_PRESETTYPE{
294	OMX_U32	 nSize;
295	OMX_VERSIONTYPE nVersion;
296	OMX_U32	 nPortIndex;
297	OMX_VIDEO_ENCODING_MODE_PRESETTYPE eEncodingModePreset;
298	OMX_VIDEO_RATECONTROL_PRESETTYPE eRateControlPreset;
299}OMX_VIDEO_PARAM_ENCODER_PRESETTYPE;
300
301
302/**
303 *	@brief	 input content type
304 */
305typedef enum OMX_TI_VIDEO_FRAMECONTENTTYPE {
306	OMX_TI_Video_Progressive = 0,			//!<Progressive frame
307	OMX_TI_Video_Interlace_BothFieldsTogether = 1,	//!<Interlaced frame
308	OMX_TI_Video_Interlace_OneField = 2,
309	OMX_TI_Video_AVC_2004_StereoInfoType = 3,
310	OMX_TI_Video_AVC_2010_StereoFramePackingType = 4,
311	OMX_TI_Video_FrameContentType_MAX = 0x7FFFFFFF
312}OMX_TI_VIDEO_FRAMECONTENTTYPE;
313
314/**
315 *	@brief	 Specifies the type of interlace content
316 */
317typedef enum OMX_TI_VIDEO_AVC_INTERLACE_CODINGTYPE {
318	OMX_TI_Video_Interlace_PICAFF = 0,	//!< PicAFF type of interlace coding
319	OMX_TI_Video_Interlace_MBAFF,		//!< MBAFF type of interlace coding
320	OMX_TI_Video_Interlace_Fieldonly,	//!< Field only coding
321	OMX_TI_Video_Interlace_Fieldonly_MRF=OMX_TI_Video_Interlace_Fieldonly,
322	OMX_TI_Video_Interlace_Fieldonly_ARF,
323	OMX_TI_Video_Interlace_Fieldonly_SPF,	//!< Field only coding where codec decides the partiy of the field to be used based upon content
324	OMX_Video_Interlace_MAX = 0x7FFFFFFF
325}OMX_TI_VIDEO_AVC_INTERLACE_CODINGTYPE;
326
327/* ========================================================================== */
328/*!
329 @brief OMX_TI_VIDEO_PARAM_FRAMEDATACONTENTTYPE : to configure the data content
330 @param  eContentType		to specify Content type
331 							@sa OMX_VIDEO_FRAMECONTENTTYPE
332*/
333/* ==========================================================================*/
334typedef struct OMX_TI_VIDEO_PARAM_FRAMEDATACONTENTTYPE{
335	OMX_U32	 nSize;
336	OMX_VERSIONTYPE nVersion;
337	OMX_U32	 nPortIndex;
338	OMX_TI_VIDEO_FRAMECONTENTTYPE eContentType;
339}OMX_TI_VIDEO_PARAM_FRAMEDATACONTENTTYPE;
340
341/* ========================================================================== */
342/*!
343 @brief OMX_TI_VIDEO_PARAM_AVCINTERLACECODING : to configure the interlace encoding related settings
344 @param  eInterlaceCodingType	to specify the settings of interlace content
345 							@sa OMX_VIDEO_INTERLACE_CODINGTYPE
346 @param  bTopFieldFirst				to specify the first field sent is top or bottom
347 @param  bBottomFieldIntra		to specify codec that encode bottomfield also as intra or not
348*/
349/* ==========================================================================*/
350typedef struct OMX_TI_VIDEO_PARAM_AVCINTERLACECODING{
351	OMX_U32	 nSize;
352	OMX_VERSIONTYPE nVersion;
353	OMX_U32	 nPortIndex;
354	OMX_TI_VIDEO_AVC_INTERLACE_CODINGTYPE eInterlaceCodingType;
355	OMX_BOOL bTopFieldFirst;
356	OMX_BOOL bBottomFieldIntra;
357}OMX_TI_VIDEO_PARAM_AVCINTERLACECODING;
358/* ========================================================================== */
359/*!
360 @brief OMX_TI_VIDEO_PARAM_AVCENC_STEREOINFO2004  : to configure the 2004 related stereo information type
361*/
362/* ==========================================================================*/
363
364typedef struct OMX_TI_VIDEO_PARAM_AVCENC_STEREOINFO2004
365{
366	OMX_U32          nSize;
367	OMX_VERSIONTYPE  nVersion;
368	OMX_U32          nPortIndex;
369	OMX_BOOL         btopFieldIsLeftViewFlag;
370	OMX_BOOL         bViewSelfContainedFlag;
371} OMX_TI_VIDEO_AVCENC_STEREOINFO2004;
372
373typedef enum OMX_TI_VIDEO_AVCSTEREO_FRAMEPACKTYPE{
374	OMX_TI_Video_FRAMEPACK_CHECKERBOARD        = 0,
375	OMX_TI_Video_FRAMEPACK_COLUMN_INTERLEAVING = 1,
376	OMX_TI_Video_FRAMEPACK_ROW_INTERLEAVING    = 2,
377	OMX_TI_Video_FRAMEPACK_SIDE_BY_SIDE        = 3,
378	OMX_TI_Video_FRAMEPACK_TOP_BOTTOM          = 4,
379	OMX_TI_Video_FRAMEPACK_TYPE_DEFAULT        = OMX_TI_Video_FRAMEPACK_SIDE_BY_SIDE,
380	OMX_TI_Video_FRAMEPACK_TYPE_MAX = 0x7FFFFFFF
381} OMX_TI_VIDEO_AVCSTEREO_FRAMEPACKTYPE;
382
383/* ========================================================================== */
384/*!
385 @brief OMX_TI_VIDEO_PARAM_AVCENC_FRAMEPACKINGINFO2010 : to configure the 2010 related stereo information type
386*/
387/* ==========================================================================*/
388
389typedef struct OMX_TI_VIDEO_PARAM_AVCENC_FRAMEPACKINGINFO2010
390{
391	OMX_U32          nSize;
392	OMX_VERSIONTYPE nVersion;
393	OMX_U32          nPortIndex;
394	OMX_TI_VIDEO_AVCSTEREO_FRAMEPACKTYPE eFramePackingType;
395	OMX_U8         nFrame0PositionX;
396	OMX_U8         nFrame0PositionY;
397	OMX_U8         nFrame1PositionX;
398	OMX_U8         nFrame1PositionY;
399}OMX_TI_VIDEO_PARAM_AVCENC_FRAMEPACKINGINFO2010;
400
401/**
402 *	@brief	 Specifies Transform Block Size
403 */
404typedef enum OMX_VIDEO_TRANSFORMBLOCKSIZETYPE {
405	OMX_Video_Transform_Block_Size_4x4 =0,	//!< Transform blocks size is 8x8 : Valid for only High Profile
406	OMX_Video_Transform_Block_Size_8x8,	//!< Transform blocks size is 4x4
407	OMX_Video_Transform_Block_Size_Adaptive, //!< Adaptive transform block size : encoder decides as per content
408    OMX_Video_Transform_Block_Size_MAX =  0X7FFFFFFF
409}OMX_VIDEO_TRANSFORMBLOCKSIZETYPE;
410
411/* ========================================================================== */
412/*!
413 @brief OMX_VIDEO_PARAM_TRANSFORM_BLOCKSIZETYPE : to select the Block Size used for transformation
414 @param  eTransformBlocksize	to specify Block size used for transformation
415 							@sa OMX_VIDEO_TRANSFORMBLOCKSIZETYPE
416*/
417/* ==========================================================================*/
418
419typedef struct OMX_VIDEO_PARAM_TRANSFORM_BLOCKSIZETYPE{
420	OMX_U32	 nSize;
421	OMX_VERSIONTYPE nVersion;
422	OMX_U32	 nPortIndex;
423	OMX_VIDEO_TRANSFORMBLOCKSIZETYPE eTransformBlocksize;
424}OMX_VIDEO_PARAM_TRANSFORM_BLOCKSIZETYPE;
425
426
427/* ========================================================================== */
428/*!
429 @brief OMX_VIDEO_CONFIG_SLICECODINGTYPE : to configure the Slice Settings
430 @param  eSliceMode	to specify the Slice mode
431 							@sa OMX_VIDEO_AVCSLICEMODETYPE
432 @param  nSlicesize to specify the sliceSize
433*/
434/* ==========================================================================*/
435
436typedef struct OMX_VIDEO_CONFIG_SLICECODINGTYPE{
437	OMX_U32	 nSize;
438	OMX_VERSIONTYPE nVersion;
439	OMX_U32	 nPortIndex;
440	OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
441	OMX_U32	 nSlicesize;
442}OMX_VIDEO_CONFIG_SLICECODINGTYPE;
443
444/**
445 *	@brief	 Specifies Slice Group Change Direction Flag
446 */
447typedef enum OMX_VIDEO_SLIGRPCHANGEDIRTYPE{
448  OMX_Video_Raster_Scan             = 0 , //!< 0 : Raster scan order
449  OMX_Video_Clockwise              = 0 , //!< 0 : Clockwise (used for BOX OUT FMO Params)
450  OMX_Video_Right                   = 0 , //!< 0 : RIGHT (Used for Wipe FMO type)
451  OMX_Video_Reverse_Raster_Scan= 1 , //!< 1 : Reverse Raster Scan Order
452  OMX_Video_Counter_Clockwise       = 1 , //!< 1 : Counter Clockwise (used for BOX OUT FMO Params)
453  OMX_Video_Left                    = 1,  //!< 1 : LEFT (Used for Wipe FMO type)
454  OMX_Video_Left_MAX =  0X7FFFFFFF
455} OMX_VIDEO_SLICEGRPCHANGEDIRTYPE;
456
457/* ========================================================================== */
458/*!
459 @brief OMX_TI_VIDEO_PARAM_FMO_ADVANCEDSETTINGS : to configure the FMO Settings
460 @param
461*/
462/* ==========================================================================*/
463typedef struct OMX_VIDEO_PARAM_AVCADVANCEDFMOTYPE{
464	OMX_U32	 nSize;
465	OMX_VERSIONTYPE nVersion;
466	OMX_U32 nPortIndex;
467	OMX_U8 nNumSliceGroups;
468	OMX_U8 nSliceGroupMapType;
469	OMX_VIDEO_SLICEGRPCHANGEDIRTYPE eSliceGrpChangeDir;
470	OMX_U32 nSliceGroupChangeRate;
471	OMX_U32 nSliceGroupChangeCycle;
472	OMX_U32 nSliceGroupParams[H264ENC_MAXNUMSLCGPS] ;
473}OMX_VIDEO_PARAM_AVCADVANCEDFMOTYPE;
474
475/* ========================================================================== */
476/*!
477 @brief OMX_TI_VIDEO_CONFIG_QPSETTINGS : to configure the Qp Settings of I, P &B Frames
478 @param  nQpI
479*/
480/* ==========================================================================*/
481
482typedef struct OMX_VIDEO_CONFIG_QPSETTINGSTYPE{
483	OMX_U32	 nSize;
484	OMX_VERSIONTYPE nVersion;
485	OMX_U32	 nPortIndex;
486	OMX_U32	 nQpI;
487	OMX_U32	 nQpMaxI;
488	OMX_U32	 nQpMinI;
489	OMX_U32	 nQpP;
490	OMX_U32	 nQpMaxP;
491	OMX_U32	 nQpMinP;
492	OMX_U32	 nQpOffsetB;
493	OMX_U32	 nQpMaxB;
494	OMX_U32	 nQpMinB;
495}OMX_VIDEO_CONFIG_QPSETTINGSTYPE;
496
497/* ========================================================================== */
498/*!
499 @brief OMX_TI_VIDEO_PARAM_AVCHRDBUFFERSETTING : to configure the HRD
500	(Hypothetical Reference Decoder) related params
501 @param  nInitialBufferLevel	Initial buffer level for HRD compliance
502 @param  nHRDBufferSize		Hypothetical Reference Decoder buffer size
503 @param  nTargetBitrate		Target bitrate to encode with
504*/
505/* ==========================================================================*/
506
507typedef struct OMX_TI_VIDEO_PARAM_AVCHRDBUFFERSETTING {
508	OMX_U32     nSize;
509	OMX_VERSIONTYPE     nVersion;
510	OMX_U32    nPortIndex;
511	OMX_U32    nInitialBufferLevel;
512	OMX_U32    nHRDBufferSize;
513	OMX_U32    nTargetBitrate;
514} OMX_TI_VIDEO_PARAM_AVCHRDBUFFERSETTING;
515
516/* ========================================================================== */
517/*!
518 @brief OMX_TI_VIDEO_CONFIG_AVCHRDBUFFERSETTING : to configure the HRD
519	(Hypothetical Reference Decoder) related params
520 @param  nHRDBufferSize		Hypothetical Reference Decoder Buffer Size
521 @param  nEncodeBitrate		Target bitrate to encode with
522
523*/
524/* ==========================================================================*/
525
526typedef struct OMX_TI_VIDEO_CONFIG_AVCHRDBUFFERSETTING {
527	OMX_U32    nSize;
528	OMX_VERSIONTYPE     nVersion;
529	OMX_U32     nPortIndex;
530	OMX_U32     nHRDBufferSize;
531	OMX_U32     nEncodeBitrate;
532} OMX_TI_VIDEO_CONFIG_AVCHRDBUFFERSETTING;
533
534/* ========================================================================= */
535/*!
536 @brief OMX_TI_VIDEO_CODINGTYPE :
537	Extension to video coding type enum for VP6 and VP7
538 @param
539*/
540/* ==========================================================================*/
541
542typedef enum OMX_TI_VIDEO_CODINGTYPE {
543	OMX_VIDEO_CodingVP6 =
544		(OMX_VIDEO_CODINGTYPE) OMX_VIDEO_CodingVendorStartUnused +1,  /* VP6 */
545	OMX_VIDEO_CodingVP7, /* VP7 */
546	OMX_TI_VIDEO_CodingSORENSONSPK   /* Sorenson Spark */
547}OMX_TI_VIDEO_CODINGTYPE;
548
549
550/* ========================================================================= */
551/*!
552 @brief OMX_TI_VIDEO_MPEG4LEVELTYPE:
553        Extension to MPEG-4 level to cater to level 6
554 @param
555*/
556/* ==========================================================================*/
557typedef enum OMX_TI_VIDEO_MPEG4LEVELTYPE {
558        OMX_TI_VIDEO_MPEG4Level6  =
559            (OMX_VIDEO_MPEG4LEVELTYPE) OMX_VIDEO_MPEG4LevelVendorStartUnused + 1
560} OMX_TI_VIDEO_MPEG4LEVELTYPE;
561
562
563
564/**
565 *	@brief	 Specifies various intra refresh methods
566 */
567typedef enum OMX_TI_VIDEO_INTRAREFRESHTYPE {
568    OMX_TI_VIDEO_IntraRefreshNone = 0,
569    OMX_TI_VIDEO_IntraRefreshCyclicMbs,
570    OMX_TI_VIDEO_IntraRefreshCyclicRows,
571    OMX_TI_VIDEO_IntraRefreshMandatory,
572    OMX_TI_VIDEO_IntraRefreshMax = 0x7FFFFFFF
573} OMX_TI_VIDEO_INTRAREFRESHTYPE;
574
575
576/* ========================================================================== */
577/*!
578 @brief OMX_TI_VIDEO_PARAM_INTRAREFRESHTYPE  : Configuration parameters for
579                                               intra refresh settings
580 @param  eRefreshMode		Various refresh modes supported
581 @param  nIntraRefreshRate 	Intra refresh rate
582*/
583/* ==========================================================================*/
584
585typedef struct OMX_TI_VIDEO_PARAM_INTRAREFRESHTYPE {
586    OMX_U32 nSize;
587    OMX_VERSIONTYPE nVersion;
588    OMX_U32 nPortIndex;
589    OMX_TI_VIDEO_INTRAREFRESHTYPE eRefreshMode;
590    OMX_U32 nIntraRefreshRate;
591} OMX_TI_VIDEO_PARAM_INTRAREFRESHTYPE;
592
593
594/* ============================================================================= */
595/*!
596 @brief OMX_TI_STEREODECINFO : Structure to access 2004 SEI message generated by
597 H264 decoder as metatadata on its output port.
598 */
599/* ============================================================================= */
600
601typedef struct OMX_TI_STEREODECINFO {
602	OMX_U32 nFieldViewsFlag;
603	OMX_U32 nTopFieldIsLeftViewFlag;
604	OMX_U32 nCurrentFrameIsLeftViewFlag;
605	OMX_U32 nNextFrameIsSecondViewFlag;
606	OMX_U32 nLeftViewSelfContainedFlag;
607	OMX_U32 nRightViewSelfContainedFlag;
608} OMX_TI_STEREODECINFO;
609
610typedef struct OMX_TI_FRAMEPACKINGDECINFO {
611	OMX_U32 nFramePackingArrangementId;
612	OMX_U32 nFramePackingArrangementRepetitionPeriod;
613	OMX_U8  nFramePackingArrangementCancelFlag;
614	OMX_U8  nFramePackingArrangementType;
615	OMX_U8  nQuincunxSamplingFlag;
616	OMX_U8  nContentInterpretationType;
617	OMX_U8  nSpatialFlippingFlag;
618	OMX_U8  nFrame0FlippedFlag;
619	OMX_U8  nFieldViewsFlag;
620	OMX_U8  nCurrentFrameIsFrame0Flag;
621	OMX_U8  nFrame0SelfContainedFlag;
622	OMX_U8  nFrame1SelfContainedFlag;
623	OMX_U8  nFrame0GridPositionX;
624	OMX_U8  nFrame0GridPositionY;
625	OMX_U8  nFrame1GridPositionX;
626	OMX_U8  nFrame1GridPositionY;
627	OMX_U8  nFramePackingArrangementReservedByte;
628	OMX_U8  nFramePackingArrangementExtensionFlag;
629} OMX_TI_FRAMEPACKINGDECINFO;
630
631/* ============================================================================= */
632/*!
633 @brief OMX_TI_VIDEO_RANGEMAPPING : Structure to access luma and chroma range
634                                    mapping generated by decoders as
635                                    metatadata on its output port.
636 @param nRangeMappingLuma     Luma scale factor for range mapping.
637 @param nRangeMappingChroma   Chroma scale factor for range mapping.
638*/
639/* ============================================================================= */
640
641typedef struct OMX_TI_VIDEO_RANGEMAPPING {
642	OMX_U32 nRangeMappingLuma;
643	OMX_U32 nRangeMappingChroma;
644} OMX_TI_VIDEO_RANGEMAPPING;
645
646/* ============================================================================= */
647/*!
648 @brief OMX_TI_VIDEO_RESCALINGMATRIX : Structure to access rescaled
649                                       width/height generated by decoders
650                                       as metatadata on its output port.
651 @param nScaledHeight   Scaled image width for post processing for decoder.
652 @param nScaledWidth    Scaled image height for post processing for decoder.
653*/
654/* ============================================================================= */
655
656typedef struct OMX_TI_VIDEO_RESCALINGMATRIX {
657	OMX_U32 nScaledHeight;
658	OMX_U32 nScaledWidth;
659} OMX_TI_VIDEO_RESCALINGMATRIX;
660
661
662/*==========================================================================*/
663/*!
664 @brief OMX_TI_PARAM_PAYLOADHEADERFLAG : To specify the payload headerflag
665                                         for VP6/VP7 decoder.
666 @param bPayloadHeaderFlag      Flag - TRUE indicates that frame length and
667                                timestamp(for IVF format) will be part of
668                                frame input buffer.
669                                Flag - FALSE indecates that frame length and
670                                timestamp(for IVF format) will not be part of
671                                the input buffer.
672*/
673/*==========================================================================*/
674
675typedef struct OMX_TI_PARAM_PAYLOADHEADERFLAG {
676	OMX_U32 nSize;
677	OMX_VERSIONTYPE nVersion;
678	OMX_BOOL bPayloadHeaderFlag;
679} OMX_TI_PARAM_PAYLOADHEADERFLAG;
680
681
682/*==========================================================================*/
683/*!
684@brief OMX_TI_PARAM_IVFFLAG : Suport added to handle IVF header Decoding Mode
685@param bIvfFlag               TRUE enables IVF decoding mode.
686                              FALSE indicates bitstream format is non-IVF.
687*/
688/*==========================================================================*/
689
690typedef struct OMX_TI_PARAM_IVFFLAG {
691	OMX_U32 nSize;
692	OMX_VERSIONTYPE nVersion;
693	OMX_BOOL bIvfFlag;
694} OMX_TI_PARAM_IVFFLAG;
695
696// A pointer to this struct is passed to OMX_SetParameter() when the extension
697// index "OMX.google.android.index.storeMetaDataInBuffers"
698// is given.
699//
700// When meta data is stored in the video buffers passed between OMX clients
701// and OMX components, interpretation of the buffer data is up to the
702// buffer receiver, and the data may or may not be the actual video data, but
703// some information helpful for the receiver to locate the actual data.
704// The buffer receiver thus needs to know how to interpret what is stored
705// in these buffers, with mechanisms pre-determined externally. How to
706// interpret the meta data is outside of the scope of this method.
707//
708// Currently, this is specifically used to pass meta data from video source
709// (camera component, for instance) to video encoder to avoid memcpying of
710// input video frame data. To do this, bStoreMetaDta is set to OMX_TRUE.
711// If bStoreMetaData is set to false, real YUV frame data will be stored
712// in the buffers. In addition, if no OMX_SetParameter() call is made
713// with the corresponding extension index, real YUV data is stored
714// in the buffers.
715typedef struct OMX_VIDEO_STOREMETADATAINBUFFERSPARAMS {
716    OMX_U32 nSize;
717    OMX_VERSIONTYPE nVersion;
718    OMX_U32 nPortIndex;
719    OMX_BOOL bStoreMetaData;
720} OMX_VIDEO_STOREMETADATAINBUFFERSPARAMS;
721
722#endif /* OMX_TI_VIDEO_H */
723
724