/* * Copyright (c) 2010, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* -------------------------------------------------------------------------- */ /* * @file:Omx_ti_video.h * This header defines the structures specific to the param or config indices of Openmax Video Component. * * @path: * \WTSD_DucatiMMSW\ omx\omx_il_1_x\omx_core\ * -------------------------------------------------------------------------- */ /* ========================================================================= * ! * ! Revision History * ! ===================================================================== * ! 24-Dec-2008 Navneet navneet@ti.com Initial Version * ! 14-Jul-2009 Radha Purnima radhapurnima@ti.com * ! 25-Aug-2009 Radha Purnima radhapurnima@ti.com * ! 16-May-2009 Shivaraj Shetty shettyshivaraj@ti.com * ! 20-jun-2012 x0078587@ti.com * =========================================================================*/ #ifndef OMX_TI_VIDEO_H #define OMX_TI_VIDEO_H #define H264ENC_MAXNUMSLCGPS 2 #define OMXH264E_MAX_SLICE_SUPPORTED 64 #define H264SVC_MAX_NUM_LAYER 9 #include /** * @brief mode selection for the data that is given to the Codec */ typedef enum OMX_VIDEO_DATASYNCMODETYPE { OMX_Video_FixedLength, //!< Interms of multiples of 4K OMX_Video_SliceMode, //!< Slice mode OMX_Video_NumMBRows, //!< Number of rows, each row is 16 lines of video OMX_Video_EntireFrame //!< Processing of entire frame data } OMX_VIDEO_DATASYNCMODETYPE; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_PARAM_DATAMODE :to configure how the input and output data is fed to the Codec @param nPortIndex to specify the index of the port @param eDataMode to specify the data mode @sa OMX_VIDEO_DATASYNCMODETYPE @param nNumDataUnits to specify the number of data units (where units are of type defined by eDataMode) */ /* ==========================================================================*/ typedef struct OMX_VIDEO_PARAM_DATASYNCMODETYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_VIDEO_DATASYNCMODETYPE eDataMode; OMX_U32 nNumDataUnits; } OMX_VIDEO_PARAM_DATASYNCMODETYPE; /** * @brief Aspect Ratio type selection for the encoded bit stream */ typedef enum OMX_VIDEO_ASPECTRATIOTYPE { OMX_Video_AR_Unspecified, //!< Unspecified aspect ratio OMX_Video_AR_Square, //!< 1:1 (square) aspect ratio OMX_Video_AR_12_11, //!< 12:11 aspect ratio OMX_Video_AR_10_11, //!< 10:11 aspect ratio OMX_Video_AR_16_11, //!< 16:11 aspect ratio OMX_Video_AR_40_33, //!< 40:33 aspect ratio OMX_Video_AR_24_11, //!< 24:11 aspect ratio OMX_Video_AR_20_11, //!< 20:11 aspect ratio OMX_Video_AR_32_11, //!< 32:11 aspect ratio OMX_Video_AR_80_33, //!< 80:33 aspect ratio OMX_Video_AR_18_11, //!< 18:11 aspect ratio OMX_Video_AR_15_15, //!< 15:15 aspect ratio OMX_Video_AR_64_33, //!< 64:33 aspect ratio OMX_Video_AR_160_99, //!< 160:99 aspect ratio OMX_Video_AR_4_3, //!< 4:3 aspect ratio OMX_Video_AR_3_2, //!< 3:2 aspect ratio OMX_Video_AR_2_1, //!< 2:1 aspect ratio OMX_Video_AR_Extended = 255, //!< Extended aspect ratio OMX_Video_AR_Extended_MAX = 0X7FFFFFFF }OMX_VIDEO_ASPECTRATIOTYPE; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_PARAM_VUI_SELECT :to select the VUI Settings @param bAspectRatioPresent flag to indicate the insertion of aspect ratio information in VUI part of bit-stream @param ePixelAspectRatio to specify the Aspect Ratio @param bFullRange to indicate whether pixel value range is specified as full range or not (0 to 255) */ /* ==========================================================================*/ typedef struct OMX_VIDEO_PARAM_VUIINFOTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_BOOL bAspectRatioPresent; OMX_VIDEO_ASPECTRATIOTYPE ePixelAspectRatio; OMX_BOOL bFullRange; }OMX_VIDEO_PARAM_VUIINFOTYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_CONFIG_PIXELINFOTYPE :to specify the information related to the input pixel data (aspect ratio & range) to the Codec so that codec can incorporate this info in the coded bit stream @param nWidth to specify the Aspect ratio: width of the pixel @param nHeight to specify the Aspect ratio: height of the pixel */ /* ==========================================================================*/ typedef struct OMX_VIDEO_CONFIG_PIXELINFOTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nWidth; OMX_U32 nHeight; } OMX_VIDEO_CONFIG_PIXELINFOTYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE : to configure what NALU need to send along the frames of different types (Intra,IDR...etc) @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 @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 @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 @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 @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 Bit Position: 13| 12| 11| 10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0 NALU TYPE: SPS_VUI|FILLER|EOSTREAM|EOSEQ|AUD|PPS|SPS|SEI|IDR_SLICE|SLICE_DP_C|SLICE_DP_B|SLICE_DP_A|SLICE|UNSPECIFIED \n */ /* ==========================================================================*/ typedef struct OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nStartofSequence; OMX_U32 nEndofSequence; OMX_U32 nIDR; OMX_U32 nIntraPicture; OMX_U32 nNonIntraPicture; }OMX_VIDEO_PARAM_AVCNALUCONTROLTYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_CONFIG_MESEARCHRANGETYPE : to configure Motion Estimation Parameters @param eMVAccuracy to specify the Motion Vector Accuracy @sa OMX_VIDEO_MOTIONVECTORTYPE @param sHorSearchRangeP to Specify the Horizontal Search range for P Frame @param sVerSearchRangeP to Specify the Vertical Search range for P Frame @param sHorSearchRangeB to Specify the Horizontal Search range for B Frame @param sVerSearchRangeB to Specify the Vertical Search range for B Frame */ /* ==========================================================================*/ typedef struct OMX_VIDEO_CONFIG_MESEARCHRANGETYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_VIDEO_MOTIONVECTORTYPE eMVAccuracy; OMX_U32 nHorSearchRangeP; OMX_U32 nVerSearchRangeP; OMX_U32 nHorSearchRangeB; OMX_U32 nVerSearchRangeB; }OMX_VIDEO_CONFIG_MESEARCHRANGETYPE; /** * @brief Block size specification */ typedef enum OMX_VIDEO_BLOCKSIZETYPE { OMX_Video_Block_Size_16x16=0, OMX_Video_Block_Size_8x8, OMX_Video_Block_Size_8x4, OMX_Video_Block_Size_4x8, OMX_Video_Block_Size_4x4, OMX_Video_Block_Size_MAX = 0X7FFFFFFF }OMX_VIDEO_BLOCKSIZETYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_PARAM_MEBLOCKSIZETYPE : to configure the Min Motion Estimation block size for P and B frames @param eMinBlockSizeP to specify the Min Block size used for Motion Estimation incase of P Frames @sa OMX_VIDEO_BLOCKSIZETYPE @param eMinBlockSizeB to specify the Min Block size used for Motion Estimation incase of B Frames */ /* ==========================================================================*/ typedef struct OMX_VIDEO_PARAM_MEBLOCKSIZETYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_VIDEO_BLOCKSIZETYPE eMinBlockSizeP; OMX_VIDEO_BLOCKSIZETYPE eMinBlockSizeB; }OMX_VIDEO_PARAM_MEBLOCKSIZETYPE; /** * @brief to select the chroma component used for Intra Prediction */ typedef enum OMX_VIDEO_CHROMACOMPONENTTYPE { OMX_Video_Chroma_Component_Cr_Only=0, //!< consider only Cr chroma component for Intra prediction OMX_Video_Chroma_Component_Cb_Cr_Both, //!< consider both (Cb & Cr) chroma components for Intra prediction OMX_Video_Chroma_Component_MAX = 0X7FFFFFFF }OMX_VIDEO_CHROMACOMPONENTTYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_PARAM_INTRAPREDTYPE : to configure the Modes for the different block sizes during Intra Prediction @param nLumaIntra4x4Enable to configure the Modes for 4x4 block size during luma intra prediction: bit position specifies the modes that are enabled/disabled HOR_UP|VERT_LEFT|HOR_DOWN|VERT_RIGHT|DIAG_DOWN_RIGHT|DIAG_DOWN_LEFT|DC|HOR|VER @param nLumaIntra8x8Enable to configure the Modes for 4x4 block size during luma intra prediction HOR_UP|VERT_LEFT|HOR_DOWN|VERT_RIGHT|DIAG_DOWN_RIGHT|DIAG_DOWN_LEFT|DC|HOR|VER @param nLumaIntra16x16Enable to configure the Modes for 4x4 block size during luma intra prediction PLANE|DC|HOR|VER @param nChromaIntra8x8Enable to configure the Modes for 4x4 block size during luma intra prediction PLANE|DC|HOR|VER @param eChromaComponentEnable to select the chroma components used for the intra prediction @sa OMX_VIDEO_CHROMACOMPONENTTYPE */ /* ==========================================================================*/ typedef struct OMX_VIDEO_PARAM_INTRAPREDTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nLumaIntra4x4Enable; OMX_U32 nLumaIntra8x8Enable; OMX_U32 nLumaIntra16x16Enable; OMX_U32 nChromaIntra8x8Enable; OMX_VIDEO_CHROMACOMPONENTTYPE eChromaComponentEnable; }OMX_VIDEO_PARAM_INTRAPREDTYPE; /** * @brief Encoding Mode Preset */ typedef enum OMX_VIDEO_ENCODING_MODE_PRESETTYPE { OMX_Video_Enc_Default=0, //!< for all the params default values are taken OMX_Video_Enc_High_Quality, //!< todo: mention the parameters that takes specific values depending on this selection OMX_Video_Enc_User_Defined, OMX_Video_Enc_High_Speed_Med_Quality, OMX_Video_Enc_Med_Speed_Med_Quality, OMX_Video_Enc_Med_Speed_High_Quality, OMX_Video_Enc_High_Speed, OMX_Video_Enc_Preset_MAX = 0X7FFFFFFF }OMX_VIDEO_ENCODING_MODE_PRESETTYPE; /** * @brief Rate Control Preset */ typedef enum OMX_VIDEO_RATECONTROL_PRESETTYPE { OMX_Video_RC_Low_Delay, //!> minPicSizeRatioI. Allowed values are 1 to 4. Setting this to 0 will enable encoder chosen ratio. @param maxPicSizeRatioI : This ratio is used to compute maximum picture size for I frames in the following manner, maxPicSize = averagePicSize * maxPicSizeRatioI. Allowed values are 2 to 30. Setting this to 0 or 1 will enable encoder chosen ratio. @param minPicSizeRatioP : This ratio is used to compute minimum picture size for P frames in the following manner, minPicSize = averagePicSize >> minPicSizeRatioP. Allowed values are 1 to 4. Setting this to 0 will enable encoder chosen ratio. @param maxPicSizeRatioP : This ratio is used to compute maximum picture size for P frames in the following manner, maxPicSize = averagePicSize * maxPicSizeRatioP. Allowed values are 2 to 30. Setting this to 0 or 1 will enable encoder chosen ratio. @param minPicSizeRatioB : This ratio is used to compute minimum picture size for B frames in the following manner, minPicSize = averagePicSize >> minPicSizeRatioB. Allowed values are 1 to 4. Setting this to 0 will enable encoder chosen ratio. @param maxPicSizeRatioB : This ratio is used to compute maximum picture size for B frames in the following manner, maxPicSize = averagePicSize * maxPicSizeRatioB. Allowed values are 2 to 30. Setting this to 0 or 1 will enable encoder chosen ratio. */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_CONFIG_PICSIZECONTROLINFO { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U16 minPicSizeRatioI; OMX_U16 maxPicSizeRatioI; OMX_U16 minPicSizeRatioP; OMX_U16 maxPicSizeRatioP; OMX_U16 minPicSizeRatioB; OMX_U16 maxPicSizeRatioB; } OMX_TI_VIDEO_CONFIG_PICSIZECONTROLINFO; /*!====================================================================! Currently we only support SVC baseline profile * !====================================================================!*/ typedef enum OMX_TI_VIDEO_SVCPROFILETYPE { OMX_VIDEO_SVCProfileBaseline = (OMX_VIDEO_AVCPROFILETYPE)OMX_VIDEO_AVCProfileVendorStartUnused + 1, /**< Baseline profile */ OMX_VIDEO_SVCProfileHigh = (OMX_VIDEO_AVCPROFILETYPE)OMX_VIDEO_AVCProfileVendorStartUnused + 2, /**< High profile */ OMX_VIDEO_SVCProfileHighIntra = (OMX_VIDEO_AVCPROFILETYPE)OMX_VIDEO_AVCProfileVendorStartUnused + 3, /**< High Intra profile */ OMX_VIDEO_SVCProfileMax = 0x7FFFFFFF } OMX_TI_VIDEO_SVCPROFILETYPE; /*!====================================================================! Currently we support only SVC baseline profile upto level 4.1 for SVC encoder. * !====================================================================!*/ typedef enum OMX_TI_VIDEO_SVCLEVELTYPE { OMX_VIDEO_SVCLevel1 = 0x01, /**< Level 1 */ OMX_VIDEO_SVCLevel1b = 0x02, /**< Level 1b */ OMX_VIDEO_SVCLevel11 = 0x04, /**< Level 1.1 */ OMX_VIDEO_SVCLevel12 = 0x08, /**< Level 1.2 */ OMX_VIDEO_SVCLevel13 = 0x10, /**< Level 1.3 */ OMX_VIDEO_SVCLevel2 = 0x20, /**< Level 2 */ OMX_VIDEO_SVCLevel21 = 0x40, /**< Level 2.1 */ OMX_VIDEO_SVCLevel22 = 0x80, /**< Level 2.2 */ OMX_VIDEO_SVCLevel3 = 0x100, /**< Level 3 */ OMX_VIDEO_SVCLevel31 = 0x200, /**< Level 3.1 */ OMX_VIDEO_SVCLevel32 = 0x400, /**< Level 3.2 */ OMX_VIDEO_SVCLevel4 = 0x800, /**< Level 4 */ OMX_VIDEO_SVCLevel41 = 0x1000, /**< Level 4.1 */ OMX_VIDEO_SVCLevel42 = 0x2000, /**< Level 4.2 */ OMX_VIDEO_SVCLevel5 = 0x4000, /**< Level 5 */ OMX_VIDEO_SVCLevel51 = 0x8000, /**< Level 5.1 */ OMX_VIDEO_SVCLevelMax = 0x7FFFFFFF } OMX_TI_VIDEO_SVCLEVELTYPE; typedef enum OMX_TI_VIDEO_SVCSPATIALSCLFACTOR { OMX_VIDEO_SVCScalabilityFactor15, OMX_VIDEO_SVCScalabilityFactor20, } OMX_TI_VIDEO_SVCSPATIALSCLFACTOR; /* ============================================================================= */ /* SVC Params @brief OMX_TI_VIDEO_PARAM_SVCTYPE : Structure to configure SVC related params @param nSize Size of the structure in bytes @param nVersion OMX specification version information @param nPortIndex Port that this structure applies to @param nPFrames Number of P + B (if any) frames between each I frame @param nBFrames Number of B frames between each I frame. Not supported now. Would be supported when support for setting high profile would be enabled @param eProfile SVC profile to use. Only Baseline profile is supported @param eLevel SVC level to use. Level upto 4.1 is supported @param nNumOfSpatialLayers Number of Spatial layers. Supports values [1,9] @param nSpatialScalabilityFactor The resolution would be divided by this factor for Spatial scalability. Supports values 1.5 and 2 @param pSpatialBitrateDistributionRatio[] The Bitrate distribution ratios (percentage) across all Spatial Layers. The values should be in the range [0,100] and should be assigned from low to high. The total of all the distribution should be 100. @param nNumOfSNRLayers Number of SNR layers. Supports values [1,9]. Also nNumOfSpatialLayers*nNumOfSNRLayers <=9 @param pSNRBitrateDistributionRatio[] The Bitrate distribution ratios (percentage) across all SNR Layers. The values should be in the range [0,100] and should be assigned from low to high. The total of all the distribution should be 100. @param nNumOfTemporalLayers Number of Temporal layers. Supports values [1,4]. @param bEntropyCodingCABAC to enable CABAC entropy coding. Not supported now. Would be supported when support for setting high profile would be enabled @param bconstIpred flag to constrain the intra macroblocks from using pixels from neighboring inter macroblocks for prediction in P slices */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_PARAM_SVCTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nPFrames; OMX_U32 nBFrames; OMX_TI_VIDEO_SVCPROFILETYPE eProfile; OMX_TI_VIDEO_SVCLEVELTYPE eLevel; OMX_U32 nRefFrames; // Needed only for Decoder...to be removed on confirmation OMX_U32 nNumOfSpatialLayers; OMX_TI_VIDEO_SVCSPATIALSCLFACTOR nSpatialScalabilityFactor; OMX_U32 pSpatialBitrateDistributionRatio[H264SVC_MAX_NUM_LAYER]; OMX_U32 nNumOfSNRLayers; OMX_U32 pSNRBitrateDistributionRatio[H264SVC_MAX_NUM_LAYER]; OMX_U32 nNumOfTemporalLayers; OMX_BOOL bEntropyCodingCABAC; OMX_BOOL bconstIpred; } OMX_TI_VIDEO_PARAM_SVCTYPE; typedef struct OMX_TI_VIDEO_CONFIG_SVCLAYERDETAILS { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nNumLayers; OMX_U32 nLayerId; OMX_U8 nPriorityId; OMX_U8 nDependencyId; OMX_U8 nQualityId; OMX_U8 nTemporalId; OMX_U8 nBitrateInfoPresentFlag; OMX_U8 nFramerateInfoPresentFlag; OMX_U8 nFramesizeInfoPresentFlag; OMX_U16 nAvgBitrate; OMX_U16 nMaxBitrate; OMX_U16 nAvgFramerate; OMX_U32 nFrameWidth; OMX_U32 nFrameHeight; OMX_U32 nLayerIndex; /* Used to query for individual layer details */ } OMX_TI_VIDEO_CONFIG_SVCLAYERDETAILS; typedef struct OMX_TI_VIDEO_CONFIG_SVCTARGETLAYER { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nSvcTargetLayerDID; OMX_U32 nSvcTargetLayerTID; OMX_U32 nSvcTargetLayerQID; } OMX_TI_VIDEO_CONFIG_SVCTARGETLAYER; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_SLICEDATAINFO : to configure the Slice Settings @param nNumofSlices number of validfields to be read @param nSliceSizeConfigured variable that indicates the MaxSlice configured & (n*nSliceSizeConfigured) gives the buff offset for nth slice in the o/p buffer @param nSliceSize gives the SliceSize */ /* ==========================================================================*/ typedef struct OMX_TI_VIDEO_SLICEDATAINFO { OMX_U32 nNumofSlices; OMX_U32 nSliceSizeConfigured; OMX_U32 nSliceSize[OMXH264E_MAX_SLICE_SUPPORTED]; } OMX_TI_VIDEO_SLICEDATAINFO; /** * @brief mode selection for the data that is given to the Codec */ typedef enum _OMX_VIDEO_AVCLTRMODE { OMX_H264ENC_LTRP_NONE = 0, /**< No longterm refernce frame in the sequnce */ OMX_H264ENC_LTRP_REFERTOIDR = 1, /**< Mark all the I frames as long term-reference frames and * based on the frame control IH264ENC_Control, refere to * a long-term reference frame (I frame). */ OMX_H264ENC_LTRP_REFERTOP_PROACTIVE =2, /**< Two long term frames are supported in this schme and * long-term index marking and refernce frame update is done based * the IH264ENC_Control values */ OMX_H264ENC_LTRP_REFERTOP_REACTIVE = 3 /**< This is not supported in the current version of encoder */ } OMX_VIDEO_AVCLTRMODE; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_PARAM_AVC_LTRP : Structure to enable the configuration of Long Term reference Picture feature in H264 Encoder for the session Enabling this parameter will instruct encoder to keep its recent I/IDR frame in its reference buffer list. So it increases the DDR foot print by one frame buffer @param eLTRMode : enables the LongTerm Reference Picture, possible modes: 0, 1, 2 @param nLTRInterval : interval of the write indicating to codec interms of the frame number */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_PARAM_AVC_LTRP { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_VIDEO_AVCLTRMODE eLTRMode; OMX_U32 nLTRInterval; } OMX_TI_VIDEO_PARAM_AVC_LTRP; /* @brief OMX_TI_VIDEO_CONFIG_AVC_LTRP : Structure to provide the configuration to acknowledge successful decode of previous LTR @param eLTRFrameDecoded : tells the decoder that the LTR has been decoded successfully when set to TRUE */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_CONFIG_AVC_LTRP { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_BOOL bEnableNextLTR; } OMX_TI_VIDEO_CONFIG_AVC_LTRP; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_CONFIG_AVC_LTRP_INTERVAL : Structure to enable the update of the LTRP Interval during runtime @param nLTRInterval : interval of the write indicating to codec interms of the frame number */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_CONFIG_AVC_LTRP_INTERVAL { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nLTRInterval; } OMX_TI_VIDEO_CONFIG_AVC_LTRP_INTERVAL; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_CONFIG_AVC_LTRP_INTERVAL : Structure to enable timestamps in decode order at i/p of decoders. */ /* ============================================================================= */ typedef struct OMX_TI_PARAM_TIMESTAMP_IN_DECODE_ORDER { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_BOOL bEnabled; } OMX_TI_PARAM_TIMESTAMP_IN_DECODE_ORDER; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_PARAM_AUTO_FRAMERATE_UPDATE : Structure to enable dynamic update of frame rate */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_PARAM_AUTO_FRAMERATE_UPDATE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_BOOL bEnableAutoVFRUpdate; OMX_U32 nDiffThresholdtoUpdate; OMX_U32 nMaxSessionFrameRate; } OMX_TI_VIDEO_PARAM_AUTO_FRAMERATE_UPDATE; /* ============================================================================= */ /* @brief OMX_TI_NUM_TEMPORAL_LAYERS : Enum to describe number of temporal layers @param OMX_Video_Temporal_Layers_1 to set Base layer @param OMX_Video_Temporal_Layers_2 to set Base layer + 1 Temporal Enhancement Layer @param OMX_Video_Temporal_Layers_3 to set Base layer + 2 Temporal Enhancement Layers @param OMX_Video_Temporal_Layers_4 to set Base layer + 3 Temporal Enhancement Layers */ /* ============================================================================= */ typedef enum OMX_TI_NUM_TEMPORAL_LAYERS { OMX_Video_Temporal_Layers_1 = 0x01, OMX_Video_Temporal_Layers_2, OMX_Video_Temporal_Layers_3, OMX_Video_Temporal_Layers_4, OMX_Video_Temporal_Layers_Max = 0X7FFFFFFF } OMX_TI_NUM_TEMPORAL_LAYERS; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_PARAM_TEMPORAL_SCALABILITY : Structure to enable temporal scalability @param nPortIndex to specify the index of the port @param nTemporalLayers to specify the number of Enhancement layers @sa OMX_TI_NUM_TEMPORAL_LAYERS */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_PARAM_TEMPORAL_SCALABILITY { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_TI_NUM_TEMPORAL_LAYERS nTemporalLayers; } OMX_TI_VIDEO_PARAM_TEMPORAL_SCALABILITY; /* ============================================================================= */ /* @brief OMX_TI_PARAM_SKIP_GREY_OUTPUT_FRAMES : Structure to enable feature to skip grey output frames which doesn't have proper reference. */ /* ============================================================================= */ typedef struct OMX_TI_PARAM_SKIP_GREY_OUTPUT_FRAMES { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_BOOL bEnabled; } OMX_TI_PARAM_SKIP_GREY_OUTPUT_FRAMES; /* ============================================================================= */ /* @brief OMX_TI_PARAM_DECMETADATA : Structure to enable different codec metadata for video decoders. */ /* ============================================================================= */ typedef struct OMX_TI_PARAM_DECMETADATA { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_BOOL bEnableMBInfo; OMX_BOOL bEnableTranscodeMode; OMX_BOOL bEnableSEIInfo; OMX_BOOL bEnableVUIInfo; } OMX_TI_PARAM_DECMETADATA; /** ****************************************************************************** * @enum OMX_TI_VIDEO_MBERRSTATUS * @brief This enum indicates if a MB was in error or not * ****************************************************************************** */ typedef enum { OMX_TI_VIDEO_MB_NOERROR = 0, /** * MB was non-erroneous */ OMX_TI_VIDEO_MB_ERROR = 1 /** * MB was erroneous */ } OMX_TI_VIDEO_MBERRSTATUS; /** * Macro definitions required for SEI support: HRD sequence parameter set */ #define OMX_TI_VIDEO_H264VDEC_MAXCPBCNT 32 /** * Macro definitions required for SEI support: HRD sequence parameter set */ #define OMX_TI_VIDEO_H264VDEC_MAXUSERDATA_PAYLOAD 300 /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_HrdParams * * @brief This structure contains the HRD parameter elements. * * @param cpb_cnt_minus1 : Number of alternative CPB specifications in the * bit-stream * @param bit_rate_scale : Together with bit_rate_value[i], it specifies the * maximum input bit-rate for the ith CPB. * @param cpb_size_scale : Together with cpb_size_value[i], specifies the * maximum CPB size for the ith CPB. * @param bit_rate_value_minus1[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT] :Maximum input bitrate * for the ith CPB * @param cpb_size_value_minus1[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT] :Maximum CPB size for the * ith CPB * @param vbr_cbr_flag[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT] :Specifies the ith CPB is operated * in Constant Bit-rate mode or variable bit-rate mode * @param initial_cpb_removal_delay_length_minus1 :Length in bits of * initial_cpb_removal_length syntax element * @param cpb_removal_delay_length_minus1 :Length in bits of * cpb_removal_delay_length syntax element * @param dpb_output_delay_length_minus1 :Length in bits of * dpb_output_delay_length syntax element * @param time_offset_length : Length in bits of time_offset syntax element ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_HrdParams { OMX_U32 cpb_cnt_minus1; OMX_U8 bit_rate_scale; OMX_U8 cpb_size_scale; OMX_U32 bit_rate_value_minus1[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U32 cpb_size_value_minus1[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U8 vbr_cbr_flag[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U8 initial_cpb_removal_delay_length_minus1; OMX_U8 cpb_removal_delay_length_minus1; OMX_U8 dpb_output_delay_length_minus1; OMX_U8 time_offset_length; } OMX_TI_VIDEO_H264VDEC_HrdParams; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SVCVuiParams * * @brief This structure contains VUI message syntax elements for scalable * video stream * * @param parsed_flag :1 - Indicates that in the current process call, c * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * * @param svc_vui_ext_num_entries_minus1:(svc_vui_ext_num_entries_minus1 + 1) * specifies the number of information * entries that are present in the SVC * VUI parameters extension syntax * structure * @param svc_vui_ext_dependency_id:indicate the max value of DId for the * i-th subset of coded video sequences * @param svc_vui_ext_quality_id:indicate the max value of QId for the * i-th subset of coded video sequences * @param svc_vui_ext_temporal_id: indicate the max value of TId for the * i-th subset of coded video sequences * @param svc_vui_ext_timing_info_present_flag: Flag to tells that * svc_vui_ext_num_units_in_tick, * svc_vui_ext_time_scale, * svc_vui_ext_fixed_frame_rate_flag * are present for current coded * sequence or not. * @param svc_vui_ext_num_units_in_tick: specifies the value of num_units_in_tick * @param svc_vui_ext_time_scale: specifies the value of time_scale * @param svc_vui_ext_fixed_frame_rate_flag: specifies the value of * fixed_frame_rate_flag * @param svc_vui_ext_nal_hrd_parameters_present_flag:specifies the * value of nal_hrd_parameters_present_flag * @param svc_vui_ext_vcl_hrd_parameters_present_flag: ] specifies the * value of vcl_hrd_parameters_present_flag * @param svc_vui_ext_low_delay_hrd_flag: specifies the value * of low_delay_hrd_flag * @param svc_vui_ext_pic_struct_present_flag: specifies the value * of pic_struct_present_flag * ****************************************************************************** */ typedef struct sOMX_TI_VIDEO_H264VDEC_SVCVuiParams { OMX_U32 parsed_flag; OMX_U16 svc_vui_ext_num_entries_minus1; OMX_U16 svc_vui_ext_dependency_id; OMX_U16 svc_vui_ext_quality_id; OMX_U16 svc_vui_ext_temporal_id; OMX_U16 svc_vui_ext_timing_info_present_flag; OMX_U32 svc_vui_ext_num_units_in_tick; OMX_U32 svc_vui_ext_time_scale; OMX_U16 svc_vui_ext_fixed_frame_rate_flag; OMX_U16 svc_vui_ext_nal_hrd_parameters_present_flag; OMX_U16 svc_vui_ext_vcl_hrd_parameters_present_flag; OMX_U16 svc_vui_ext_low_delay_hrd_flag; OMX_U16 svc_vui_ext_pic_struct_present_flag; } OMX_TI_VIDEO_H264VDEC_SVCVuiParams; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_VuiParams * * @brief This structure contains the VUI Sequence Parameter elements. * * @param parsed_flag :1 - Indicates that in the current process call, c * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param aspect_ratio_info_present_flag :Indicates whether aspect ratio idc * is present or not. * @param aspect_ratio_idc : Aspect ratio of Luma samples * @param sar_width : Horizontal size of sample aspect ratio * @param sar_height : Vertical size of sample aspect ratio * @param overscan_info_present_flag : Cropped decoded pictures are suitable * for display or not. * @param overscan_appropriate_flag : Overscan_appropriate_flag * @param video_signal_type_present_flag : Flag indicates whether * video_format, video_full_range_flag and colour_description_present_ * flag are present or not * @param video_format :Video format indexed by a table. For example,PAL/NTSC * @param video_full_range_flag : Black level, luma and chroma ranges. It * should be used for BT.601 compliance * @param colour_description_present_flag:Indicates whether colour_primaries, * transfer_characteristics and matrix_coefficients are present. * @param colour_primaries :Chromaticity co-ordinates of source primaries * @param transfer_characteristics :Opto-electronic transfer characteristics * of the source picture * @param matrix_coefficients :Matrix coefficients for deriving Luma and * chroma data from RGB components. * @param chroma_location_info_present_flag : Flag indicates whether * chroma_sample_loc_type_top field and chroma_sample_loctype * bottom_field are present. * @param chroma_sample_loc_type_top_field : Location of chroma_sample top * field * @param chroma_sample_loc_type_bottom_field :Location of chroma_sample * bottom field * @param timing_info_present_flag :Indicates whether num_units_in_tick, * time_scale, and fixed_frame_rate_flag are present. * @param num_units_in_tick :Number of units of a clock that corresponds to 1 * increment of a clock tick counter * @param time_scale :Indicates actual increase in time for 1 increment of a * clock tick counter * @param fixed_frame_rate_flag :Indicates how the temporal distance between * HRD output times of any two output pictures is constrained * @param nal_hrd_parameters_present_flag :Indicates whether * nal_hrd_parameters are present * @param nal_hrd_pars : NAL HRD Parameters * @param vcl_hrd_parameters_present_flag :Indicates whether * vcl_hrd_parameters are present * @param vcl_hrd_pars : VCL HRD Parameters * @param low_delay_hrd_flag :HRD operational mode as in Annex C of the * standard * @param pic_struct_present_flag :Indicates whether picture timing SEI * messages are present * @param bitstream_restriction_flag :Indicates if the bit-stream restriction * parameters are present * @param motion_vectors_over_pic_boundaries_flag :Specifies whether motion * vectors can point to regions outside the picture boundaries * @param max_bytes_per_pic_denom :Maximum number of bytes not exceeded by * the sum of sizes of all VCL NAL units of a single coded picture * @param max_bits_per_mb_denom :Maximum number of bits taken by any coded MB * @param log2_max_mv_length_vertical :Maximum value of any motion vector\u2019s * vertical component * @param log2_max_mv_length_horizontal :Maximum value of any motion vector\u2019s * horizontal component * @param max_dec_frame_reordering : * @param num_reorder_frames :Maximum number of frames that need to be * re-ordered * @param max_dec_frame_buffering :Size of HRD decoded buffer (DPB) in terms * of frame buffers * @param svcVuiParams : struct instance of vui parameters for svc * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_VuiParams { OMX_U32 parsed_flag; OMX_U8 aspect_ratio_info_present_flag; OMX_U32 aspect_ratio_idc; OMX_U32 sar_width; OMX_U32 sar_height; OMX_U8 overscan_info_present_flag; OMX_U8 overscan_appropriate_flag; OMX_U8 video_signal_type_present_flag; OMX_U8 video_format; OMX_U8 video_full_range_flag; OMX_U8 colour_description_present_flag; OMX_U8 colour_primaries; OMX_U8 transfer_characteristics; OMX_U8 matrix_coefficients; OMX_U8 chroma_location_info_present_flag; OMX_U32 chroma_sample_loc_type_top_field; OMX_U32 chroma_sample_loc_type_bottom_field; OMX_U8 timing_info_present_flag; OMX_U32 num_units_in_tick; OMX_U32 time_scale; OMX_U8 fixed_frame_rate_flag; OMX_U8 nal_hrd_parameters_present_flag; OMX_TI_VIDEO_H264VDEC_HrdParams nal_hrd_pars; OMX_U8 vcl_hrd_parameters_present_flag; OMX_TI_VIDEO_H264VDEC_HrdParams vcl_hrd_pars; OMX_U8 low_delay_hrd_flag; OMX_U8 pic_struct_present_flag; OMX_U8 bitstream_restriction_flag; OMX_U8 motion_vectors_over_pic_boundaries_flag; OMX_U32 max_bytes_per_pic_denom; OMX_U32 max_bits_per_mb_denom; OMX_U32 log2_max_mv_length_vertical; OMX_U32 log2_max_mv_length_horizontal; OMX_U32 max_dec_frame_reordering; OMX_U32 num_reorder_frames; OMX_U32 max_dec_frame_buffering; OMX_TI_VIDEO_H264VDEC_SVCVuiParams svcVuiParams; } OMX_TI_VIDEO_H264VDEC_VuiParams; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiUserDataRegITUT * * @brief This structure contains the user data SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param num_payload_bytes :Specifies the size of the payload * @param itu_t_t35_country_code : A byte having a value specified as a * country code by ITU-T Recommendation T.35 Annex A * @param itu_t_t35_country_code_extension_byte :A byte having a value * specified as a country code by ITU-T Recommendation T.35 Annex B * @param itu_t_t35_payload_byte[] : A byte containing data registered as * specified by ITU-T Recommendation T.35. * @param dataOverflowFlag: This indicates if pay load data is more than the * array size i.e., OMX_TI_VIDEO_H264VDEC_MAXUSERDATA_PAYLOAD. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiUserDataRegITUT { OMX_U32 parsed_flag; OMX_U32 num_payload_bytes; OMX_U8 itu_t_t35_country_code; OMX_U8 itu_t_t35_country_code_extension_byte; OMX_U8 itu_t_t35_payload_byte[OMX_TI_VIDEO_H264VDEC_MAXUSERDATA_PAYLOAD]; OMX_U8 dataOverflowFlag; } OMX_TI_VIDEO_H264VDEC_SeiUserDataRegITUT; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiUserDataUnReg * * @brief This structure contains the user data SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param num_payload_bytes :Specifies the size of the payload * @param uuid_iso_iec_11578 :Value specified as a UUID according to the * procedures of ISO/IEC 11578:1996 Annex A. * @param user_data_payload_byte :Byte containing data having syntax and * semantics as specified by the UUID generator. * @param dataOverflowFlag: This indicates if pay load data is more than the * array size i.e., OMX_TI_VIDEO_H264VDEC_MAXUSERDATA_PAYLOAD. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiUserDataUnReg { OMX_U32 parsed_flag; OMX_U32 num_payload_bytes; OMX_U8 uuid_iso_iec_11578[16]; OMX_U8 user_data_payload_byte[OMX_TI_VIDEO_H264VDEC_MAXUSERDATA_PAYLOAD]; OMX_U8 dataOverflowFlag; } OMX_TI_VIDEO_H264VDEC_SeiUserDataUnReg; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiBufferingPeriod * * @brief This structure contains the buffering period SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param seq_parameter_set_id :Specifies the sequence parameter set that * contains the sequence HRD attributes * @param nal_cpb_removal_delay :Specifies the delay for the indexed NAL CPB * between the time of arrival in the CPB of the first bit of the * coded data associated with the access unit associated with the * buffering period SEI message and the time of removal from the CPB * of the coded data associated with the same access unit, for the * first buffering period after HRD initialization. * @param nal_cpb_removal_delay_offset :Used for the indexed NAL CPB in * combination with the cpb_removal_delay to specify the initial * delivery time of coded access units to the CPB * @param vcl_cpb_removal_delay :Specifies the delay for the indexed VCL CPB * between the time of arrival in the CPB of the first bit of the * coded data associated with the access unit associated with the * buffering period SEI message and the time of removal from the CPB * of the coded data associated with the same access unit, for the * first buffering period after HRD initialization. * @param vcl_cpb_removal_delay_offset :Used for the indexed VCL CPB in * combination with the cpb_removal_delay to specify the initial * delivery time of coded access units to the CPB ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiBufferingPeriod { OMX_U32 parsed_flag; OMX_U32 seq_parameter_set_id; OMX_U32 nal_cpb_removal_delay[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U32 nal_cpb_removal_delay_offset[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U32 vcl_cpb_removal_delay[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; OMX_U32 vcl_cpb_removal_delay_offset[OMX_TI_VIDEO_H264VDEC_MAXCPBCNT]; }OMX_TI_VIDEO_H264VDEC_SeiBufferingPeriod; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiPanScanRect * * @brief This structure contains the pan scan rectangle SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param pan_scan_rect_id :Specifies an identifying number that may be used * to identify the purpose of the pan-scan rectangle * @param pan_scan_rect_cancel_flag :Equal to 1 indicates that the SEI * message cancels the persistence of any previous pan-scan * rectangle SEI message in output order. * pan_scan_rect_cancel_flag equal to 0 indicates that * pan-scan rectangle information follows. * @param pan_scan_cnt_minus1 :Specifies the number of pan-scan rectangles * that are present in the SEI message * @param pan_scan_rect_left_offset :Specifies as signed integer quantities * in units of one-sixteenth sample spacing relative to the luma * sampling grid, the location of the pan-scan rectangle * @param pan_scan_rect_right_offset :Specifies as signed integer quantities * in units of one-sixteenth sample spacing relative to the luma * sampling grid, the location of the pan-scan rectangle * @param pan_scan_rect_top_offset : Top offset * @param pan_scan_rect_bottom_offset : Bottom offset * @param pan_scan_rect_repetition_period :Specifies the persistence of the * pan-scan rectangle SEI message and may specify a picture order * count interval within which another pan-scan rectangle SEI message * with the same value of pan_scan_rect_id or the end of the coded * video sequence shall be present in the bit-stream ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiPanScanRect { OMX_U32 parsed_flag; OMX_U32 pan_scan_rect_id; OMX_U32 pan_scan_rect_cancel_flag; OMX_U32 pan_scan_cnt_minus1; OMX_S32 pan_scan_rect_left_offset[3]; OMX_S32 pan_scan_rect_right_offset[3]; OMX_S32 pan_scan_rect_top_offset[3]; OMX_S32 pan_scan_rect_bottom_offset[3]; OMX_U32 pan_scan_rect_repetition_period; } OMX_TI_VIDEO_H264VDEC_SeiPanScanRect; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiProgRefineStart * * @brief This structure contains the progressive refinement start SEI msg * elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param progressive_refinement_id :Specifies an identification number for * the progressive refinement operation. * @param num_refinement_steps_minus1 :Specifies the number of reference * frames in the tagged set of consecutive coded pictures ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiProgRefineStart { OMX_U32 parsed_flag; OMX_U32 progressive_refinement_id; OMX_U32 num_refinement_steps_minus1; } OMX_TI_VIDEO_H264VDEC_SeiProgRefineStart; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiProgRefineEnd * * @brief TThis structure contains the progressive refinement end SEI msg * elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param progressive_refinement_id :Specifies an identification number for * the progressive refinement operation. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiProgRefineEnd { OMX_U32 parsed_flag; OMX_U32 progressive_refinement_id; } OMX_TI_VIDEO_H264VDEC_SeiProgRefineEnd; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiRecoveryPointInfo * * @brief This structure contains the sRecovery Point Info SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param exact_match_flag :Indicates whether decoded pictures at and * subsequent to the specified recovery point in output order derived * by starting the decoding process at the access unit associated with * the recovery point SEI message, will be an exact match to the * pictures that would be produced by starting the decoding process * at the location of a previous IDR access unit in the NAL unit stream. * @param recovery_frame_cnt :Specifies the recovery point of output pictures * in output order * @param broken_link_flag :Indicates the presence or absence of a broken * link in the NAL unit stream * @param changing_slice_group_idc :Indicates whether decoded pictures are * correct or approximately correct in content at and subsequent to * the recovery point in output order when all macro-blocks of the * primary coded pictures are decoded within the changing slice group * period. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiRecoveryPointInfo { OMX_U32 parsed_flag; OMX_U32 recovery_frame_cnt; OMX_U32 exact_match_flag; OMX_U32 broken_link_flag; OMX_U32 changing_slice_group_idc; } OMX_TI_VIDEO_H264VDEC_SeiRecoveryPointInfo; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiPictureTiming * * @brief This structure contains the picture timing SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param NumClockTs : * @param cpb_removal_delay :Specifies how many clock ticks to wait after * removal from the CPB of the access unit associated with the * most recent buffering period SEI message before removing from * the buffer the access unit data associated with the picture * timing SEI message. * @param dpb_output_delay : Used to compute the DPB output time of the * picture. * @param pic_struct : Indicates whether a picture should be displayed as * a frame or field * @param clock_time_stamp_flag[4]:1 - Indicates number of clock timestamp * syntax elements present and follow immediately * 0 \u2013 Indicates associated clock timestamp syntax * elements not present * @param ct_type[4] : Indicates the scan type(interlaced or progressive) * of the source material * @param nuit_field_based_flag[4] : Used to calculate the clockTimestamp * @param counting_type[4] : Specifies the method of dropping values of * n_frames * @param full_timestamp_flag[4] : 1 - Specifies that the n_frames syntax * element is followed by seconds_value, * minutes_value, and hours_value. * 0 - Specifies that the n_frames syntax * element is followed by seconds_flag * @param discontinuity_flag[4] : Indicates whether the difference between * the current value of clockTimestamp and the value of * clockTimestamp computed from the previous clockTimestamp in * output order can be interpreted as the time difference between * the times of origin or capture of the associated frames or * fields. * @param cnt_dropped_flag[4] : Specifies the skipping of one or more * values of n_frames using the counting method * @param n_frames[4] : Specifies the value of nFrames used to compute * clockTimestamp. * @param seconds_flag[4] : equal to 1 specifies that seconds_value and * minutes_flag are present when * full_timestamp_flag is equal to 0. * @param minutes_flag[4] : equal to 1 specifies that minutes_value and * hours_flag are present when full_timestamp_flag * is equal to 0 and seconds_flag is equal to 1. * @param hours_flag[4] : equal to 1 specifies that hours_value is * present when full_timestamp_flag is equal to 0 * and seconds_flag is equal to 1 and minutes_flag * is equal to 1. * @param seconds_value[4] : Specifies the value of sS used to compute * clockTimestamp. * @param minutes_value[4] : Specifies the value of mM used to compute * clockTimestamp. * @param hours_value[4] : Specifies the value of tOffset used to compute * clockTimestamp * @param time_offset[4] : Specifies the value of tOffset used to compute * clockTimestamp ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiPictureTiming { OMX_U32 parsed_flag; OMX_U32 NumClockTs; OMX_U32 cpb_removal_delay; OMX_U32 dpb_output_delay; OMX_U32 pic_struct; OMX_U32 clock_time_stamp_flag[4]; OMX_U32 ct_type[4]; OMX_U32 nuit_field_based_flag[4]; OMX_U32 counting_type[4]; OMX_U32 full_timestamp_flag[4]; OMX_U32 discontinuity_flag[4]; OMX_U32 cnt_dropped_flag[4]; OMX_U32 n_frames[4]; OMX_U32 seconds_flag[4]; OMX_U32 minutes_flag[4]; OMX_U32 hours_flag[4]; OMX_U32 seconds_value[4]; OMX_U32 minutes_value[4]; OMX_U32 hours_value[4]; OMX_S32 time_offset[4]; }OMX_TI_VIDEO_H264VDEC_SeiPictureTiming; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRep * * @brief This structure contains the full frmae freeze repetition SEI msg * elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param full_frame_freeze_repetition_period :Specifies the persistence of * the full-frame freeze SEI message ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRep { OMX_U32 parsed_flag; OMX_U32 full_frame_freeze_repetition_period; } OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRep; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRel * * @brief This structure contains frame freeze release SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param payloadSize : Size of the frame_freeze_release payload ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRel { OMX_U32 parsed_flag; OMX_U32 payloadSize; } OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRel; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiStereoVideoInfo * * @brief This structure contains stereo video information SEI msg elements * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param field_views_flag : 1 - indicates that all pictures in the current * coded video sequence are fields * 0 - indicates that all pictures in the current * coded video sequence are frames. * @param top_field_is_left_view_flag : * 1 - top field is a left view. * 0 - topfield is right view. * @param current_frame_is_left_view_flag : * 1 - current frame is left view. * 0 - current frame is right view. * @param next_frame_is_second_view_flag : * 1 - current picture and a next picture in * output order form a stereo video pair. * 0 - current picture and a previous picture in * output order form a stereo video pair. * @param left_view_self_contained_flag : * 1 - it will not use right view as a reference * picture for inter prediction * 0 - it may use right view as a reference * picture for inter prediction. * @param right_view_self_contained_flag : * 1 - it will not use left view as a reference * picture for inter prediction * 0 - it may use left view as a reference * picture for inter prediction. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiStereoVideoInfo { OMX_U32 parsed_flag; OMX_U32 field_views_flag; OMX_U32 top_field_is_left_view_flag; OMX_U32 current_frame_is_left_view_flag; OMX_U32 next_frame_is_second_view_flag; OMX_U32 left_view_self_contained_flag; OMX_U32 right_view_self_contained_flag; } OMX_TI_VIDEO_H264VDEC_SeiStereoVideoInfo; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiFramePacking * * @brief This structure contains frame packing arrangement SEI msg elements * * @param frame_packing_arrangement_id : * contains an identifying number that may be used to identify * the usage of the frame packing arrangement SEI message. * @param frame_packing_arrangement_cancel_flag : * 1 - equal to 1 indicates that the frame packing arrangement * SEI message cancels the persistence of any previous frame * packing arrangement SEI message in output order. * 0 - indicates that frame packing arrangement info follows * @param frame_packing_arrangement_type : * indicates the type of packing arrangement of the frames * @param quincunx_sampling_flag : * 1 - indicates that each color component plane of each * constituent frame is quincunx sampled * 0 - indicates that each color component plane of each * constituent frame is not quincunx sampled * @param content_interpretation_type : * 1 - frame 0 being associated with the left view and frame 1 * being associated with the right view * 2 - frame 0 being associated with the right view and frame 1 * being associated with the left view * @param spatial_flipping_flag : * 1 - spatial flipping is enabled for any one of the frame * constituent, if frame_packing_arrangement_type is 3 or 4. * 0 - spatial flipping is disabled for any one of the frame * constituent, if frame_packing_arrangement_type is 3 or 4. * @param frame0_flipped_flag : * 1 - frame 0 is spatially flipped * 0 - frame 1 is spatially flipped * @param field_views_flag : * 1 - indicates that all pictures in the current coded video * sequence are coded as complementary field pairs. * 0 - indicates that all pictures in the current coded video * sequence are coded as frame. * @param current_frame_is_frame0_flag : * 1 - indicates that the current decoded frame is constituent * frame 0 and the next decoded frame in output order * is constituent frame 1. * 0 - indicates that the current decoded frame is constituent * frame 1 and the next decoded frame in output order * is constituent frame 0. * @param frame0_self_contained_flag : * 1 - indicates that the constituent frame 0 is dependent on * constituent frame 1 in decoding process * 0 - indicates that the constituent frame 0 may dependent on * constituent frame 1 in decoding process * @param frame1_self_contained_flag : * 1 - indicates that the constituent frame 1 is dependent on * constituent frame 0 in decoding process * 0 - indicates that the constituent frame 1 may dependent on * constituent frame 0 in decoding process * @param frame0_grid_position_x : * specifies the horizontal location of the upper left * sample of constituent frame 0 in the units of one * sixteenth of the luma samples * @param frame0_grid_position_y : * specifies the vertical location of the upper left * sample of constituent frame 0 in the units of one * sixteenth of the luma samples * @param frame1_grid_position_x : * specifies the horizontal location of the upper left * sample of constituent frame 1 in the units of one * sixteenth of the luma samples * @param frame1_grid_position_y : * specifies the vertical location of the upper left * sample of constituent frame 1 in the units of one * sixteenth of the luma samples * @param frame_packing_arrangement_reserved_byte : * reserved for the future use. * @param frame_packing_arrangement_repetition_period : * specifies the persistence of the frame packing arrangement * SEI message and may specify a frame order count interval * within which another frame packing arrangement SEI message * with the same value of frame_packing_arrangement_id or the * end of the coded video sequence shall be present in the * bitstream. * @param frame_packing_arrangement_extension_flag : * 0 - indicates that no additional data follows within the * frame packing arrangement SEI message. * 1 - Reserved for the future use. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiFramePacking { OMX_U32 parsed_flag; OMX_U32 frame_packing_arrangement_id; OMX_U32 frame_packing_arrangement_repetition_period; OMX_U8 frame_packing_arrangement_cancel_flag; OMX_U8 frame_packing_arrangement_type; OMX_U8 quincunx_sampling_flag; OMX_U8 content_interpretation_type; OMX_U8 spatial_flipping_flag; OMX_U8 frame0_flipped_flag; OMX_U8 field_views_flag; OMX_U8 current_frame_is_frame0_flag; OMX_U8 frame0_self_contained_flag; OMX_U8 frame1_self_contained_flag; OMX_U8 frame0_grid_position_x; OMX_U8 frame0_grid_position_y; OMX_U8 frame1_grid_position_x; OMX_U8 frame1_grid_position_y; OMX_U8 frame_packing_arrangement_reserved_byte; OMX_U8 frame_packing_arrangement_extension_flag; } OMX_TI_VIDEO_H264VDEC_SeiFramePacking; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_SeiMessages * * @brief This structure contains all the supported SEI msg objects * * @param parsed_flag :1 - Indicates that in the current process call, * contents of the structure is updated * 0 - Indicates contents of the structure is not updated * @param full_frame_freeze : Full-frame freeze SEI message * @param full_frame_freeze_release :Cancels the effect of any full-frame * freeze SEI message sent with pictures that precede the current * picture in the output order. * @param prog_refine_start :Specifies the beginning of a set of consecutive * coded pictures that is labeled as the current picture followed * by a sequence of one or more pictures of refinement of the * quality of the current picture, rather than as a representation * of a continually moving scene. * @param prog_refine_end : Specifies end of progressive refinement. * @param user_data_registered :Message contains user data registered as * specified by ITU-T Recommendation T.35 * @param user_data_unregistered :Message contains unregistered user data * identified by a UUID * @param buffering_period_info :Message specifies the buffering period * @param pan_scan_rect :Message specifies the coordinates of a rectangle * relative to the cropping rectangle of the sequence parameter set * @param recovery_pt_info :The recovery point SEI message assists a decoder * in determining when the decoding process will produce acceptable * pictures for display after the decoder initiates random access or * after the encoder indicates a broken link in the sequence. * @param pic_timing :Specifies timing information regarding cpb delays, dpb * output delay, and so on. * @param stereo_video_info :stereo video information SEI message consist of * pair of picture forming stereo view content. ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_SeiMessages { OMX_U32 parsed_flag; OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRep full_frame_freeze; OMX_TI_VIDEO_H264VDEC_SeiFullFrameFreezeRel full_frame_freeze_release; OMX_TI_VIDEO_H264VDEC_SeiProgRefineStart prog_refine_start; OMX_TI_VIDEO_H264VDEC_SeiProgRefineEnd prog_refine_end; OMX_TI_VIDEO_H264VDEC_SeiUserDataRegITUT user_data_registered; OMX_TI_VIDEO_H264VDEC_SeiUserDataUnReg user_data_unregistered; OMX_TI_VIDEO_H264VDEC_SeiBufferingPeriod buffering_period_info; OMX_TI_VIDEO_H264VDEC_SeiPanScanRect pan_scan_rect; OMX_TI_VIDEO_H264VDEC_SeiRecoveryPointInfo recovery_pt_info; OMX_TI_VIDEO_H264VDEC_SeiPictureTiming pic_timing; OMX_TI_VIDEO_H264VDEC_SeiStereoVideoInfo stereo_video_info; OMX_TI_VIDEO_H264VDEC_SeiFramePacking frame_packing; } OMX_TI_VIDEO_H264VDEC_SeiMessages; /** ****************************************************************************** * @struct _sErrConcealStr * @brief This str holds up the required Info for implementing the SCV EC, * this will get updated by H.264 decoder while decoding the SVC * Base/Target Layers * * @param CurrMbInfoBufPointer :Base Address of the current decoded frame * MB Info buffer * * @param CurrMbStatusBufPointer: Base Address of the current decoded frame * MB staus buffer pointer * * @param currFrameY : Base Address of the current decoded Luma * frame buffer pointer (physical pointer) * * @param currFrameUV : Base Address of the current decoded Chroma * frame buffer pointer (physical pointer) * * @param refConclY : Base Address of the ref decoded Luma * frame buffer pointer (virtual pointer) * * @param refConclUV : Base Address of the ref decoded Chroma * frame buffer pointer (virtual pointer) * * @param TilerBaseAddress : TBA vaule for the VDMA * * @param pSliceInfoFlags : Flag to enable slice info * * @param ref_width : Resultant Horizontal LUMA picture size * after Pad size addition on both Left * & Right sides. This gets used as * stride during vDMA programming. * In case of TILER,the stride is fixed, * independant of Picture width, and * only changes with TILER mode. * * @param ref_width_c : Resultant Horizontal CHROMA picture size * after Pad size addition on both Left & * Right sides. * * * @param ref_frame_height : In case of Interlaced streams,the picure * store is different i.e., store each field * by applying PAD on top & bottom lines. * Hence the picture height will be Height * plus four times the Pad size. This * variable holds this resultant value. * * @param mb_width : Picture width in terms of Macroblocks * * @param mb_height : Picture height in terms of Macroblocks. * * @param image_width : Image width of the decoded frame * * @param image_width : Image height of the decoded frame * * @param frameType : Frame type of the current frame. * * @param picaff_frame : Flag to indicate whether current picture * is of Frame type & referring to Field * picture as reference. * * @param mb_aff_frame_flag : Flag to indicate whether the current * decoding picture is MBAFF type. * * @param field_pic_flag : Flag to indicate whether the current * decoding picture is field type. * * @param bottom_field_flag : This parameter equal to 1 specifies that * the slice is part of a coded bottom field. * bottom_field_flag equalto 0 specifies * that the picture is a coded top field. * * @param nonPairedFieldPic : Flag to indicate Non paired field picture. * * @param prev_pic_bottom_field : this variable Indicates if the previous * picture was a bottom field or not (a Flag) ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_ErrConcealStr { OMX_S32 ErrConcealmentEnable; OMX_S32 CurrMbInfoBufPointer; OMX_S32 CurrMbStatusBufPointer; OMX_S32 CurrMbInfoIresBufPointer; OMX_S32 currFrameY; OMX_S32 currFrameUV; OMX_S32 refConclY; OMX_S32 refConclUV; OMX_U32 TilerBaseAddress; OMX_U16 ref_width; OMX_U16 ref_width_c; OMX_U16 ref_frame_height; OMX_U16 mb_width; OMX_U16 mb_height; OMX_U16 image_width; OMX_U16 image_height; OMX_U8 frameType; OMX_U8 picaff_frame; OMX_U8 mb_aff_frame_flag; OMX_U8 field_pic_flag; OMX_U8 bottom_field_flag; OMX_U8 nonPairedFieldPic; OMX_U8 prev_pic_bottom_field; }OMX_TI_VIDEO_H264VDEC_ErrConcealStr; /** * Size of sliceinfo flags - We have two slice info flag arrays in SL2, one * for ECD3 and the other for MC3. ECD3 flag is one bit per MB. Since Maximum * supported number of MBs in a frame is 128 x 128 = 16384, we need 16384/8 = * 2048 bytes for the slice info flag array for ECD3. But for the MC3 array, * we always make the next bit also as 1 to enable loading into ping and pong * memories of MCBUF. So we need an extra bit for the MC3 array, to avoid * buffer overflow when the last MB is a new slice. To keep the next SL2 buffer * in 16-byte aligned position (some buffers need it) we round the size to next * multiple of 16, i.e., 2064. */ #define OMX_TI_VIDEO_SLICEINFO_FLAGSIZE 2064 /** ****************************************************************************** * @struct _sErrConcealLayerStr * @brief This str holds up the required Info for implementing the SCV EC, * this will get updated by H.264 decoder while decoding the SVC * Base/Target Layers * * @param svcEcStr : structure instance of sSVCErrConcealStr * * @param pSliceInfoFlags : Array to store the sliceInfo flag * * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_ErrConcealLayerStr { OMX_TI_VIDEO_H264VDEC_ErrConcealStr sECStr; OMX_U8 pSliceInfoFlags[OMX_TI_VIDEO_SLICEINFO_FLAGSIZE]; }OMX_TI_VIDEO_H264VDEC_ErrConcealLayerStr; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_CommonInfo * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_CommonInfo { OMX_U32 codec_type : 8; OMX_U32 fmt_type : 8; OMX_U32 mb_ll_avail : 1; OMX_U32 mb_ul_avail : 1; OMX_U32 mb_uu_avail : 1; OMX_U32 mb_ur_avail : 1; OMX_U32 pic_bound_l : 1; OMX_U32 pic_bound_u : 1; OMX_U32 pic_bound_r : 1; OMX_U32 pic_bound_b : 1; OMX_U32 first_mb_flag : 1; OMX_U32 error_flag : 1; OMX_U32 zero : 6; OMX_U32 zeroes : 16; OMX_U32 mb_addr : 16; } OMX_TI_VIDEO_H264VDEC_CommonInfo; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_MotionVector * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_MotionVector { OMX_S16 x; OMX_S16 y; } OMX_TI_VIDEO_H264VDEC_MotionVector; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_CabacContext * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_CabacContext { OMX_TI_VIDEO_H264VDEC_MotionVector mvd_l0[4]; OMX_TI_VIDEO_H264VDEC_MotionVector mvd_l1[4]; } OMX_TI_VIDEO_H264VDEC_CabacContext; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_TotalCoefLuma * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_TotalCoefLuma { OMX_U8 right[3]; OMX_U8 bottom_right; OMX_U8 bottom[3]; OMX_U8 zero; } OMX_TI_VIDEO_H264VDEC_TotalCoefLuma; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_TotalCoefChroma * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_TotalCoefChroma { OMX_U8 right_cb; OMX_U8 bottom_right_cb; OMX_U8 bottom_cb; OMX_U8 zero; OMX_U8 right_cr; OMX_U8 bottom_right_cr; OMX_U8 bottom_cr; OMX_U8 zero1; } OMX_TI_VIDEO_H264VDEC_TotalCoefChroma; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_CavlcContext * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_CavlcContext { unsigned long long zeroes[2]; OMX_TI_VIDEO_H264VDEC_TotalCoefLuma total_coef_luma; OMX_TI_VIDEO_H264VDEC_TotalCoefChroma total_coef_chroma; } OMX_TI_VIDEO_H264VDEC_CavlcContext; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_IntraPredMode * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_IntraPredMode { OMX_U32 ipred_mode0 : 4; OMX_U32 ipred_mode1 : 4; OMX_U32 ipred_mode2 : 4; OMX_U32 ipred_mode3 : 4; OMX_U32 ipred_mode4 : 4; OMX_U32 ipred_mode5 : 4; OMX_U32 ipred_mode6 : 4; OMX_U32 ipred_mode7 : 4; OMX_U32 ipred_mode8 : 4; OMX_U32 ipred_mode9 : 4; OMX_U32 ipred_mode10 : 4; OMX_U32 ipred_mode11 : 4; OMX_U32 ipred_mode12 : 4; OMX_U32 ipred_mode13 : 4; OMX_U32 ipred_mode14 : 4; OMX_U32 ipred_mode15 : 4; } OMX_TI_VIDEO_H264VDEC_IntraPredMode; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_MbPredType * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_MbPredType { OMX_U32 mbskip : 1; OMX_U32 tr8x8 : 1; OMX_U32 mb_field : 1; OMX_U32 cond_mbskip : 1; OMX_U32 c_ipred_mode : 2; OMX_U32 zero : 1; OMX_U32 end_of_slice : 1; OMX_U32 mb_y_mod2 : 1; OMX_U32 zero1 : 7; OMX_U32 refidx_equal_flag_l0 : 1; OMX_U32 refidx_equal_flag_l1 : 1; OMX_U32 mv_equal_flag_l0 : 1; OMX_U32 mv_equal_flag_l1 : 1; OMX_U32 zeroes : 4; OMX_U32 mb_type : 8; OMX_U8 sub_mb_type[4]; } OMX_TI_VIDEO_H264VDEC_MbPredType; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_QpCbp * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_QpCbp { OMX_U32 cbp; OMX_U8 qp_y; OMX_U8 qp_cb; OMX_U8 qp_cr; OMX_U8 zero; } OMX_TI_VIDEO_H264VDEC_QpCbp; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_RefPicControl * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_RefPicControl { OMX_U8 refidx[4]; OMX_U8 refpicid[4]; } OMX_TI_VIDEO_H264VDEC_RefPicControl; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_MvBidirectional16 * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_MvBidirectional16 { OMX_TI_VIDEO_H264VDEC_MotionVector mv_forward[16]; OMX_TI_VIDEO_H264VDEC_MotionVector mv_backward[16]; } OMX_TI_VIDEO_H264VDEC_MvBidirectional16; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_MvBidirectional4 * * @brief * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_MvBidirectional4 { OMX_TI_VIDEO_H264VDEC_MotionVector mv_forward[4]; OMX_TI_VIDEO_H264VDEC_MotionVector mv_backward[4]; } OMX_TI_VIDEO_H264VDEC_MvBidirectional4; /** ****************************************************************************** * @struct OMX_TI_VIDEO_H264VDEC_MbInfo * * @brief This structure details the data format for MB information shared to * application. This helps application to understand all fields * the way codec uses MB info internally. This structure is of size * 208 Bytes. * * @param info : This elements gives details about the MB placement in the * frame. * * @param cabac: This field holds the context data for a CABAC coded MB * * @param cavlc: This field holds the context data for a CAVLC coded MB * * @param ipred_mode: This field holds information of intra prediction modes * at 4x4 level, for intra coded MB. * * @param mb_pred_type: This indicates prediction specific details for inter * coded MB * * @param qp_cbp: This gives coded & QP informations for both LUMA & CHROMA * components of a Macro Block. * * @param l0_ref_pic_control: Informs all details about reference indices * at 8x8 block level in L0 direction * * @param l1_ref_pic_control: Informs all details about reference indices * at 8x8 block level in L1 direction * * @param mv_forward: Lists all Motion vectors at 4x4 level in L0 direction * * @param bidirectional16: Lists all Motion vectors at 4x4 level in both * directions * * @param bidirectional4: Lists all Motion vectors at 8x8 level in both * directions * ****************************************************************************** */ typedef struct OMX_TI_VIDEO_H264VDEC_MbInfo { OMX_TI_VIDEO_H264VDEC_CommonInfo info; union { OMX_TI_VIDEO_H264VDEC_CabacContext cabac; OMX_TI_VIDEO_H264VDEC_CavlcContext cavlc; } OMX_TI_VIDEO_H264VDEC_context; OMX_TI_VIDEO_H264VDEC_IntraPredMode ipred_mode; OMX_TI_VIDEO_H264VDEC_MbPredType mb_pred_type; OMX_TI_VIDEO_H264VDEC_QpCbp qp_cbp; OMX_TI_VIDEO_H264VDEC_RefPicControl l0_ref_pic_control; OMX_TI_VIDEO_H264VDEC_RefPicControl l1_ref_pic_control; union { OMX_TI_VIDEO_H264VDEC_MotionVector mv_forward[16]; OMX_TI_VIDEO_H264VDEC_MvBidirectional16 bidirectional16; OMX_TI_VIDEO_H264VDEC_MvBidirectional4 bidirectional4; } OMX_TI_VIDEO_H264VDEC_motion_vecs; } OMX_TI_VIDEO_H264VDEC_MbInfo; /** ******************************************************************************** * @struct OMX_TI_VIDEO_VC1VDEC_MbInfo * * @brief MB information structure that is written out by the IVA-HD hardware. * * @note None: * ******************************************************************************** */ typedef struct OMX_TI_VIDEO_VC1VDEC_MbInfo { /* MB address */ OMX_U8 mb_addr; /* Error flag */ OMX_U8 error_flag; /* First MB flag */ OMX_U8 first_mb_flag; /* Picture bound */ OMX_U8 pic_bound_b; /* Upper picture bound */ OMX_U8 pic_bound_u; /* Right picture bound */ OMX_U8 pic_bound_r; /* Left picture bound */ OMX_U8 pic_bound_l; /* Availability of upper right MB */ OMX_U8 mb_ur_avail; /* Availability of upper MB */ OMX_U8 mb_uu_avail; /* Availability of upper left MB */ OMX_U8 mb_ul_avail; /* Availability of left MB */ OMX_U8 mb_ll_avail; /* Macroblock header format type */ OMX_U8 fmt_type; /* Codec type */ OMX_U8 codec_type; /* Indicates DC values of each Y block in current MB */ OMX_U8 dc_coef_q_y[4]; /* Indicates DC values of Cr block in current MB */ OMX_U8 dc_coef_q_cr; /* Indicates DC values of Cb block in current MB */ OMX_U8 dc_coef_q_cb; /* Block type of cr block */ OMX_U8 block_type_cr; /* Block type of cb block */ OMX_U8 block_type_cb; /* Block types of luma */ OMX_U8 block_type_y[4]; /* In decoding, if the current macroblock is the last macroblock in a slice,*/ /* ECD sets 1 to this field during executing the macroblock. Otherwise, ECD */ /* sets 0 to this field */ OMX_U8 end_of_slice; /* 1 : allow skipping current MB if CBP = 0 */ OMX_U8 cond_skip_flag; /* Skipped / non skipped MB */ OMX_U8 skip; /* 1 indicates that overlap filtering is in use for the macroblock. */ OMX_U8 overlap; /* 1 indicates that AC prediction is in use for the macroblock */ OMX_U8 acpred; /* Denotes inter-prediction direction for the macroblock in B-picture */ OMX_U8 b_picture_direction; /* Denotes the number of motion vectors. */ OMX_U8 mv_mode; /* 1 indicates that the field transform is in use for the macroblock. */ OMX_U8 fieldtx; /* 1 indicates that field inter-prediction is in use */ OMX_U8 mv_type; /* Equals the reference frame distance */ OMX_U8 refdist; /* 1 indicates that macroblock quantizer-scale (MQUANT) overflows */ OMX_U8 mquant_overflow; /* Equals the quantizer-scale for the macroblock */ OMX_U8 quant; /* 1 indicates that 0.5 shall be added to PQUANT in calculation of */ /* quantizer-scale. This field is valid for decoding only. */ OMX_U8 halfqp; /* Equals the DC coefficient step size which is derived from MQUANT in the */ /* bit-stream */ OMX_U8 dc_step_size; /* Denotes the coded sub-block pattern for cr block */ OMX_U8 cbp_cr; /* Denotes the coded sub-block pattern for cb block */ OMX_U8 cbp_cb; /* Denotes the coded sub-block pattern for luma blocks */ OMX_U8 cbp_y[3]; /* Denotes the backward reference field picture */ OMX_U8 mv_bw_ref_y[4]; /* Denotes the forward reference field picture */ OMX_U8 mv_fw_ref_y[3]; /* Unclipped forward motion vector for luma */ OMX_U8 mv_fw_y[4][4]; /* Unclipped backward motion vector for luma */ OMX_U8 mv_bw_y[1][1]; /* Unclipped backward motion vector for chroma */ OMX_U8 mv_bw_c[2]; /* Unclipped forward motion vector for chroma */ OMX_U8 mv_fw_c[2]; /* Clipped forward motion vector for luma */ OMX_U8 cmv_fw_y[4][4]; /* Clipped backward motion vector for luma */ OMX_U8 cmv_bw_y[4][4]; /* Clipped forward motion vector for chroma */ OMX_U8 cmv_fw_c[4][4]; /* Clipped backward motion vector for chroma */ OMX_U8 cmv_bw_c[4][4]; }OMX_TI_VIDEO_VC1VDEC_MbInfo; /* ============================================================================= */ /* @brief OMX_TI_VIDEO_PARAM_DEBLOCKINGQP : Structure to configure QP value for enhanced deblocking fliter of MPEG4 video decoder. * * STRUCT MEMBERS: * nSize : Size of the structure in bytes * nVersion : OMX specification version information * nPortIndex : Port that this structure applies to * nDeblockingQP : QP value for enhanced deblocking filter * */ /* ============================================================================= */ typedef struct OMX_TI_VIDEO_PARAM_DEBLOCKINGQP { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nDeblockingQP; } OMX_TI_VIDEO_PARAM_DEBLOCKINGQP; /* ============================================================================= */ /* @brief Extended parameters for VC1 standard */ /* ============================================================================= */ /** * VC1 profile types, each profile indicates support for various * performance bounds and different annexes. */ typedef enum OMX_TI_VIDEO_VC1PROFILETYPE { OMX_VIDEO_VC1SimpleProfile = 0, /**< Simple Profile */ OMX_VIDEO_VC1MainProfile = 1, /**< Main Profile */ OMX_VIDEO_VC1AdvancedProfile = 3 /**< Advanced Profile */ }OMX_TI_VIDEO_VC1PROFILETYPE; /** * VC1 level types, each level indicates support for various frame sizes, * bit rates, decoder frame rates. */ typedef enum OMX_TI_VIDEO_VC1LEVELTYPE { OMX_VIDEO_VC1SPLOW = 0, /**< Simple Profile Level Low */ OMX_VIDEO_VC1SPMED = 2, /**< Simple Profile Level Medium */ OMX_VIDEO_VC1MPLOW = 0, /**< Main Profile Level Low */ OMX_VIDEO_VC1MPMED = 2, /**< Main Profile Level Medium */ OMX_VIDEO_VC1MPHIGH = 4, /**< Main Profile Level High */ OMX_VIDEO_VC1APL0 = 0, /**< Advanced Profile Level L0 */ OMX_VIDEO_VC1APL1 = 1, /**< Advanced Profile Level L1 */ OMX_VIDEO_VC1APL2 = 2, /**< Advanced Profile Level L2 */ OMX_VIDEO_VC1APL3 = 3, /**< Advanced Profile Level L3 */ OMX_VIDEO_VC1APL4 = 4, /**< Advanced Profile Level L4 */ OMX_VIDEO_VC1LEVEL_MAX = 0X7FFFFFFF }OMX_TI_VIDEO_VC1LEVELTYPE; /** * @brief Specifies the type of interlace content for VC1 */ typedef enum OMX_TI_VIDEO_VC1_INTERLACE_CODINGTYPE { OMX_TI_Video_VC1Interlace_PICAFF = 0, /**< PicAFF type of interlace coding */ OMX_TI_Video_VC1Interlace_Fieldonly = 2, /**< Field only coding with fixed partiy scheme */ OMX_TI_Video_VC1Interlace_Fieldonly_MRF = OMX_TI_Video_VC1Interlace_Fieldonly, /**< Use Most recent field for refernece */ OMX_TI_Video_VC1Interlace_Fieldonly_ARF = 3, /**< codec decides the partiy of of the field to * be used based upon content (adaptive) */ OMX_TI_Video_VC1Interlace_DEFAULT = OMX_TI_Video_VC1Interlace_Fieldonly_ARF, /**< Default : adaptive partiy for reference */ OMX_TI_Video_VC1Interlace_Fieldonly_SPF = 4, /**< Use same parity field for refernece */ OMX_TI_Video_VC1Interlace_MAX = 0X7FFFFFFF }OMX_TI_VIDEO_VC1_INTERLACE_CODINGTYPE; /** * VC1 loop filter modes * * OMX_VIDEO_AVCLoopFilterEnable : Enable * OMX_VIDEO_AVCLoopFilterDisable : Disable */ typedef enum OMX_VIDEO_VC1LOOPFILTERTYPE { OMX_VIDEO_VC1LoopFilterEnable = 0, OMX_VIDEO_VC1LoopFilterDisable, OMX_VIDEO_VC1LoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_VIDEO_VC1LoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ OMX_VIDEO_VC1LoopFilterMax = 0x7FFFFFFF } OMX_VIDEO_VC1LOOPFILTERTYPE; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_PARAM_VC1INTERLACECODING : to configure the interlace encoding related settings @param eInterlaceCodingType to specify the settings of interlace content @sa OMX_TI_VIDEO_VC1_INTERLACE_CODINGTYPE @param bTopFieldFirst to speicfy the first field sent is top or bottom @param bBottom_Field_Intra to specify codec that encode bottomfield also as intra or not */ /* ==========================================================================*/ typedef struct OMX_TI_VIDEO_PARAM_VC1INTERLACECODING { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_TI_VIDEO_VC1_INTERLACE_CODINGTYPE eInterlaceCodingType; OMX_BOOL bTopFieldFirst; OMX_BOOL bBottomFieldIntra; } OMX_TI_VIDEO_PARAM_VC1INTERLACECODING; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_PARAM_VC1HRDBUFFERSETTING : to configure the HRD related params @param nInitialBufferLevel Initial Buffer level for HRD compliance @param nHRDBufferSize Hypothetical Reference Decoder Buffer Size @param nTargetBitrate Target bitrate to encode with */ /* ==========================================================================*/ typedef struct OMX_TI_VIDEO_PARAM_VC1HRDBUFFERSETTING { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nInitialBufferLevel; OMX_U32 nHRDBufferSize; OMX_U32 nTargetBitrate; } OMX_TI_VIDEO_PARAM_VC1HRDBUFFERSETTING; /** * VC1 intra Period Configs * * STRUCT MEMBERS: * nSize : Size of the structure in bytes * nVersion : OMX specification version information * nPortIndex : Port that this structure applies to * nPFrames : Specifies internal of coding Intra frames */ typedef struct OMX_TI_VIDEO_CONFIG_VC1INTRAPERIOD { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nPFrames; } OMX_TI_VIDEO_CONFIG_VC1INTRAPERIOD; // IDR is not supported in VC1 /** * VC1 Slice Mode modes * * OMX_VIDEO_SLICEMODE_VC1Default : Default slice coding mode is disabled * OMX_VIDEO_SLICEMODE_VC1ROWSlice : Slices are controlled based upon number of Rows * OMX_VIDEO_SLICEMODE_VC1OFFSET : Slices are controlled based upon user defined offset in unit of Rows */ typedef enum OMX_TI_VIDEO_VC1SLICEMODETYPE { OMX_VIDEO_SLICEMODE_VC1Default = 0, OMX_VIDEO_SLICEMODE_VC1ROWSlice, OMX_VIDEO_SLICEMODE_VC1OFFSET, OMX_VIDEO_SLICEMODE_VC1KhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_VIDEO_SLICEMODE_VC1VendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ OMX_VIDEO_SLICEMODE_VC1LevelMax = 0x7FFFFFFF } OMX_TI_VIDEO_VC1SLICEMODETYPE; /* ========================================================================== */ /*! @brief OMX_VIDEO_CONFIG_VC1SLICECODINGTYPE : to configure the Slice Settings @param eSliceMode to specify the Slice mode @sa OMX_TI_VIDEO_VC1SLICEMODETYPE @param nSlicesize to specify the sliceSize */ /* ==========================================================================*/ typedef struct OMX_VIDEO_CONFIG_VC1SLICECODINGTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_TI_VIDEO_VC1SLICEMODETYPE eSliceMode; OMX_U32 nSlicesize; } OMX_VIDEO_CONFIG_VC1SLICECODINGTYPE; /* ========================================================================== */ /*! @brief OMX_TI_VIDEO_CONFIG_VC1HRDBUFFERSETTING : to configure the HRD related params @param nHRDBufferSize Hypothetical Reference Decoder Buffer Size @param nEncodeBitrate Target bitrate to encode with */ /* ==========================================================================*/ typedef struct OMX_TI_VIDEO_CONFIG_VC1HRDBUFFERSETTING { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U32 nHRDBufferSize; OMX_U32 nEncodeBitrate; } OMX_TI_VIDEO_CONFIG_VC1HRDBUFFERSETTING; /** * VC1 params * * STRUCT MEMBERS: * nSize : Size of the structure in bytes * nVersion : OMX specification version information * nPortIndex : Port that this structure applies to * eProfile : VC1 profile(s) to use * eLevel : VC1 level(s) to use * eLoopFilterMode : Enable/disable loop filter */ typedef struct OMX_TI_VIDEO_VC1_STD_PARAMS { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_TI_VIDEO_VC1PROFILETYPE eProfile; OMX_TI_VIDEO_VC1LEVELTYPE eLevel; OMX_VIDEO_VC1LOOPFILTERTYPE eLoopFilterMode; }OMX_TI_VIDEO_VC1_STD_PARAMS; /** * GetConfigData params * * STRUCT MEMBERS: * nSize : Size of the structure in bytes * nVersion : OMX specification version information * nPortIndex : Port that this structure applies to * nBufarray[100] : Array containing config data * nBufSize : number of bytes of config data in the nBufarray */ typedef struct OMX_TI_VIDEO_GETCONFIGPARAMS { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_U8 nBufarray[100]; OMX_U32 nBufSize; }OMX_TI_VIDEO_GETCONFIGPARAMS; /** * VC1 BitStreamFormat Type */ typedef enum OMX_VC1FORMATSTYPE { OMX_VC1RAWStream = 0, /**< bit-stream does not contain the RCV headers */ OMX_VC1RCVType1Stream = 1, /**< bit-stream contain the RCV headers in Version 1 format */ OMX_VC1RCVType2Stream = 2, /**< bit-stream contain the RCV headers in Version 2 format */ OMX_VC1StreamFormatDefault = OMX_VC1RCVType2Stream, /**< Default stream format is RCV2 format */ OMX_VC1FormatCodingMax } OMX_VC1FORMATSTYPE; /** * VC1 BitStream Format * * STRUCT MEMBERS: * nSize : Size of the structure in bytes * nVersion : OMX specification version information * nPortIndex : Port that this structure applies to * eVC1Format : The format of headers in the encoded bitstream */ typedef struct OMX_VC1BITSTREAMFORMATTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_U32 nPortIndex; OMX_VC1FORMATSTYPE eVC1Format; } OMX_VC1BITSTREAMFORMATTYPE; #endif /* OMX_TI_VIDEO_H */