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

📄 armicjp_dctquantinv_s16.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** *  * File Name:  armICJP_DCTQuantInv_S16.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 IDCT with de-quantization * */#include "omxtypes.h"#include "armOMX.h"#include "omxIC.h"#include "armIC.h"#include "armCOMM.h"/** * Function: armICJP_DCTQuantInv_S16 * * Brief: * Single block dequantization and IDCT function. * * Description: * This function implements inverse DCT with (Optional) dequantization for 8-bit image data. It processes one * block (8x8). * The start address of pQuantRawTable and pQuantInvTable must be 8-byte aligned. * * * Parameters: * [in]  pSrc           identifies the input coefficient block (8x8) buffer. The start address must be 8-byte *                            aligned. * [in]  pQuantInvTable identifies the quantization table which was generated from *                            "omxICJP_DCTQuantInvTableInit". The table length is 64 entries by 32-bit wide. The start address must be *                            8-byte aligned. If this pointer is NULL dequantization is not performed * * [out] pDst           identifies output coefficient block(8x8) buffer. The start address must be 8-byte aligned. * * Return Value: * OMXVoid * */OMXVoid armICJP_DCTQuantInv_S16(     const OMX_S16 *pSrc,     OMX_S16 *pDst,     const OMX_U32 *pQuantInvTable ){    OMX_INT v,u,y,x,quantFlag;    OMX_F64 coeff,mac,quant;        if( pQuantInvTable == NULL )    {        quantFlag = 0;    }    else    {        quantFlag = 1;    }        /* Processing */    for( y = 0 ; y < 8 ; y++)    {        for( x = 0 ; x < 8 ; x++)        {            /* Compute the IDCT coefficient */            mac = 0.0;                        for( v = 0 ; v < 8 ; v++)            {                for( u = 0 ; u < 8 ; u++)                {                    /* Inverse Quantization */                    if(quantFlag == 1)                    {                        coeff  = (OMX_F64)pSrc[v*8 + u];                        quant = (OMX_F64)pQuantInvTable[v*8 + u];                        coeff  *= quant;                    }                    else                    {                        coeff  = (OMX_F64)pSrc[v*8 + u];                    }                                        coeff *= (armICJP_CosTable[x][u] *                                armICJP_CosTable[y][v]);                                        mac  += coeff;                }            }                        /*Store the result*/            pDst[y*8 + x] = armSatRoundFloatToS16(mac);        }    }}/*End of File*/

⌨️ 快捷键说明

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