Changeset 1307 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 21 Jul 2015, 01:21:46 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1296 r1307 740 740 // -------------------------------------------------------------------------------------------------------------------- 741 741 742 Void TComDataCU::copySubCU( TComDataCU* pcCU, UInt uiAbsPartIdx , UInt uiDepth)742 Void TComDataCU::copySubCU( TComDataCU* pcCU, UInt uiAbsPartIdx ) 743 743 { 744 744 UInt uiPart = uiAbsPartIdx; -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1296 r1307 194 194 Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth ); 195 195 196 Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx , UInt uiDepth);196 Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx ); 197 197 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList ); 198 198 Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1305 r1307 49 49 50 50 /// padding of unavailable reference samples for intra prediction 51 #if O0043_BEST_EFFORT_DECODING 52 Void fillReferenceSamples( const Int bitDepth, const Int bitDepthDelta, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags, 53 #else 54 Void fillReferenceSamples( const Int bitDepth, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags, 55 #endif 56 const Int iNumIntraNeighbor, const Int unitWidth, const Int unitHeight, const Int iAboveUnits, const Int iLeftUnits, 57 const UInt uiCuWidth, const UInt uiCuHeight, const UInt uiWidth, const UInt uiHeight, const Int iPicStride, 58 const ChannelType chType, const ChromaFormat chFmt ); 51 Void fillReferenceSamples( const Int bitDepth, 52 #if O0043_BEST_EFFORT_DECODING 53 const Int bitDepthDelta, 54 #endif 55 const Pel* piRoiOrigin, 56 Pel* piAdiTemp, 57 const Bool* bNeighborFlags, 58 const Int iNumIntraNeighbor, 59 const Int unitWidth, 60 const Int unitHeight, 61 const Int iAboveUnits, 62 const Int iLeftUnits, 63 const UInt uiWidth, 64 const UInt uiHeight, 65 const Int iPicStride ); 59 66 60 67 /// constrained intra prediction … … 152 159 bLeft = true; 153 160 154 const ChromaFormat chFmt = rTu.GetChromaFormat();155 161 const UInt uiROIWidth = uiTuWidth2+1; 156 162 const UInt uiROIHeight = uiTuHeight2+1; … … 167 173 #if O0043_BEST_EFFORT_DECODING 168 174 const Int bitDepthForChannelInStream = sps.getStreamBitDepth(chType); 169 fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,175 fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, 170 176 #else 171 fillReferenceSamples (bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits, 172 #endif 173 uiTuWidth, uiTuHeight, uiROIWidth, uiROIHeight, iPicStride, toChannelType(compID), chFmt); 177 fillReferenceSamples (bitDepthForChannel, 178 #endif 179 piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits, 180 uiROIWidth, uiROIHeight, iPicStride); 174 181 175 182 … … 320 327 } 321 328 322 #if O0043_BEST_EFFORT_DECODING 323 Void fillReferenceSamples( const Int bitDepth, const Int bitDepthDelta, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags, 324 #else 325 Void fillReferenceSamples( const Int bitDepth, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags, 326 #endif 327 const Int iNumIntraNeighbor, const Int unitWidth, const Int unitHeight, const Int iAboveUnits, const Int iLeftUnits, 328 const UInt uiCuWidth, const UInt uiCuHeight, const UInt uiWidth, const UInt uiHeight, const Int iPicStride, 329 const ChannelType chType, const ChromaFormat chFmt ) 329 Void fillReferenceSamples( const Int bitDepth, 330 #if O0043_BEST_EFFORT_DECODING 331 const Int bitDepthDelta, 332 #endif 333 const Pel* piRoiOrigin, 334 Pel* piAdiTemp, 335 const Bool* bNeighborFlags, 336 const Int iNumIntraNeighbor, 337 const Int unitWidth, 338 const Int unitHeight, 339 const Int iAboveUnits, 340 const Int iLeftUnits, 341 const UInt uiWidth, 342 const UInt uiHeight, 343 const Int iPicStride ) 330 344 { 331 345 const Pel* piRoiTemp; -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r1305 r1307 181 181 // Function for calculating DC value of the reference samples used in Intra prediction 182 182 //NOTE: Bit-Limit - 25-bit source 183 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, ChannelType channelType, ChromaFormat format,Bool bAbove, Bool bLeft )183 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ) 184 184 { 185 185 assert(iWidth > 0 && iHeight > 0); … … 251 251 const Pel* pSrc, Int srcStride, 252 252 Pel* pTrueDst, Int dstStrideTrue, 253 UInt uiWidth, UInt uiHeight, ChannelType channelType, ChromaFormat format,253 UInt uiWidth, UInt uiHeight, ChannelType channelType, 254 254 UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable 255 255 , const Bool bEnableEdgeFilters … … 266 266 if (modeDC) 267 267 { 268 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, channelType, format,blkAboveAvailable, blkLeftAvailable);268 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, blkAboveAvailable, blkLeftAvailable); 269 269 270 270 for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue) … … 412 412 Void TComPrediction::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 ) 413 413 { 414 const ChromaFormat format = rTu.GetChromaFormat();415 414 const ChannelType channelType = toChannelType(compID); 416 415 const TComRectangle &rect = rTu.getRect(isLuma(compID) ? COMPONENT_Y : COMPONENT_Cb); … … 472 471 if ( uiDirMode == PLANAR_IDX ) 473 472 { 474 xPredIntraPlanar( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight , channelType, format);473 xPredIntraPlanar( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight ); 475 474 } 476 475 else … … 489 488 #endif 490 489 #endif 491 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, format,uiDirMode, bAbove, bLeft, enableEdgeFilters );490 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft, enableEdgeFilters ); 492 491 493 492 if(( uiDirMode == DC_IDX ) && bAbove && bLeft ) … … 787 786 */ 788 787 //NOTE: Bit-Limit - 24-bit source 789 Void TComPrediction::xPredIntraPlanar( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height , ChannelType channelType, ChromaFormat format)788 Void TComPrediction::xPredIntraPlanar( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height ) 790 789 { 791 790 assert(width <= height); -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.h
r1287 r1307 88 88 Int m_iLumaRecStride; ///< stride of #m_pLumaRecBuffer array 89 89 90 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 );91 Void xPredIntraPlanar ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height , ChannelType channelType, ChromaFormat format);90 Void xPredIntraAng ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, const Bool bEnableEdgeFilters ); 91 Void xPredIntraPlanar ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height ); 92 92 93 93 // motion compensation functions … … 124 124 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 ); 125 125 126 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, ChannelType channelType, ChromaFormat format,Bool bAbove, Bool bLeft );126 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ); 127 127 128 128 Pel* getPredictorPtr ( const ComponentID compID, const Bool bUseFilteredPredictions ) -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1305 r1307 993 993 994 994 // To minimize the distortion only. No rate is considered. 995 Void TComTrQuant::signBitHidingHDQ( const ComponentID compID,TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange )995 Void TComTrQuant::signBitHidingHDQ( TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange ) 996 996 { 997 997 const UInt width = codingParameters.widthInGroups << MLS_CG_LOG2_WIDTH; … … 1255 1255 if(uiAbsSum >= 2) //this prevents TUs with only one coefficient of value 1 from being tested 1256 1256 { 1257 signBitHidingHDQ( compID,piQCoef, piCoef, deltaU, codingParameters, maxLog2TrDynamicRange ) ;1257 signBitHidingHDQ( piQCoef, piCoef, deltaU, codingParameters, maxLog2TrDynamicRange ) ; 1258 1258 } 1259 1259 } … … 3091 3091 * \param bitDepths reference to bit depth array for all channels 3092 3092 */ 3093 Void TComTrQuant::setScalingList(TComScalingList *scalingList, const ChromaFormat format, constInt maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)3093 Void TComTrQuant::setScalingList(TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths) 3094 3094 { 3095 3095 const Int minimumQp = 0; … … 3102 3102 for(Int qp = minimumQp; qp < maximumQp; qp++) 3103 3103 { 3104 xSetScalingListEnc(scalingList,list,size,qp ,format);3105 xSetScalingListDec(*scalingList,list,size,qp ,format);3104 xSetScalingListEnc(scalingList,list,size,qp); 3105 xSetScalingListDec(*scalingList,list,size,qp); 3106 3106 setErrScaleCoeff(list,size,qp,maxLog2TrDynamicRange, bitDepths); 3107 3107 } … … 3113 3113 * \param format chroma format 3114 3114 */ 3115 Void TComTrQuant::setScalingListDec(const TComScalingList &scalingList , const ChromaFormat format)3115 Void TComTrQuant::setScalingListDec(const TComScalingList &scalingList) 3116 3116 { 3117 3117 const Int minimumQp = 0; … … 3124 3124 for(Int qp = minimumQp; qp < maximumQp; qp++) 3125 3125 { 3126 xSetScalingListDec(scalingList,list,size,qp ,format);3126 xSetScalingListDec(scalingList,list,size,qp); 3127 3127 } 3128 3128 } … … 3168 3168 * \param format chroma format 3169 3169 */ 3170 Void TComTrQuant::xSetScalingListEnc(TComScalingList *scalingList, UInt listId, UInt sizeId, Int qp , const ChromaFormat format)3170 Void TComTrQuant::xSetScalingListEnc(TComScalingList *scalingList, UInt listId, UInt sizeId, Int qp) 3171 3171 { 3172 3172 UInt width = g_scalingListSizeX[sizeId]; … … 3194 3194 * \param format chroma format 3195 3195 */ 3196 Void TComTrQuant::xSetScalingListDec(const TComScalingList &scalingList, UInt listId, UInt sizeId, Int qp , const ChromaFormat format)3196 Void TComTrQuant::xSetScalingListDec(const TComScalingList &scalingList, UInt listId, UInt sizeId, Int qp) 3197 3197 { 3198 3198 UInt width = g_scalingListSizeX[sizeId]; … … 3216 3216 /** set flat matrix value to quantized coefficient 3217 3217 */ 3218 Void TComTrQuant::setFlatScalingList(const ChromaFormat format, constInt maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)3218 Void TComTrQuant::setFlatScalingList(const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths) 3219 3219 { 3220 3220 const Int minimumQp = 0; … … 3227 3227 for(Int qp = minimumQp; qp < maximumQp; qp++) 3228 3228 { 3229 xsetFlatScalingList(list,size,qp ,format);3229 xsetFlatScalingList(list,size,qp); 3230 3230 setErrScaleCoeff(list,size,qp,maxLog2TrDynamicRange, bitDepths); 3231 3231 } … … 3240 3240 * \param format chroma format 3241 3241 */ 3242 Void TComTrQuant::xsetFlatScalingList(UInt list, UInt size, Int qp , const ChromaFormat format)3242 Void TComTrQuant::xsetFlatScalingList(UInt list, UInt size, Int qp) 3243 3243 { 3244 3244 UInt i,num = g_scalingListSize[size]; -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.h
r1303 r1307 182 182 Void setUseScalingList ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; }; 183 183 Bool getUseScalingList (const UInt width, const UInt height, const Bool isTransformSkip){ return m_scalingListEnabledFlag && (!isTransformSkip || ((width == 4) && (height == 4))); }; 184 Void setFlatScalingList (const ChromaFormat format, constInt maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);185 Void xsetFlatScalingList ( UInt list, UInt size, Int qp , const ChromaFormat format);186 Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, Int qp , const ChromaFormat format);187 Void xSetScalingListDec ( const TComScalingList &scalingList, UInt list, UInt size, Int qp , const ChromaFormat format);188 Void setScalingList ( TComScalingList *scalingList, const ChromaFormat format, constInt maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);189 Void setScalingListDec ( const TComScalingList &scalingList , const ChromaFormat format);184 Void setFlatScalingList (const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths); 185 Void xsetFlatScalingList ( UInt list, UInt size, Int qp); 186 Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, Int qp); 187 Void xSetScalingListDec ( const TComScalingList &scalingList, UInt list, UInt size, Int qp); 188 Void setScalingList ( TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths); 189 Void setScalingListDec ( const TComScalingList &scalingList); 190 190 Void processScalingListEnc( Int *coeff, Int *quantcoeff, Int quantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc); 191 191 Void processScalingListDec( const Int *coeff, Int *dequantcoeff, Int invQuantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc); … … 241 241 Void xTransformSkip ( Pel* piBlkResi, UInt uiStride, TCoeff* psCoeff, TComTU &rTu, const ComponentID component ); 242 242 243 Void signBitHidingHDQ( const ComponentID compID,TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange );243 Void signBitHidingHDQ( TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange ); 244 244 245 245 // quantization
Note: See TracChangeset for help on using the changeset viewer.