chenimagedct.h

来自「LDPC码的实现,包括编码器和解码器,使用了DCT.」· C头文件 代码 · 共 94 行

H
94
字号
// ChenImageDCT.h

#ifndef _CHENIMGDCT_H_
#define _CHENIMGDCT_H_
#include <ChenImage.h>

/* -----------------------------------------------------------------------------
 * ChenImageDCT_block88DCTQuantize
 * -----------------------------------------------------------------------------
 * Blockwise (8,8) DCT-transforms and quantizes a regular image.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const short* pSrc
 * const short* (float*) pTable
 *
 * Outputs:
 * short* (float*) pDstQuant
 * -----------------------------------------------------------------------------
 */
int ChenImageDCT_block88DCTQuantize(const int nImageW, const int nImageH, const short* pSrc, const short* pTable, short* pDstQuant);
int ChenImageDCT_block88DCTQuantize(const int nImageW, const int nImageH, const float* pSrc, const short* pTable, float* pDstQuant);

/* -----------------------------------------------------------------------------
 * ChenImageDCT_block88InvDCTDequantize
 * -----------------------------------------------------------------------------
 * Dequantizes and blockwise (8,8) inverse-DCT-transforms a coefficient image.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const short* (float*) pSrc
 * const short* pTable
 *
 * Outputs:
 * short* (float*) pDst
 * -----------------------------------------------------------------------------
 */
int ChenImageDCT_block88InvDCTDequantize(const int nImageW, const int nImageH, const short* pSrc, const short* pTable, short* pDst);
int ChenImageDCT_block88InvDCTDequantize(const int nImageW, const int nImageH, const float* pSrc, const short* pTable, float* pDst);

/* -----------------------------------------------------------------------------
 * ChenImageDCT_blockDCTQuantize
 * -----------------------------------------------------------------------------
 * Blockwise DCT-transforms and quantizes a regular image.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const short* pSrc
 * const short* (float*) pTable
 *
 * Outputs:
 * short* (float*) pDstQuant
 * -----------------------------------------------------------------------------
 */
int ChenImageDCT_blockDCTQuantize(const int nBlockSize, const int nImageW, const int nImageH, const short* pSrc, const short* pTable, short* pDst);
int ChenImageDCT_blockDCTQuantize(const int nBlockSize, const int nImageW, const int nImageH, const float* pSrc, const short* pTable, float* pDst);

/* -----------------------------------------------------------------------------
 * ChenImageDCT_blockInvDCTDequantize
 * -----------------------------------------------------------------------------
 * Dequantizes and blockwise inverse-DCT-transforms a coefficient image.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const short* (float*) pSrc
 * const short* pTable
 *
 * Outputs:
 * short* (float*) pDst
 * -----------------------------------------------------------------------------
 */
int ChenImageDCT_blockInvDCTDequantize(const int nBlockSize, const int nImageW, const int nImageH, const short* pSrc, const short* pTable, short* pDst);
int ChenImageDCT_blockInvDCTDequantize(const int nBlockSize, const int nImageW, const int nImageH, const float* pSrc, const short* pTable, float* pDst);

/* -----------------------------------------------------------------------------
 * ChenImageDCT_blockDCTQuantizeRange
 * -----------------------------------------------------------------------------
 * Calculates dynamic range of quantized blockwise DCT coefficients.
 *
 * Inputs:
 * const int nBlockSize
 * const short* pTable
 *
 * Outputs:
 * short* pRange
 * -----------------------------------------------------------------------------
 */
int ChenImageDCT_blockDCTQuantizeRange(const int nBlockSize, const short* pTable, short* pRange);

#endif

⌨️ 快捷键说明

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