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

📄 sesenc.hpp

📁 《Visual C++小波变换技术与工程实践》靳济芳编著的光盘程序。
💻 HPP
📖 第 1 页 / 共 2 页
字号:
		Int** rgiStepB; // quantization stepsize for B-VOP
		Int* rgiNumOfBbetweenPVOP;		// no of B-VOPs between P-VOPs
		Int* rgiNumOfPbetweenIVOP;		// no of P-VOPs between I-VOPs
//added to encode GOV header by SONY 980212
		Int* rgiGOVperiod;
		Bool* rgbDeblockFilterDisable; //deblocking filter disable
		Bool *rgbAllowSkippedPMBs;

		// file information
		Char* pchPrefix; // prefix name of the movie
		Char* pchBmpFiles; // bmp file directory location
		ChromType* rgfChrType; // input chrominance type. 0 - 4:4:4; 1 - 4:2:2; 0 - 4:2:0
		Char* pchOutBmpFiles; // quantized frame file directory
		Char* pchOutStrFiles; // output bitstream file
		Int* rgiTemporalRate; // temporal subsampling rate
		Int* rgiEnhcTemporalRate; // temporal subsampling rate for enhancement layer // added by Sharp (98/02/09)
		
		// statistics dumping options
		Bool* rgbDumpMB;
		Bool* rgbTrace;

		// rounding control
		Bool* rgbRoundingControlDisable; 
		Int* rgiInitialRoundingType; 

		// for sprite info
		UInt* rguiSpriteUsage; // sprite usage
		UInt* rguiWarpingAccuracy; // warping accuracy
		Int* rgNumOfPnts; // number of points for sprite; 0 for stationary and -1 for no sprite
		Char* pchSptDir; // sprite directory
		Char* pchSptPntDir; // sprite point file
        SptMode *pSpriteMode;	// sprite reconstruction mode
		Int iSpatialOption;
		UInt uiFrameWidth_SS;
		UInt uiFrameHeight_SS;
		UInt uiHor_sampling_n;
		UInt uiHor_sampling_m;
		UInt uiVer_sampling_n;
		UInt uiVer_sampling_m;
//OBSS_SAIT_991015
		UInt uiUse_ref_shape;			
		UInt uiUse_ref_texture;			
		UInt uiHor_sampling_n_shape;	
		UInt uiHor_sampling_m_shape;	
		UInt uiVer_sampling_n_shape;	
		UInt uiVer_sampling_m_shape;	
//~OBSS_SAIT_991015
} SessionEncoderArgList;

class CSessionEncoder
{
	friend class CEnhcBufferEncoder;
public:
	// Constructors
	~CSessionEncoder ();
	CSessionEncoder (SessionEncoderArgList *pArgs);

	// Attributes
	UInt compressedSize () const {return m_uCmpSize;} // in bits

	// Operations
	Void encode ();
///////////////// implementation /////////////////

protected:
	CRct m_rctOrg;
	CRct m_rctOrgSpatialEnhn;
	Int m_iFirstFrame;				// first frame number
	Int m_iLastFrame;					// last frame number
	Int m_iNumFrame;					// number of frames
	Int m_iFirstVO;					// first VO index
	Int m_iLastVO;					// last VO index
	Int m_iNumVO;					//  number of VO's

	const Bool* m_rgbSpatialScalability;	//spatial scalability on/off
	UInt** m_rguiRateControl;		// rate control type
	UInt** m_rguiBudget;			// for rate control
	own VOLMode* m_rgvolmd [2];		// VOL modes
	own VOPMode* m_rgvopmd [2];		// VOP modes
	const CVOPU8YUVBA* m_rgpvopcPrevDisp [2];	// pointers to previously displayed vops
	
	// file information
	const Char* m_pchPrefix; // prefix name of the movie
	const Char* m_pchBmpFiles; // bmp file directory location
	const ChromType* m_rgfChrType; // input chrominance type. 0 - 4:4:4, 1 - 4:2:2, 0 - 4:2:0
	const Char* m_pchReconYUVDir; // quantized frame file directory
	const Char* m_pchOutStrFiles; // output bitstream file
	UInt m_uCmpSize; // in bits
	Bool m_bTexturePerVOP; // Bool for whether there are texture data for each VOP
	Bool m_bAlphaPerVOP; // Bool for whether there are alpha data for each VOP

	// for sprite info
	const Char* m_pchSptDir; // sprite directory
	const Char* m_pchSptPntDir; // sprite point file
	const UInt* m_rguiSpriteUsage; // sprite usage
	const UInt* m_rguiWarpingAccuracy; // warping accuracy
	const Int* m_rgNumOfPnts; // number of points for each VOP
	own CSiteD** m_ppstSrc; // source sites, [numVOP] [numPnt]
	own CSiteD*** m_pppstDst; // destination sites, [numVOP] [numFrm] [numPnt]
	// low latency stuff
	SptMode m_SptMode;  // sprite reconstruction mode : 0 -- basic sprite , 1 -- Object piece only, 2 -- Update piece only, 3 -- intermingled	
	CRct m_rctFrame;	// to save the frame rectangle

	Int** m_rgiMVFileUsage;		// MV file usage [iLayer][iObj]
	Char*** m_pchMVFileName;	// MV file names [iLayer][iObj]

	// temporal scalability
	const Int* m_rgiTemporalScalabilityType; // added by Sharp (98/2/12)
	Bool m_bPrevObjectExists;

