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

📄 vopsedec.hpp

📁 完整的RTP RTSP代码库
💻 HPP
📖 第 1 页 / 共 2 页
字号:
/*************************************************************************This software module was originally developed by 	Ming-Chieh Lee (mingcl@microsoft.com), Microsoft Corporation	Wei-ge Chen (wchen@microsoft.com), Microsoft Corporation	Bruce Lin (blin@microsoft.com), Microsoft Corporation	Chuang Gu (chuanggu@microsoft.com), Microsoft Corporation	(date: March, 1996)and edited by	Yoshihiro Kikuchi (TOSHIBA CORPORATION)	Takeshi Nagai (TOSHIBA CORPORATION)	Toshiaki Watanabe (TOSHIBA CORPORATION)	Noboru Yamaguchi (TOSHIBA CORPORATION)and also edited by	Dick van Smirren (D.vanSmirren@research.kpn.com), KPN Research	Cor Quist (C.P.Quist@research.kpn.com), KPN Research	(date: July, 1998)and also edited by    Fujitsu Laboratories Ltd. (contact: Eishi Morimatsu)and also edited by 	Takefumi Nagumo (nagumo@av.crl.sony.co.jp), Sony Corporation    Sehoon Son (shson@unitel.co.kr) Samsung AITin the course of development of the MPEG-4 Video (ISO/IEC 14496-2). This software module is an implementation of a part of one or more MPEG-4 Video tools as specified by the MPEG-4 Video. ISO/IEC gives users of the MPEG-4 Video free license to this software module or modifications thereof for use in hardware or software products claiming conformance to the MPEG-4 Video. Those intending to use this software module in hardware or software products are advised that its use may infringe existing patents. The original developer of this software module and his/her company, the subsequent editors and their companies, and ISO/IEC have no liability for use of this software module or modifications thereof in an implementation. Copyright is not released for non MPEG-4 Video conforming products. Microsoft retains full right to use the code for his/her own purpose, assign or donate the code to a third party and to inhibit third parties from using the code for non <MPEG standard> conforming products. This copyright notice must be included in all copies or derivative works. Copyright (c) 1996, 1997.Module Name:	vopSeDec.hppAbstract:	Decoder for one Video Object.Revision History:	09-30-97: merge error resilient changes from Toshiba by wchen@microsoft.com	11-30-97: added Spatial tools by Takefumi Nagumo(nagumo@av.crl.sony.co.jp) SONY corporation	12-20-97: Interlaced tools added by NextLevel Systems        X. Chen (xchen@nlvl.com), B. Eifrig (beifrig@nlvl.com)	Sep.06	1999 : RRV added by Eishi Morimatsu (Fujitsu Laboratories Ltd.) 	Feb.01	2000 : Bug fixed OBSS by Takefumi Nagumo (Sony)	May.25  2000 : MB stuffing decoding on the last MB by Hideaki Kimata (NTT)*************************************************************************/#ifndef __VOPSEDEC_HPP_ #define __VOPSEDEC_HPP_class CVideoObject;class ifstream;class strstreambuf;class CInBitStream;class CEntropyDecoderSet;class CEntropyDecoder;class CVOPU8YUVBA;class CEnhcBufferDecoder;class idct; // yrchen 10.21.2003// HHI Schueuer:  scan selection classes to support the sadctclass CInvScanSelector {public:	virtual ~CInvScanSelector() {}	//virtual const Int *select(const Int *scan, const Int *piCoeffWidths) { return scan; } 	// Stefan Rauthenberg: <rauthenberg@HHI.DE> from the semantic point of view I'd prefer a return value of const Int* but 	// this would cause conflicts with methods like decodeIntraTCOEF. 	virtual Int *select(Int *scan, Bool bIsBoundary, Int iBlk) { return scan; } };class CInvScanSelectorForSADCT: public CInvScanSelector {public:	CInvScanSelectorForSADCT(Int **rgiCurrMBCoeffWidth); 	virtual ~CInvScanSelectorForSADCT();	virtual Int *select(Int *scan, Bool bIsBoundary, Int iBlk);private:	Int **m_rgiCurrMBCoeffWidth;	Int *m_adaptedScan;};// End HHI class CVideoObjectDecoder : public CVideoObject{	friend class CVideoObjectDecoderTPS; ///// 97/12/22	friend class CEnhcBufferDecoder;public:	// Constructors	~CVideoObjectDecoder ();	CVideoObjectDecoder (void);	CVideoObjectDecoder ( 		const Char* pchStrFile, // bitstream file		Int iDisplayWidth, Int iDisplayHeight,		Bool *pbSpatialScalability = NULL,		Bool *p_short_video_header=FALSE //,		//strstreambuf* pistrm = NULL	);        CVideoObjectDecoder (	// for back/forward shape		int iDisplayWidth, int iDisplayHeight	);       Void SetUpBitstreamBuffer(unsigned char *bptr,                                 uint32_t blen) {         m_pbitstrmIn->set_buffer(bptr, blen);       };       int get_used_bytes(void) { return m_pbitstrmIn->get_used_bytes(); };       Void FakeOutVOVOLHead(int h, int w, int fr, Bool *pbSpatialScalability);       void postVO_VOLHeadInit(Int iDisplayWidth, Int iDisplayHeight,Bool *pbSpatialScalability);       // Operations       Int decode (const CVOPU8YUVBA* pvopcBVOPQuant = NULL, /* strstreambuf* pistrm = NULL, */ Bool waitForI = FALSE, Bool drop = FALSE);	Int ReadNextVopPredType ();  //for Spatial Scalable Coding	Int h263_decode(bool first_time); // [FDS]	Void decodeInitSprite ();	Void decodeSpritePieces ();	Int decodeOneSpritePiece ();	CRct decodeVOSHead ();	SptXmitMode m_oldSptXmitMode ;///////////////// implementation ////////////////////// 97/12/22 startpublic:	CVideoObjectDecoder* rgpbfShape [2]; // 0 : backward, 1: forward///// 97/12/22 end// Added by KPN for short headers	UInt video_plane_with_short_header();	void gob_layer();	void decodeShortHeaderIntraMBDC(Int *rgiCoefQ);	Bool checkGOBMarker(); // added by swinder	Void skipAnyStuffing(); // added by swinder//Added by KPN for short headers - END//protected:public:	own int m_pistrm;	CInBitStream* m_pbitstrmIn;		//bitstream	own CEntropyDecoderSet* m_pentrdecSet;	//huffman decoder set							  //used for video packet header decoding by Toshiba							  //they are basically cached values of not update after the header decoding	Time m_tOldModuloBaseDisp;			  //of the most recently displayed I/Pvop	Time m_tOldModuloBaseDecd;			  //of the most recently decoded I/Pvop	// buffer data	CVOPU8YUVBA* m_pvopcRightMB;	PixelC *m_ppxlcRightMBBY, *m_ppxlcRightMBBUV;	// buffers for temporal scalability	Added by Sharp(1998-02-10)	CEnhcBufferDecoder* m_pBuffP1;	CEnhcBufferDecoder* m_pBuffP2;	CEnhcBufferDecoder* m_pBuffB1;	CEnhcBufferDecoder* m_pBuffB2;	CEnhcBufferDecoder* m_pBuffE;	int m_coded;	// buffers for temporal scalability	End	 Sharp(1998-02-10)	// Added for short headers by KPN (1998-02-07, DS)	Bool short_video_header;	UInt uiPei; // [FDS]	UInt uiGobNumber;	UInt uiNumGobsInVop;	UInt uiNumMacroblocksInGob;	UInt uiGobHeaderEmpty;	// Added for short headers by KPN - END	int m_iClockRateScale; // added by Sharp (98/6/26) 	//	Added for error resilience mode By Toshiba(1998-1-16:DP+RVLC) 	Int* m_piMCBPC; 	Int* m_piIntraDC; 	//	End Toshiba(1998-1-16:DP+RVLC)	// HHI Schueuer	CInvScanSelector *m_pscanSelector;	// end HHI	// error handling	Void errorInBitstream (Char* rgchErorrMsg);	Int findStartCode(int dontloop = 0);	Int decodeVSHead (); // visual sequence, visual object layers	// VO and VOL routines	Void decodeVOHead ();	Void decodeVOLHead ();  Void decodeVOLBody();	// VOP routines	Bool decodeVOPHead ();	Void decodeVOP ();	Void decodeIVOP ();	Void decodePVOP ();	Void decodeBVOP ();	Void decodeIVOP_WithShape ();	Void decodePVOP_WithShape ();	Void decodeBVOP_WithShape ();//	Void computeMVInfo (); 	//	Added for error resilience mode By Toshiba(1998-1-16:DP+RVLC) 	Void decodeIVOP_DataPartitioning (); 	Void decodePVOP_DataPartitioning ();	Void decodeIVOP_WithShape_DataPartitioning ();	Void decodePVOP_WithShape_DataPartitioning (); 	//	End Toshiba(1998-1-16:DP+RVLC)	// MB routines	: texture and overhead	// I-VOP	Void decodeMBTextureHeadOfIVOP (CMBMode* pmbmd, Int& iCurrQP, Bool *pbUseNewQPForVlcThr);	Void decodeTextureIntraMB (CMBMode* pmbmd, CoordI iMBX, CoordI iMBY, 			PixelC* ppxlcCurrFrmQY, PixelC* ppxlcCurrFrmQU, PixelC* ppxlcCurrFrmQV,			const PixelC *ppxlcCurrMBBY = NULL, const PixelC *ppxlcCurrMBBUV = NULL); // HHI Schueuer	Void decodeMBAlphaHeadOfIVOP (CMBMode* pmbmd, Int iCurrQP, Int iCurrQPA, Int iVopQP, Int iVopQPA, Int iAuxComp);	Void decodeAlphaIntraMB (CMBMode* pmbmd, Int iMBX, Int iMBY, PixelC* ppxlcRefMBA, Int iAuxComp, const PixelC *ppxlcCurrMBBY = NULL); // HHI Schueuer: const PixelC *ppxlcCurrMBBY added				// P-VOP	Void decodeMBTextureHeadOfPVOP (CMBMode* pmbmd, Int& iCurrQP, Bool *pbUseNewQPForVlcThr);	Void decodeMBAlphaHeadOfPVOP (CMBMode* pmbmd, Int iCurrQP, Int iCurrQPA, Int iAuxComp);	Void decodeTextureInterMB (CMBMode* pmbmd, const PixelC *ppxlcCurrMBBY = NULL, const PixelC *ppxlcCurrMBBUV = NULL);//HHI Schueuer:const PixelC *ppxlcCurrMBBY, const PixelC *ppxlcCurrMBBUV	Void decodeAlphaInterMB (CMBMode* pmbmd, PixelC *ppxlcRefMBA, Int iAuxComp, const PixelC *ppxlcCurrMBBY = NULL); // HHI Schueuer: const PixelC *ppxlcCurrMBBY added			// B-VOP

⌨️ 快捷键说明

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