📄 omxicjp_dctquantfwd_multiple_s16.c
字号:
/** * * File Name: omxICJP_DCTQuantFwd_Multiple_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 multiple block FDCT with quantization * */#include "omxtypes.h"#include "armOMX.h"#include "omxIC.h"#include "armCOMM.h"/** * Function: omxICJP_DCTQuantFwd_Multiple_S16 (5.1.3.2.6) * * Description: * This function implements forward DCT with quantization for 8-bit image * data. It processes multiple adjacent blocks (8x8). The blocks are assumed * to be part of a planarized buffer. This function should be called * separately for luma and chroma buffers with the respective quantization * table. The output matrix is the transpose of the explicit result. As a * result, the Huffman coding functions in this library handle transpose as * well. * * Input Arguments: * * pSrc - pointer to the start of the first 8x8 block in the input buffer, * which should contain nBlocks blocks of 8 x 8 image data. The * data within each block must be arranged in raster scan order, * and the start address must be 8-byte aligned. The input * components are bounded on the interval [-128, 127] within a * signed 16-bit container. Each 8x8 block in the buffer is stored * as 64 entries (16-bit) linearly in a buffer, and the multiple * blocks must be stored contiguously. * pQuantFwdTable - pointer to the 64-entry quantization table generated by * "DCTQuantFwdTableInit." must be 8-byte aligned. * nBlocks - the number of 8x8 blocks to be processed. * * Output Arguments: * * pDst - pointer to the start of the first 8x8 output coefficient block in * the multi-block coefficient output buffer. The start address * must be 8-byte aligned. To achieve better performance, the * output 8x8 matrices are the transpose of the explicit results * for each of the nBlocks blocks. This transpose will be handled * in Huffman encoding. * * Return Value: * * OMX_Sts_NoErr - no error * OMX_Sts_BadArgErr - Bad arguments. Returned for any of the following * conditions: * - a pointer was NULL * - one of the following pointers not 8-byte aligned: pSrc, pDst, or * pQuantFwdTable. * */ OMXResult omxICJP_DCTQuantFwd_Multiple_S16( const OMX_S16* pSrc, OMX_S16 *pDst, OMX_INT nBlocks, const OMX_U16 *pQuantFwdTable ){ OMX_INT blockNum; /* Argument Checks */ armRetArgErrIf( pSrc == NULL, OMX_Sts_BadArgErr) armRetArgErrIf( pDst == NULL, OMX_Sts_BadArgErr) armRetArgErrIf( nBlocks < 1 , OMX_Sts_BadArgErr) armRetArgErrIf( pQuantFwdTable == NULL , OMX_Sts_BadArgErr) armRetArgErrIf( armNot8ByteAligned(pSrc) , OMX_Sts_BadArgErr) armRetArgErrIf( armNot8ByteAligned(pDst) , OMX_Sts_BadArgErr) armRetArgErrIf( armNot8ByteAligned(pQuantFwdTable), OMX_Sts_BadArgErr) /* Processing */ for (blockNum = 0 ; blockNum < nBlocks ; blockNum++) { omxICJP_DCTQuantFwd_S16(pSrc,pDst,pQuantFwdTable); pSrc += 64; pDst += 64; } return OMX_Sts_NoErr; }/*End of File*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -