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

📄 armacaac_tnsdecodecoef.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** *  * File Name:  armACAAC_TnsDecodeCoef.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 decoding TNS coefficients * */#include "omxtypes.h"#include "armOMX.h"#include "armAC.h"#include "armACAAC_Tables.h"/** * Function: armACAAC_TnsDecodeCoef * * Description: * Inverse Quantization and conversion to LPC coefficients * * Parameters: * [in]  pTnsFiltCoef pointer to TNS filter coefficients * [in]  coeffRes     TNS coef resolution bits * [in]  tnsOrder     TNS filter order * [out] pLpCoeff     pointer to the LPC coefficients * * Return Value: * Standard OMXResult result. See enumeration for possible result codes. * */OMXResult armACAAC_TnsDecodeCoef(    const OMX_S8 *pTnsFiltCoef,    OMX_F64 *pLpCoeff,    OMX_INT coeffRes,    OMX_INT tnsOrder){        OMX_INT coeff,i;    OMX_F64 invQuantCoeff[20];     OMX_F64 temp[20];    OMX_F64 prod;        coeffRes -= 3;        /* Inverse Quantization */    for (i = 0; i < tnsOrder ; i++)    {        if( (pTnsFiltCoef[i] < - 8) || ( pTnsFiltCoef[i] > 7 ) )        {            return OMX_StsACAAC_TnsCoefErr;        }        invQuantCoeff[i] = armACAAC_SinLookUp[ ( (pTnsFiltCoef[i] + 8) << 1 ) + coeffRes];    }        /* Conversion to LPC coefficients */        pLpCoeff[0] = 1;    for (coeff = 1; coeff <= tnsOrder; coeff++)    {        for (i = 1; i < coeff ; i++)        {             prod    = invQuantCoeff[coeff - 1] * pLpCoeff[coeff - i];            temp[i] = pLpCoeff[i] + prod;        }        for (i = 1; i < coeff; i++)        {             pLpCoeff[i] = temp[i];        }                pLpCoeff[coeff] = invQuantCoeff[coeff - 1];    }        return OMX_Sts_NoErr;}/*End of File*/

⌨️ 快捷键说明

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