Changeset 916 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibCommon/TComPrediction.h
- Timestamp:
- 12 Nov 2014, 08:09:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/Lib/TLibCommon/TComPrediction.h
r849 r916 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 48 48 #include "TComWeightPrediction.h" 49 49 50 class TComTU; // forward declaration 51 50 52 #if SVC_EXTENSION 51 53 #include "TComUpsampleFilter.h" … … 59 61 60 62 /// prediction class 63 typedef enum PRED_BUF_E 64 { 65 PRED_BUF_UNFILTERED=0, 66 PRED_BUF_FILTERED=1, 67 NUM_PRED_BUF=2 68 } PRED_BUF; 69 70 static const UInt MAX_INTRA_FILTER_DEPTHS=5; 71 61 72 class TComPrediction : public TComWeightPrediction 62 73 { 74 private: 75 static const UChar m_aucIntraFilter[MAX_NUM_CHANNEL_TYPE][MAX_INTRA_FILTER_DEPTHS]; 76 63 77 protected: 64 Int* m_piYuvExt; 65 Int m_iYuvExtStride; 66 Int m_iYuvExtHeight; 67 68 TComYuv m_acYuvPred[2]; 78 Pel* m_piYuvExt[MAX_NUM_COMPONENT][NUM_PRED_BUF]; 79 Int m_iYuvExtSize; 80 81 TComYuv m_acYuvPred[NUM_REF_PIC_LIST_01]; 69 82 TComYuv m_cYuvPredTemp; 70 TComYuv m_filteredBlock[ 4][4];71 TComYuv m_filteredBlockTmp[ 4];72 83 TComYuv m_filteredBlock[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS]; 84 TComYuv m_filteredBlockTmp[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS]; 85 73 86 TComInterpolationFilter m_if; 74 87 75 Pel* m_pLumaRecBuffer; ///< array for downsampled reconstructed luma sample 88 Pel* m_pLumaRecBuffer; ///< array for downsampled reconstructed luma sample 76 89 Int m_iLumaRecStride; ///< stride of #m_pLumaRecBuffer array 77 90 78 Void xPredIntraAng ( Int bitDepth, Int* pSrc, Int srcStride, Pel*& rpDst, Int dstStride, UInt width, UInt height, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, Bool bFilter);79 Void xPredIntraPlanar ( Int* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height );80 91 Void xPredIntraAng ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, ChromaFormat format, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, const Bool bEnableEdgeFilters ); 92 Void xPredIntraPlanar ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height, ChannelType channelType, ChromaFormat format ); 93 81 94 // motion compensation functions 82 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false ); 83 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred ); 84 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 85 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 86 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 87 88 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 95 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv* pcYuvPred, Bool bi=false ); 96 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv* pcYuvPred ); 97 Void xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi ); 98 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv* pcYuvDst ); 89 99 90 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); 100 Void xGetLLSPrediction ( const Pel* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0, const ChromaFormat chFmt DEBUG_STRING_FN_DECLARE(sDebug) ); 101 102 Void xDCPredFiltering( const Pel* pSrc, Int iSrcStride, Pel* pDst, Int iDstStride, Int iWidth, Int iHeight, ChannelType channelType ); 91 103 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); 92 104 Void destroy(); 105 93 106 #if SVC_EXTENSION 94 107 TComUpsampleFilter m_cUsf; … … 98 111 TComPrediction(); 99 112 virtual ~TComPrediction(); 100 101 Void initTempBuff(); 113 114 Void initTempBuff(ChromaFormat chromaFormatIDC); 115 116 ChromaFormat getChromaFormat() const { return m_cYuvPredTemp.getChromaFormat(); } 102 117 103 118 // inter 104 119 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 105 120 106 121 // motion vector prediction 107 122 Void getMvPredAMVP ( TComDataCU* pcCU, UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, TComMv& rcMvPred ); 108 123 109 124 // Angular Intra 110 Void predIntraLumaAng ( TComPattern* pcTComPattern, UInt uiDirMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft ); 111 Void predIntraChromaAng ( Int* piSrc, UInt uiDirMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft ); 112 113 Pel predIntraGetPredValDC ( Int* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ); 114 115 Int* getPredicBuf() { return m_piYuvExt; } 116 Int getPredicBufWidth() { return m_iYuvExtStride; } 117 Int getPredicBufHeight() { return m_iYuvExtHeight; } 125 Void predIntraAng ( const ComponentID compID, UInt uiDirMode, Pel *piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM = false ); 126 127 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, ChannelType channelType, ChromaFormat format, Bool bAbove, Bool bLeft ); 128 129 Pel* getPredictorPtr ( const ComponentID compID, const Bool bUseFilteredPredictions ) 130 { 131 return m_piYuvExt[compID][bUseFilteredPredictions?PRED_BUF_FILTERED:PRED_BUF_UNFILTERED]; 132 } 133 134 // This function is actually still in TComPattern.cpp 135 /// set parameters from CU data for accessing ADI data 136 Void initAdiPatternChType ( TComTU &rTu, 137 Bool& bAbove, 138 Bool& bLeft, 139 const ComponentID compID, const Bool bFilterRefSamples 140 DEBUG_STRING_FN_DECLARE(sDebug) 141 ); 142 143 static Bool filteringIntraReferenceSamples(const ComponentID compID, UInt uiDirMode, UInt uiTuChWidth, UInt uiTuChHeight, const ChromaFormat chFmt, const Bool intraReferenceSmoothingDisabled); 144 145 static Bool UseDPCMForFirstPassIntraEstimation(TComTU &rTu, const UInt uiDirMode); 118 146 119 147 #if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.