📄 gopdecoder.h
字号:
PicBufferList& rcUnusedList,
Int& riMaxPoc );
ErrVal xStorePicture ( DPBUnit* pcDPBUnit, // just for checking
PicBufferList& rcOutputList,
PicBufferList& rcUnusedList,
Bool bTreatAsIdr,
UInt uiQualityLevel = 0,
Bool bRef = false); //JVT-T054
ErrVal xCheckMissingPics ( SliceHeader* pcSliceHeader,
PicBufferList& rcOutputList,
PicBufferList& rcUnusedList );
ErrVal xInitPrdListPSlice ( RefFrameList& rcList );
ErrVal xInitPrdListsBSlice ( RefFrameList& rcList0,
RefFrameList& rcList1 );
ErrVal xPrdListRemapping ( RefFrameList& rcList,
ListIdx eListIdx,
SliceHeader* pcSliceHeader );
ErrVal xUpdateDPBUnitList ( DPBUnit *pcDPBUNit ); //JVT-T054
//===== debugging ======
ErrVal xDumpDPB ();
ErrVal xDumpRefList ( ListIdx eListIdx,
RefFrameList& rcList );
private:
Bool m_bInitDone;
YuvBufferCtrl* m_pcYuvBufferCtrl;
UInt m_uiLayer;
UInt m_uiNumRefFrames;
UInt m_uiMaxFrameNum;
UInt m_uiLastRefFrameNum;
DPBUnitList m_cUsedDPBUnitList;
DPBUnitList m_cFreeDPBUnitList;
DPBUnit* m_pcCurrDPBUnit;
PicBufferList m_cPicBufferList;
};
class H264AVCDECODERLIB_API MCTFDecoder
{
enum
{
NUM_TMP_FRAMES = 5 // JVT-Q054 Red. Picture
// NUM_TMP_FRAMES = 3 // Hanke@RWTH
};
enum NextNalType
{
ALL = 0x00,
LOW_PASS = 0x01,
LOW_PASS_IDR = 0x02
};
public:
//TMM_EC {{
ErrVal getECMethod( SliceHeader *rpcSliceHeader, ERROR_CONCEAL &m_eErrorConceal);
UInt m_bBaseLayerLost;
SliceHeader *m_pcVeryFirstSliceHeader;
FrameMng *m_pcFrameMng;
ERROR_CONCEAL m_eErrorConcealTemp;
UInt m_uiDecompositionStages;
UInt m_uiDecompositionStagesBase;
ERROR_CONCEAL m_eErrorConceal;
//TMM_EC }}
protected:
MCTFDecoder ();
virtual ~MCTFDecoder();
public:
//===== general functions ======
static ErrVal create ( MCTFDecoder*& rpcMCTFDecoder );
ErrVal destroy ();
ErrVal init ( H264AVCDecoder* pcH264AVCDecoder,
SliceReader* pcSliceReader,
SliceDecoder* pcSliceDecoder,
RQFGSDecoder* pcRQFGSDecoder,
NalUnitParser* pcNalUnitParser,
ControlMngIf* pcControlMng,
LoopFilter* pcLoopFilter,
HeaderSymbolReadIf* pcHeaderSymbolReadIf,
ParameterSetMng* pcParameterSetMng,
PocCalculator* pcPocCalculator,
YuvBufferCtrl* pcYuvFullPelBufferCtrl,
DecodedPicBuffer* pcDecodedPictureBuffer,
MotionCompensation* pcMotionCompensation,
QuarterPelFilter* pcQuarterPelFilter );
ErrVal uninit ();
ErrVal initSlice0 ( SliceHeader* pcSliceHeader );
ErrVal initSlice ( SliceHeader* pcSliceHeader,
UInt uiLastLayer,
Bool bLastNalInAU,
Bool bCGSSNRInAU); //JVT-T054
ErrVal StoreDecodedPicture( FrameUnit* pcFrameUnit,
PicBuffer*& rpcPicBuffer,
SliceHeader* pcSliceHeader,
PicBufferList& rcOutputList,
PicBufferList& rcUnusedList,
IntFrame* pcBaseRep = 0); //JVT-T054
ErrVal process ( SliceHeader*& rpcSliceHeader,
PicBuffer* pcPicBuffer,
PicBufferList& rcPicBufferOutputList,
PicBufferList& rcPicBufferUnusedList,
Bool bReconstructionLayer );
ErrVal finishProcess ( PicBufferList& rcPicBufferOutputList,
PicBufferList& rcPicBufferUnusedList,
Int& riMaxPoc );
Bool isActive () { return m_bActive; }
UInt getFrameWidth () { return m_uiFrameWidthInMb*16; }
UInt getFrameHeight () { return m_uiFrameHeightInMb*16; }
ErrVal getBaseLayerData ( IntFrame*& pcFrame,
IntFrame*& pcResidual,
MbDataCtrl*& pcMbDataCtrl,
MbDataCtrl*& pcMbDataCtrlEL,
Bool& rbConstrainedIPred,
Bool bSpatialScalability,
Int iPoc );
ErrVal getBaseLayerPWTable ( SliceHeader::PredWeightTable*& rpcPredWeightTable,
ListIdx eListIdx,
Int iPoc );
Void setQualityLevelForPrediction ( UInt ui ) { m_uiQualityLevelForPrediction = ui; }
PocCalculator* getPocCalculator () { return m_pcPocCalculator; }
//JVT-T054{
Void setResizeParametersCGSSNR ( UInt ui, ResizeParameters* params ) { m_pcResizeParameterCGSSNR[ui] = params; }
ResizeParameters* getResizeParametersCGSSNR (UInt ui) { return m_pcResizeParameterCGSSNR[ui]; }
//JVT-T054}
// TMM_ESS {
Void setResizeParameters ( ResizeParameters* params ) { m_pcResizeParameter = params; }
ResizeParameters* getResizeParameters () { return m_pcResizeParameter; }
Int getSpatialScalabilityType() { return m_pcResizeParameter->m_iSpatialScalabilityType; }
// TMM_ESS }
Void setWaitForIdr(Bool b) { m_bWaitForIdr = b;}
Bool getWaitForIdr() { return m_bWaitForIdr;}
ErrVal setDiffPrdRefLists ( RefFrameList& diffPrdRefList,
YuvBufferCtrl* pcYuvFullPelBufferCtrl);
ErrVal freeDiffPrdRefLists ( RefFrameList& diffPrdRefList);
//JVT-T054{
Void setAVCBased(Bool b) { m_bAVCBased = b;}
Bool getAVCBased() { return m_bAVCBased;}
ErrVal setILPrediction(IntFrame * pcFrame);
ErrVal ReconstructLastFGS ( Bool bHighestLayer, Bool bCGSSNRInAU );
DPBUnit* getLastDPBUnit() { return m_pcDecodedPictureBuffer->getLastUnit();}
RQFGSDecoder* getRQFGSDecoder() { return m_pcRQFGSDecoder; }
Void setRQFGSDecoder(RQFGSDecoder* pcRQFGSDecoder) { m_pcRQFGSDecoder = pcRQFGSDecoder;}
IntFrame* getPredSignal() {return m_pcPredSignal;}
//JVT-T054}
protected:
//===== create and initialize data arrays =====
ErrVal xCreateData ( const SequenceParameterSet& rcSPS );
ErrVal xDeleteData ();
ErrVal xZeroIntraMacroblocks ( IntFrame* pcFrame,
ControlData& rcCtrlData );
ErrVal xAddBaseLayerResidual ( ControlData& rcControlData,
IntFrame* pcFrame );
//TMM_EC
ErrVal xInitBaseLayer ( ControlData& rcControlData,
SliceHeader *&rcSliceHeaderBase);
ErrVal xInitESSandCroppingWindow ( SliceHeader& rcSliceHeader,
MbDataCtrl& rcMbDataCtrl );
ErrVal xInitESSandCroppingWindowCGSSNR ( SliceHeader& rcSliceHeader,
MbDataCtrl& rcMbDataCtrl ); //JVT-T054
//===== decode pictures / subbands =====
ErrVal xDecodeSuffixUnit ( SliceHeader*& rpcSliceHeader,
PicBuffer*& rpcPicBuffer,
PicBufferList& rcOutputList,
PicBufferList& rcUnusedList,
Bool bReconstructionLayer ); //JVT-S036 lsj
ErrVal xDecodeBaseRepresentation ( SliceHeader*& rpcSliceHeader,
PicBuffer*& rpcPicBuffer,
PicBufferList& rcOutputList,
PicBufferList& rcUnusedList,
Bool bReconstructionLayer );
ErrVal xDecodeFGSRefinement ( SliceHeader*& rpcSliceHeader );
ErrVal xReconstructLastFGS ( Bool bHighestLayer, Bool bCGSSNRInAU ); //JVT-T054
ErrVal xMotionCompensation ( IntFrame* pcMCFrame,
RefFrameList& rcRefFrameList0,
RefFrameList& rcRefFrameList1,
MbDataCtrl* pcMbDataCtrl,
SliceHeader& rcSH );
ErrVal xFixMCPrediction ( IntFrame* pcMCFrame,
ControlData& rcControlData );
Bool isPictureDecComplete(SliceHeader* rpcSliceHeader);
const Bool isNewPictureStart(SliceHeader* rpcSliceHeader);
ErrVal InitWhenNewPictureStart(SliceHeader* pcSliceHeader, MbDataCtrl* pcMbDataCtrl);
protected:
//----- references -----
H264AVCDecoder* m_pcH264AVCDecoder;
SliceReader* m_pcSliceReader;
SliceDecoder* m_pcSliceDecoder;
RQFGSDecoder* m_pcRQFGSDecoder;
NalUnitParser* m_pcNalUnitParser;
ControlMngIf* m_pcControlMng;
LoopFilter* m_pcLoopFilter;
HeaderSymbolReadIf* m_pcHeaderSymbolReadIf;
ParameterSetMng* m_pcParameterSetMng;
PocCalculator* m_pcPocCalculator;
YuvBufferCtrl* m_pcYuvFullPelBufferCtrl;
DecodedPicBuffer* m_pcDecodedPictureBuffer;
MotionCompensation* m_pcMotionCompensation;
QuarterPelFilter* m_pcQuarterPelFilter;
DownConvert m_cDownConvert;
//----- general parameters -----
Bool m_bInitDone;
Bool m_bCreateDone;
Bool m_bWaitForIdr;
Bool m_bReconstructAll;
UInt m_uiFrameWidthInMb;
UInt m_uiFrameHeightInMb;
UInt m_uiMbNumber;
Bool m_bActive;
UInt m_uiLayerId;
//----- frame memories and control data -----
IntFrame* m_apcFrameTemp [NUM_TMP_FRAMES];
IntFrame* m_pcResidual;
IntFrame* m_pcILPrediction;
IntFrame* m_pcPredSignal;
IntFrame* m_pcBaseLayerFrame;
IntFrame* m_pcBaseLayerResidual;
MbDataCtrl* m_pcBaseLayerCtrl;
DPBUnit* m_pcCurrDPBUnit;
MbDataCtrl* m_pcBaseLayerCtrlEL;
UInt m_uiNumLayers[2];
//JVT-T054{
Bool m_bAVCBased;
ResizeParameters* m_pcResizeParameterCGSSNR[MAX_FGS_LAYERS];
//JVT-T054}
// TMM_ESS
ResizeParameters* m_pcResizeParameter;
// should this layer be decoded at all, and up to which FGS layer should be decoded
Int m_uiQualityLevelForPrediction;
// ROI DECODE ICU/ETRI
Int m_iMbProcessed;
Bool m_bIsNewPic;
};
H264AVC_NAMESPACE_END
#endif // !defined(AFX_GOPDECODER_H__339878FC_BA98_4ABE_8530_E1676196576F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -