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

📄 chenvideo.h

📁 LDPC码的实现,包括编码器和解码器,使用了DCT.
💻 H
字号:
// ChenVideo.h

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

#ifndef SIXTEENCIF_WIDTH
	#define SIXTEENCIF_WIDTH 1408
#endif
#ifndef SIXTEENCIF_HEIGHT
	#define SIXTEENCIF_HEIGHT 1152
#endif
#ifndef FOURCIF_WIDTH
	#define FOURCIF_WIDTH 704
#endif
#ifndef FOURCIF_HEIGHT
	#define FOURCIF_HEIGHT 576
#endif
#ifndef CIF_WIDTH
	#define CIF_WIDTH 352
#endif
#ifndef CIF_HEIGHT
	#define CIF_HEIGHT 288
#endif
#ifndef QCIF_WIDTH
	#define QCIF_WIDTH 176
#endif
#ifndef QCIF_HEIGHT
	#define QCIF_HEIGHT 144
#endif
enum Resolution {QCIF = 0, CIF, FOURCIF, SIXTEENCIF};

/* -----------------------------------------------------------------------------
 * ChenVideo_loadYUVVideo
 * -----------------------------------------------------------------------------
 * Loads a YUV video file into memory.
 *
 * Inputs:
 * const char* pVideoFileName
 * Resolution resolution (QCIF, CIF, FOURCIF, SIXTEENCIF)
 * const int nStartFrame
 * const int nEndFrame
 * const bool bRGB
 *
 * Outputs:
 * short**& pFramesY
 * short**& pFramesU
 * short**& pFramesV
 * -----------------------------------------------------------------------------
 */
int ChenVideo_loadYUVVideo(const char* pVideoFileName, Resolution resolution, const int nStartFrame, const int nEndFrame, short**& pFramesY, short**& pFramesU, short**& pFramesV);

/* -----------------------------------------------------------------------------
 * ChenVideo_motionCompensateInterpolate
 * -----------------------------------------------------------------------------
 * Performs motion-compensated interpolation between frames t and t+2, 
 * generating a prediction of frame t+1. Assumes motion from frame t to t+1
 * matches motion from frame t+1 to t+2.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const int nBlockSize
 * const int nMaxShift
 * const short* pSrc1
 * const short* pSrc2
 * const short* pShiftsX -- blockwise horizontal shifts of pSrc2
 * const short* pShiftsY -- blockwise vertical shifts of pSrc2
 *
 * Outputs:
 * short* pDst
 * -----------------------------------------------------------------------------
 */
int ChenVideo_motionCompensateInterpolate(const int nWidth, const int nHeight, const int nBlockSize, const int nMaxShift, const short* pSrc1, const short* pSrc2, const short* pShiftsX, const short* pShiftsY, short* pDst);

/* -----------------------------------------------------------------------------
 * ChenVideo_motionCompensateInterpolateYUV
 * -----------------------------------------------------------------------------
 * Performs motion-compensated interpolation between frames t and t+2, 
 * generating a prediction of frame t+1. Assumes motion from frame t to t+1
 * matches motion from frame t+1 to t+2.
 *
 * Inputs:
 * const int nWidth
 * const int nHeight
 * const int nBlockSize
 * const int nMaxShift
 * const short* pSrc1[3]
 * const short* pSrc2[3]
 *
 * Outputs:
 * short* pDst[3]
 * -----------------------------------------------------------------------------
 */
int ChenVideo_motionCompensateInterpolateYUV(const int nWidth, const int nHeight, const int nBlockSize, const int nMaxShift, const short** pSrc1, const short** pSrc2, short** pDst);

#endif

⌨️ 快捷键说明

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