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

📄 omxacaac_decodedatstrelt.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** *  * File Name:  omxACAAC_DecodeDatStrElt.c * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * * Description: * This file contains module for parsing DSE information from AAC bitstream * */#include "omxtypes.h" #include "armOMX.h"#include "omxAC.h"#include "armCOMM.h"#include "armCOMM_Bitstream.h" /** * Function:  omxACAAC_DecodeDatStrElt   (3.2.3.1.5) * * Description: * Gets data_stream_element from the input bit stream.  * * Reference: [ISO14496-3], Table 4.10  * * Input Arguments: *    *   ppBitStream - double pointer to the current byte  *   pOffset - pointer to the bit position in the byte pointed by  *            *ppBitStream. Valid within 0 to 7. 0: MSB of the byte, 7: LSB of  *            the byte.  * * Output Arguments: *    *   ppBitStream - double pointer to the current byte after the decode data  *            stream element  *   pOffset - pointer to the bit position in the byte pointed by  *            *ppBitStream. Valid within 0 to 7. 0: MSB of the byte, 7: LSB of  *            the byte.  *   pDataTag - pointer to element_instance_tag.  *   pDataCnt - pointer to the value of length of total data in bytes  *   pDstDataElt - pointer to the data stream buffer that contains the data  *            stream extracted from the input bit stream.  There are 512  *            elements in the buffer pointed by pDstDataElt.  * * Return Value: *     *    OMX_Sts_NoErr - no error  *    OMX_Sts_BadArgErr - bad arguments  *    -    At least one of the following pointers is NULL:  *           - ppBitStream, *           - pOffset,  *           - *ppBitStream,  *           - pDataTag,  *           - pDataCntor  *           - pDstDataElt.  *    -  *pOffset exceeds [0, 7]  * */  OMXResult omxACAAC_DecodeDatStrElt(     const OMX_U8 **ppBitStream,     OMX_INT *pOffset,     OMX_INT *pDataTag,     OMX_INT *pDataCnt,     OMX_U8 *pDstDataElt ){    OMX_INT  nextData,count;    OMX_INT  i;        /* Argument Check */            armRetArgErrIf( ppBitStream  == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf(*ppBitStream  == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf( pOffset      == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf( pDataTag     == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf( pDataCnt     == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf( pDstDataElt  == NULL , OMX_Sts_BadArgErr);    armRetArgErrIf( (*pOffset > 7) || (*pOffset < 0) , OMX_Sts_BadArgErr);    /* Processing */    *pDataTag   = (OMX_INT)armGetBits(ppBitStream,pOffset,4);/*element_instance_tag*/    nextData    = (OMX_INT)armGetBits(ppBitStream,pOffset,1);/*data_byte_align_flag*/    count       = (OMX_INT)armGetBits(ppBitStream,pOffset,8);/*cnt*/        if(count == 255)    {        count  += (OMX_INT)armGetBits(ppBitStream,pOffset,8);/*esc_count*/    }    *pDataCnt = count;        if(nextData == 1)    {        /*data_byte_align_flag*/        armByteAlign(ppBitStream,pOffset);    }        for(i = 0; i < count ; i++)    {        pDstDataElt[i]   = (OMX_INT)armGetBits(ppBitStream,pOffset,8);/*data_stream_byte*/    }        return OMX_Sts_NoErr;} /* End of File */

⌨️ 快捷键说明

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