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

📄 omxacmp3_huffmandecodesfb_s32.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** *  * File Name:  omxACMP3_HuffmanDecodeSfb_S32.c * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * Description: * This function is used to decode Huffman symbols as given in ISO/IEC 13818-3 */#include "omxtypes.h"#include "armOMX.h"#include "omxAC.h"#include "armCOMM_Bitstream.h"#include "armACMP3_Tables.h"#include "armACMP3_CommonTables.h"/** * Function:  omxACMP3_HuffmanDecodeSfb_S32   (3.1.3.2.3) * * Description: * Decodes Huffman symbols for the 576 spectral coefficients associated with  * one granule of one channel. References 1. [ISO11172-3], Table B.8  * ( MPEG-1 ) 2. [ISO13818-3], sub-clause 2.5.2.8 and Table B.2 ( MPEG-2 ) 3.  * [ISO14496-3], sub-part 9,  MPEG-1/2 Audio in MPEG-4   * * Input Arguments: *    *   ppBitStream - double pointer to the first bit stream byte that contains  *            the Huffman code words associated with the current granule and  *            channel  *   pOffset- pointer to the starting bit position in the bit stream byte  *            pointed by *ppBitStream; valid within the range of 0 to 7, where  *            0 corresponds to the most significant bit, and 7 corresponds to  *            the least significant bit  *   pSideInfo - pointer to MP3 structure that contains the side information  *            associated with the current granule and channel  *   pFrameHeader - pointer to MP3 structure that contains the header  *            associated with the current frame  *   hufSize - the number of Huffman code bits associated with the current  *            granule and channel  *   pSfbTableLong - pointer to the long block scalefactor band table,  *            formatted as described in section 3.1.2.3.  Table entries  *            optionally may follow the MPEG-1, MPEG-2, or MPEG-4 audio  *            standards as shown in Example 3-1. Alternatively the table  *            entries may be defined to suit a special purpose. References:   *            [ISO11172-3], Table B.8, [ISO13818-3], Table B.2, [ISO14496-3],  *            sub-part 9.  *   pSfbTableShort - pointer to the short block scalefactor band table,  *            formatted as described in section 3.1.2.4.  Table entries  *            optionally may follow the MPEG-1, MPEG-2, or MPEG-4 audio  *            standards as shown in Example 3-2.  Alternatively the table  *            entries may be defined to suit a special purpose.  References:  *            [ISO11172-3], Table B.8, [ISO13818-3], Table B.2, [ISO14496-3],  *            sub-part 9.  *   pMbpTable - pointer to the mixed block partitioning table, formatted as  *            described in section 3.1.2.5. Table entries optionally may  *            follow the MPEG-1, MPEG-2, or MPEG-4 audio standards as shown in  *            Example 3-3. Alternatively the table entries may be defined to  *            suit a special purpose.  References:  [ISO11172-3], Table B.8,  *            [ISO13818-3], Table B.2, [ISO14496-3], sub-part 9.  * * Output Arguments: *    *   pDstIs - pointer to the vector of decoded Huffman symbols used to  *            compute the quantized values of the 576 spectral coefficients  *            that are associated with the current granule and channel  *   pDstNonZeroBound - pointer to the spectral region above which all  *            coefficients are set equal to zero  *   ppBitStream - updated double pointer to the particular byte in the bit  *            stream that contains the first new bit following the decoded  *            block of Huffman codes  *   pOffset - updated pointer to the next bit position in the byte pointed  *            by *ppBitStream; valid within the range of 0 to 7, where 0  *            corresponds to the most significant bit, and 7 corresponds to  *            the least significant bit  * * Return Value: *     *    OMX_Sts_NoErr - no error  *    OMX_Sts_BadArgErr - Bad arguments detected; at least one of the  *              following pointers is NULL:  *            - ppBitStream  *            - pOffset  *            - pDstIs  *            - pDstNonZeroBound *            - pSideInfo  *            - pFrameHeader  *            - pSfbTableLong  *            - *ppBitStream  *        Or any one or more of the following conditions are true:  *            - *pOffset < 0, or *pOffset > 7.  *            - hufSize < 0 or hufSize > pSideInfo->part23Len  *            - pSideInfo-> bigVals * 2 > OMX_MP3_GRANULE_LEN  *            - pSideInfo->bigVals * 2 < 0  *            - pSideInfo->winSwitch outside the range [0,1]  *            - pSideInfo->blockType outside the range [0,3]  *            - pSideInfo->winSwitch==1 when  *              pSideInfo->blockType==0  *            - pSideInfo->cnt1TabSel outside the range [0,1]  *            - pSideInfo-> reg0Cnt < 0 when pSideInfo->blockType==0  *            - pSideInfo-> reg1Cnt < 0 when pSideInfo->blockType==0  *            - pSideInfo-> reg0Cnt + pSideInfo -> reg1Cnt + 2 > 22  *              when pSideInfo->blockType==0  *            - pSideInfo-> pTableSelect[0] outside the range [0,31]   *            - pSideInfo-> pTableSelect[1] outside the range [0,31]  *            - pSideInfo-> pTableSelect[2] outside the range [0,31] *              when pSideInfo->blockType==0  *            - pFrameHeader-> id outside the range [0,1]  *            - pFrameHeader-> idEX outside the range [0,1] *            - pFrameHeader-> idEX == 0 when pFrameHeader->id==1  *            - pFrameHeader->layer !=1  *            - pFrameHeader->samplingFreq outside the range [0,2]  *            - hufSize outside the range [0, pSideInfo->part23Len]  *    OMX_Sts_Err - indicates that the number of remaining Huffman code bits  *              for <count1> partition is less than zero after decoding the  *              <big_values> partition.  * */OMXResult omxACMP3_HuffmanDecodeSfb_S32(    const OMX_U8 **ppBitStream,    OMX_INT *pOffset,    OMX_S32 *pDstIs,    OMX_INT *pDstNonZeroBound,    OMXMP3SideInfo *pSideInfo,    OMXMP3FrameHeader *pFrameHeader,    OMX_INT hufSize,    OMXMP3ScaleFactorBandTableLong pSfbTableLong){    return omxACMP3_HuffmanDecodeSfbMbp_S32 (           ppBitStream,        pOffset,        pDstIs,        pDstNonZeroBound,        pSideInfo,        pFrameHeader,        hufSize,        (/*OMXMP3ScaleFactorBandTableLong*/void*) pSfbTableLong,        (/*OMXMP3ScaleFactorBandTableShort*/void*)armACMP3_SFBTableShort,        (/*OMXMP3MixedBlockPartitionTable*/void*)armACMP3_SFBTableMixed);}/***************************************************************************** *                              END OF FILE *****************************************************************************/

⌨️ 快捷键说明

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