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

📄 chenimagedct.h

📁 LDPC码的实现,包括编码器和解码器,使用了DCT.
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -