📄 h263pencode.h
字号:
// H263PEncode.h: interface for the H263PEncode class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_H263PENCODE_H__2CD8E329_A31A_46C5_B88D_0738AB868574__INCLUDED_)
#define AFX_H263PENCODE_H__2CD8E329_A31A_46C5_B88D_0738AB868574__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef _HENCLIB
/* Source format */
#define _SUBQCIF 1 //!< 88x72
#define _QCIF 2 //!< 176x144
#define _CIF 3 //!< 352x288
#define _4CIF 4
#define _16CIF 5
#define _CPFMT 6 //!< custom picture format
/* Picture format */
#define YUV420 1
#define YUV411 2
#define RGB24 3
/* Picture coding type */
#define INTRA 0 //!< intra picture
#define INTER 1 //!< inter picture
#define B_IMG 3 //!< B picture
#define SKIP 100 //!< for rate control
#define STORE 999 //!< for control
//mv search method
#define FULLSEARCH 0
#define MVFAST 1
#endif
struct _tagH263VencStatus;
struct _tagMCPara;
struct _tagputstrm;
typedef struct {
int m_iPicFormat; //!< Picture Format
int m_iPicWidth; //!< Picture Width
int m_iPicHeight; //!< Picture Height
int m_iVideoFormat; //!< Video Format
int m_iQuantI; //!< Quantizer of I picture
int m_iQuantP; //!< Quantizer of P picture
int m_iQuantB; //!< Quantizer of B picture
int m_iPRate; //!< The number of P frames to be encoded between 2 I frame
int m_iBFrame; //!< The number of B frames inserted;
int m_iFrameRate; //!< Frame rate
int m_iRefBufSize; //!< Reference Buffer size
int m_iMVSearchMethod; //!< Motion search method
int m_iMVSearchWin; //!< Motion search window size
int m_iUseAP; //!< Switch of Advanced Prediction mode
int m_iUseDF; //!< Switch of Deblocking Filter mode
int m_iUseRPS; //!< Switch of Reference Picture Selection mode
int m_iUseBFrame; //!< Switch of B Frame
int m_iUseAIC; //!< Switch of AIC
int m_iUseGob; //!< Switch of GOP synchronization
int m_iUseVersion2; //!< Switch of H263+
int m_iUseBlock; //!< 0: don't use block. n>0: the blocksize.(should be 32bits aligned)
int m_iUseRC; //!< 0: don't use rate control. n>0: the bitrate(kbps) requiedy
void* m_pCBContext; //!< additional infomation from outside
long (*m_EncoderCallBack)( unsigned char *pData, int len, long tmstamp,
unsigned long type, void* context ); //!< Call back function used to write encoded data to list
}Enc_Option,*P_EncOption;
////////////////////////////////////////////////////////////////////////////
class AFX_EXT_CLASS CH263Encoder
{
public:
CH263Encoder();
virtual ~CH263Encoder();
// BOOL EncInit(Enc_Option option);
BOOL GetOption(Enc_Option &option); //!< Get default options
BOOL EncOpen(Enc_Option &option); //!< Initialize encoder
EncOneFrame(unsigned char *pCapture, unsigned int &nTimeStamp);
int EncControl();
void EncClose(); //!< Close encoder
private:
struct _tagH263VencStatus *m_pEncStatus; //!< Encoder parameters, encoder status, and coding options
struct _tagMCPara *m_pMCStatus; //!< Motion Compensation options
struct _tagputstrm *m_pStream; //!< Bitstream stucture
/*!< the address of global vaiable putbitstmctrl will be assigned
to the member during initializing of CH263Encoder object */
Enc_Option m_EncOption; //!< default encode option
};
#endif // !defined(AFX_H263PENCODE_H__2CD8E329_A31A_46C5_B88D_0738AB868574__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -