⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 armvc.h

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 H
📖 第 1 页 / 共 3 页
字号:
/** *  * File Name:  armVC.h * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * * File: armVideo.h * Brief: Declares API's/Basic Data types used across the OpenMAX Video domain * */#ifndef _armVideo_H_#define _armVideo_H_#include "omxVC.h"#include "armCOMM_Bitstream.h"/** * ARM specific state structure to hold Motion Estimation information. */ struct m4p2_MESpec{    OMXVCM4P2MEParams MEParams;    OMXVCM4P2MEMode   MEMode;};struct m4p10_MESpec{    OMXVCM4P10MEParams MEParams;    OMXVCM4P10MEMode   MEMode;};typedef struct m4p2_MESpec  ARMVCM4P2_MESpec;typedef struct m4p10_MESpec ARMVCM4P10_MESpec;/** * Function: armVCM4P2_CompareMV * * Description: * Performs comparision of motion vectors and SAD's to decide the * best MV and SAD * * Remarks: * * Parameters: * [in]     mvX     x coordinate of the candidate motion vector * [in]     mvY     y coordinate of the candidate motion vector * [in]     candSAD Candidate SAD * [in]     bestMVX x coordinate of the best motion vector * [in]     bestMVY y coordinate of the best motion vector * [in]     bestSAD best SAD * * Return Value: * OMX_INT -- 1 to indicate that the current sad is the best *            0 to indicate that it is NOT the best SAD */OMX_INT armVCM4P2_CompareMV (    OMX_S16 mvX,    OMX_S16 mvY,    OMX_INT candSAD,    OMX_S16 bestMVX,    OMX_S16 bestMVY,    OMX_INT bestSAD);/** * Function: armVCM4P2_ACDCPredict * * Description: * Performs adaptive DC/AC coefficient prediction for an intra block. Prior * to the function call, prediction direction (predDir) should be selected * as specified in subclause 7.4.3.1 of ISO/IEC 14496-2. * * Remarks: * * Parameters: * [in] pSrcDst     pointer to the coefficient buffer which contains *                          the quantized coefficient residuals (PQF) of the *                          current block * [in] pPredBufRow pointer to the coefficient row buffer * [in] pPredBufCol pointer to the coefficient column buffer * [in] curQP       quantization parameter of the current block. curQP *                          may equal to predQP especially when the current *                          block and the predictor block are in the same *                          macroblock. * [in] predQP      quantization parameter of the predictor block * [in] predDir     indicates the prediction direction which takes one *                          of the following values: *                          OMX_VIDEO_HORIZONTAL    predict horizontally *                          OMX_VIDEO_VERTICAL      predict vertically * [in] ACPredFlag  a flag indicating if AC prediction should be *                          performed. It is equal to ac_pred_flag in the bit *                          stream syntax of MPEG-4 * [in] videoComp   video component type (luminance, chrominance or *                          alpha) of the current block * [in] flag        This flag defines the if one wants to use this functions to *                  calculate PQF (set 1, prediction) or QF (set 0, reconstruction) * [out]    pPreACPredict   pointer to the predicted coefficients buffer. *                          Filled ONLY if it is not NULL * [out]    pSrcDst     pointer to the coefficient buffer which contains *                          the quantized coefficients (QF) of the current *                          block * [out]    pPredBufRow pointer to the updated coefficient row buffer * [out]    pPredBufCol pointer to the updated coefficient column buffer * [out]    pSumErr     pointer to the updated sum of the difference *                      between predicted and unpredicted coefficients *                      If this is NULL, do not update * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_ACDCPredict(     OMX_S16 * pSrcDst,     OMX_S16 * pPreACPredict,     OMX_S16 * pPredBufRow,     OMX_S16 * pPredBufCol,     OMX_INT curQP,     OMX_INT predQP,     OMX_INT predDir,     OMX_INT ACPredFlag,     OMXVCM4P2VideoComponent  videoComp,     OMX_U8 flag,     OMX_INT *pSumErr);/** * Function: armVCM4P2_SetPredDir * * Description: * Performs detecting the prediction direction * * Remarks: * * Parameters: * [in] blockIndex  block index indicating the component type and *                          position as defined in subclause 6.1.3.8, of ISO/IEC *                          14496-2. Furthermore, indexes 6 to 9 indicate the *                          alpha blocks spatially corresponding to luminance *                          blocks 0 to 3 in the same macroblock. * [in] pCoefBufRow pointer to the coefficient row buffer * [in] pQpBuf      pointer to the quantization parameter buffer * [out]    predQP      quantization parameter of the predictor block * [out]    predDir     indicates the prediction direction which takes one *                          of the following values: *                          OMX_VIDEO_HORIZONTAL    predict horizontally *                          OMX_VIDEO_VERTICAL      predict vertically * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_SetPredDir(     OMX_INT blockIndex,     OMX_S16 *pCoefBufRow,     OMX_S16 *pCoefBufCol,     OMX_INT *predDir,     OMX_INT *predQP,     const OMX_U8 *pQpBuf);/** * Function: armVCM4P2_EncodeVLCZigzag_Intra * * Description: * Performs zigzag scanning and VLC encoding for one intra block. * * Remarks: * * Parameters: * [in] ppBitStream     pointer to the pointer to the current byte in *                              the bit stream * [in] pBitOffset      pointer to the bit position in the byte pointed *                              by *ppBitStream. Valid within 0 to 7. * [in] pQDctBlkCoef    pointer to the quantized DCT coefficient * [in] predDir         AC prediction direction, which is used to decide *                              the zigzag scan pattern. This takes one of the *                              following values: *                              OMX_VIDEO_NONE          AC prediction not used. *                                                      Performs classical zigzag *                                                      scan. *                              OMX_VIDEO_HORIZONTAL    Horizontal prediction. *                                                      Performs alternate-vertical *                                                      zigzag scan. *                              OMX_VIDEO_VERTICAL      Vertical prediction. *                                                      Performs alternate-horizontal *                                                      zigzag scan. * [in] pattern         block pattern which is used to decide whether *                              this block is encoded * [in] start           start indicates whether the encoding begins with 0th element *                      or 1st. * [out]    ppBitStream     *ppBitStream is updated after the block is encoded, *                              so that it points to the current byte in the bit *                              stream buffer. * [out]    pBitOffset      *pBitOffset is updated so that it points to the *                              current bit position in the byte pointed by *                              *ppBitStream. * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_EncodeVLCZigzag_Intra(     OMX_U8 **ppBitStream,     OMX_INT *pBitOffset,     const OMX_S16 *pQDctBlkCoef,     OMX_U8 predDir,     OMX_U8 pattern,     OMX_INT shortVideoHeader,     OMX_U8 start);/** * Function: armVCM4P2_DecodeVLCZigzag_Intra * * Description: * Performs VLC decoding and inverse zigzag scan for one intra coded block. * * Remarks: * * Parameters: * [in] ppBitStream     pointer to the pointer to the current byte in *                              the bitstream buffer * [in] pBitOffset      pointer to the bit position in the byte pointed *                              to by *ppBitStream. *pBitOffset is valid within *                              [0-7]. * [in] predDir         AC prediction direction which is used to decide *                              the zigzag scan pattern. It takes one of the *                              following values: *                              OMX_VIDEO_NONE  AC prediction not used; *                                              perform classical zigzag scan; *                              OMX_VIDEO_HORIZONTAL    Horizontal prediction; *                                                      perform alternate-vertical *                                                      zigzag scan; *                              OMX_VIDEO_VERTICAL      Vertical prediction; *                                                      thus perform *                                                      alternate-horizontal *                                                      zigzag scan. * [in] videoComp       video component type (luminance, chrominance or *                              alpha) of the current block * [in] shortVideoHeader binary flag indicating presence of short_video_header; escape modes 0-3 are used if shortVideoHeader==0, *                           and escape mode 4 is used when shortVideoHeader==1. * [in] start           start indicates whether the encoding begins with 0th element *                      or 1st. * [out]    ppBitStream     *ppBitStream is updated after the block is *                              decoded, so that it points to the current byte *                              in the bit stream buffer * [out]    pBitOffset      *pBitOffset is updated so that it points to the *                              current bit position in the byte pointed by *                              *ppBitStream * [out]    pDst            pointer to the coefficient buffer of current *                              block. Should be 32-bit aligned * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_DecodeVLCZigzag_Intra(     const OMX_U8 ** ppBitStream,     OMX_INT * pBitOffset,     OMX_S16 * pDst,     OMX_U8 predDir,     OMX_INT shortVideoHeader,      OMX_U8  start);/** * Function: armVCM4P2_FillVLDBuffer * * Description: * Performs filling of the coefficient buffer according to the run, level * and sign, also updates the index *  * Parameters: * [in]  storeRun        Stored Run value (count of zeros)    * [in]  storeLevel      Stored Level value (non-zero value) * [in]  sign            Flag indicating the sign of level * [in]  last            status of the last flag * [in]  pIndex          pointer to coefficient index in 8x8 matrix * [out] pIndex          pointer to updated coefficient index in 8x8  *                       matrix * [in]  pZigzagTable    pointer to the zigzag tables * [out] pDst            pointer to the coefficient buffer of current *                       block. Should be 32-bit aligned * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_FillVLDBuffer(    OMX_U32 storeRun,    OMX_S16 * pDst,    OMX_S16 storeLevel,    OMX_U8  sign,    OMX_U8  last,    OMX_U8  * index,    const OMX_U8 * pZigzagTable);/** * Function: armVCM4P2_GetVLCBits * * Description: * Performs escape mode decision based on the run, run+, level, level+ and  * last combinations. * * Remarks: * * Parameters: * [in]	ppBitStream		pointer to the pointer to the current byte in *								the bit stream * [in]	pBitOffset		pointer to the bit position in the byte pointed *								by *ppBitStream. Valid within 0 to 7 * [in] shortVideoHeader binary flag indicating presence of short_video_header; escape modes 0-3 are used if shortVideoHeader==0, *                           and escape mode 4 is used when shortVideoHeader==1. * [in] start           start indicates whether the encoding begins with  *                      0th element or 1st. * [in/out] pLast       pointer to last status flag * [in] runBeginSingleLevelEntriesL0      The run value from which level  *                                        will be equal to 1: last == 0 * [in] IndexBeginSingleLevelEntriesL0    Array index in the VLC table  *                                        pointing to the   *                                        runBeginSingleLevelEntriesL0  * [in] runBeginSingleLevelEntriesL1      The run value from which level  *                                        will be equal to 1: last == 1 * [in] IndexBeginSingleLevelEntriesL1    Array index in the VLC table  *                                        pointing to the   *                                        runBeginSingleLevelEntriesL0  * [in] pRunIndexTableL0    Run Index table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 0 * [in] pVlcTableL0         VLC table for last == 0 * [in] pRunIndexTableL1    Run Index table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 1 * [in] pVlcTableL1         VLC table for last == 1 * [in] pLMAXTableL0        Level MAX table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 0 * [in] pLMAXTableL1        Level MAX table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 1 * [in] pRMAXTableL0        Run MAX table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 0 * [in] pRMAXTableL1        Run MAX table defined in  *                          armVCM4P2_Huff_Tables_VLC.c for last == 1 * [out]pDst			    pointer to the coefficient buffer of current *							block. Should be 32-bit aligned * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armVCM4P2_GetVLCBits (              const OMX_U8 **ppBitStream,              OMX_INT * pBitOffset,			  OMX_S16 * pDst,			  OMX_INT shortVideoHeader,			  OMX_U8    start,			  			  OMX_U8  * pLast,			  OMX_U8    runBeginSingleLevelEntriesL0,			  OMX_U8    maxIndexForMultipleEntriesL0,			  OMX_U8    maxRunForMultipleEntriesL1,			  OMX_U8    maxIndexForMultipleEntriesL1,              const OMX_U8  * pRunIndexTableL0,              const ARM_VLC32 *pVlcTableL0,			  const OMX_U8  * pRunIndexTableL1,              const ARM_VLC32 *pVlcTableL1,              const OMX_U8  * pLMAXTableL0,              const OMX_U8  * pLMAXTableL1,              const OMX_U8  * pRMAXTableL0,              const OMX_U8  * pRMAXTableL1,              const OMX_U8  * pZigzagTable);/** * Function: armVCM4P2_PutVLCBits

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -