| 1 | |
|---|
| 2 | |
|---|
| 3 | /** \file TComResidualGenerator.h |
|---|
| 4 | \brief residual picture generator class (header) |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | #ifndef __TCOM_RESIDUAL_GENERATOR__ |
|---|
| 9 | #define __TCOM_RESIDUAL_GENERATOR__ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | #include "CommonDef.h" |
|---|
| 13 | #include "TComPic.h" |
|---|
| 14 | #include "TComSlice.h" |
|---|
| 15 | #include "TComDepthMapGenerator.h" |
|---|
| 16 | #include "TComTrQuant.h" |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | class TComResidualGenerator |
|---|
| 21 | { |
|---|
| 22 | enum { NUM_TMP_YUV_BUFFERS = 3 }; |
|---|
| 23 | |
|---|
| 24 | public: |
|---|
| 25 | TComResidualGenerator (); |
|---|
| 26 | ~TComResidualGenerator(); |
|---|
| 27 | |
|---|
| 28 | Void create ( Bool bDecoder, UInt uiPicWidth, UInt uiPicHeight, UInt uiMaxCUDepth, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiOrgBitDepth ); |
|---|
| 29 | Void destroy (); |
|---|
| 30 | |
|---|
| 31 | Void init ( TComTrQuant* pcTrQuant, TComDepthMapGenerator* pcDepthMapGenerator ); |
|---|
| 32 | Void uninit (); |
|---|
| 33 | |
|---|
| 34 | Void initViewComponent ( TComPic* pcPic ); |
|---|
| 35 | Void setRecResidualPic ( TComPic* pcPic ); |
|---|
| 36 | |
|---|
| 37 | Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv ); |
|---|
| 38 | Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ); |
|---|
| 39 | |
|---|
| 40 | private: |
|---|
| 41 | Void xSetRecResidualPic ( TComPic* pcPic ); |
|---|
| 42 | Void xSetRecResidualCU ( TComDataCU* pcCU, UInt uiDepth, UInt uiAbsPartIdx ); |
|---|
| 43 | Void xSetRecResidualIntraCU( TComDataCU* pcCU, TComYuv* pcCUResidual ); |
|---|
| 44 | Void xSetRecResidualInterCU( TComDataCU* pcCU, TComYuv* pcCUResidual ); |
|---|
| 45 | Void xClearIntViewResidual ( TComDataCU* pcCU, TComYuv* pcCUResidual, UInt uiPartIdx ); |
|---|
| 46 | Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); |
|---|
| 47 | |
|---|
| 48 | Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ); |
|---|
| 49 | Bool xIsNonZero ( TComYuv* pcYuv, UInt uiBlkWidth, UInt uiBlkHeight ); |
|---|
| 50 | |
|---|
| 51 | Void xDumpResidual ( TComPic* pcPic, char* pFilenameBase ); |
|---|
| 52 | |
|---|
| 53 | private: |
|---|
| 54 | // general parameters |
|---|
| 55 | Bool m_bCreated; |
|---|
| 56 | Bool m_bInit; |
|---|
| 57 | Bool m_bDecoder; |
|---|
| 58 | TComTrQuant* m_pcTrQuant; |
|---|
| 59 | TComDepthMapGenerator* m_pcDepthMapGenerator; |
|---|
| 60 | TComSPSAccess* m_pcSPSAccess; |
|---|
| 61 | TComAUPicAccess* m_pcAUPicAccess; |
|---|
| 62 | UInt m_uiMaxDepth; |
|---|
| 63 | UInt m_uiOrgDepthBitDepth; |
|---|
| 64 | TComYuv** m_ppcYuvTmp; |
|---|
| 65 | TComYuv** m_ppcYuv; |
|---|
| 66 | TComDataCU** m_ppcCU; |
|---|
| 67 | TComPicYuv m_cTmpPic; |
|---|
| 68 | }; |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | #endif // __TCOM_RESIDUAL_GENERATOR__ |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | |
|---|