  Void getInputFiles (FILE*& pfYuvSrc, FILE*& pfAlpSrc, 
                      FILE** ppfAuxSrc, // MAC (SB) 24-Nov-99
                      FILE*& pfYuvSrcSpatialEnhn,
                      FILE*& pfAlpSrcSpatialEnhn,//OBSS_SAIT_991015
                      FILE* rgpfReconYUV [], FILE* rgpfReconSeg [], 
                      FILE** rgpfReconAux [],
                      ofstream* rgpostrm [], ofstream* rgpostrmTrace [],
                      PixelC& pxlcObjColor, Int iobj, const VOLMode& volmd, const VOLMode& volmd_enhn);
	Void initVOEncoder (CVideoObjectEncoder** rgpvoenc, Int iobj, ofstream* rgpostrmTrace []);
	Bool loadDataSpriteCheck(UInt iVOrelative,UInt iFrame, FILE* pfYuvSrc, FILE* pfSegSrc,
                           FILE** ppfAuxSrc,
					                 PixelC pxlcObjColor, CVOPU8YUVBA* pvopcDst, const VOLMode& volmd);

	Bool loadData (UInt iFrame, FILE* pfYuvSrc, FILE* pfSegSrc, 
                 FILE** ppfAuxSrc, PixelC pxlcObjColor, 
					       CVOPU8YUVBA* pvopcDst, CRct& rctOrg,const VOLMode& volmd);
//OBSS_SAIT_991015
	//for load enhancement layer shape
	Bool loadDataSpriteCheck(UInt iVOrelative,UInt iFrame, FILE* pfYuvSrc, FILE* pfSegSrc,
					PixelC pxlcObjColor, CVOPU8YUVBA* pvopcDst, const VOLMode& volmd,const VOLMode& volmd_enhn);
	//for load enhancement layer shape
	Bool loadData (UInt iFrame, FILE* pfYuvSrc, FILE* pfSegSrc, PixelC pxlcObjColor, 
					CVOPU8YUVBA* pvopcDst, CRct& rctOrg,const VOLMode& volmd,const VOLMode& volmd_enhn);
//~OBSS_SAIT_991015
	Void dumpData (FILE* pfYuvDst, FILE* pfSegDst, FILE** ppfAuxDst, Int iLayer,
		const CVOPU8YUVBA* pvopcSrc, const CRct& rctOrg, const VOLMode& volmd, const Bool bInterlace);
	Void dumpDataNonCoded (FILE* pfYUV, FILE* pfSeg, FILE ** ppfAux, Int iLayer, CRct& rct, const VOLMode& volmd);

	Void createReconDir (UInt idx) const;
	Void createCmpDir (UInt idx) const;
	Void encodeVideoObject(	Bool bObjectExists,
							Bool bPrevObjectExists,
							Int iFrame,
							VOPpredType predType,
							Int iDumpMode,
							Int iVO,
							Int iVOrelative,
							Int iLayer,
							FILE* pfYuvSrc,
							FILE* pfSegSrc,
              FILE** ppfAuxSrc,
							FILE* rgpfReconYUV[],
							FILE* rgpfReconSeg[],
              FILE** rgpfReconAux[],
							PixelC pxlcObjColor,
							CVideoObjectEncoder** rgpvoenc,
							const VOLMode& volmd,
							ofstream* rgpostrm[],
							const CVOPU8YUVBA* pvopcBaseQuant = NULL);

// begin: added by Sharp (98/2/12)
	Void updateRefForTPS (CVideoObjectEncoder* pvopc,
		CEnhcBufferEncoder* BufP1, CEnhcBufferEncoder* BufP2, CEnhcBufferEncoder* BufB1, CEnhcBufferEncoder* BufB2, CEnhcBufferEncoder* BufE,
		Int bNoNextVOP, Int iVOrelative, Int iEcount, Int ibFrameWithRate, Int ieFrame, Bool bupdateForLastLoop);
	Void dumpDataOneFrame (UInt iFrame, Int iobj, const CVOPU8YUVBA* pvopcSrc, const VOLMode& volmd);
	Void initVObfShape (CVideoObjectEncoder** rgpvobfShape, Int iobj, 
			    VOLMode& volmd_back, VOPMode& vopmd_back, VOLMode& volmd_forw, VOPMode& vopmd_forw);
	Void encodeEnhanceVideoObject(Bool bObjectExists,
                                  Int iFrame,
                                  VOPpredType predType,
                                  Int iDumpMode,
                                  Int iVO,Int iVOrelative,
                                  FILE* pfYuvSrc,
                                  FILE* pfSegSrc,
                                  FILE* rgpfReconYUV[],
                                  FILE* rgpfReconSeg[],
                                  PixelC pxlcObjColor,
                                  CVideoObjectEncoder* rgpvoenc,
                                  const VOLMode& volmd,
                                  const VOLMode& volmd_enhn,
                                  Int iEnhnFirstFrame,
                                  ofstream* rgpostrm[],
                                  CEnhcBufferEncoder& BufP1,
                                  CEnhcBufferEncoder& BufP2,
                                  CEnhcBufferEncoder& BufB1,
                                  CEnhcBufferEncoder& BufB2,
                                  CEnhcBufferEncoder& BufE
                                  );
// end: added by Sharp (98/2/12)
	// sprite
	Void readPntFile (UInt iobj);
	Void loadSpt (UInt iobj, CVOPU8YUVBA* pvopcDst);
	CRct findBoundBoxInAlpha (UInt ifr, UInt iobj);
	CRct findSptRct (UInt iobj);
};

#endif // __SESENC_HPP_

⌨️ 快捷键说明

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