Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPattern.cpp
- Timestamp:
- 12 Dec 2011, 18:35:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComPattern.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 91 124 Int iOffsetBottom, 92 125 UInt uiPartDepth, 93 UInt uiAbsPartIdx, 94 Bool bPrdDepthMap ) 126 UInt uiAbsPartIdx 127 #if DEPTH_MAP_GENERATION 128 ,Bool bPrdDepthMap 129 #endif 130 ) 95 131 { 96 132 m_iOffsetLeft = iOffsetLeft; … … 104 140 UInt uiAbsZorderIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 105 141 142 #if DEPTH_MAP_GENERATION 106 143 TComPicYuv* pcPic = ( bPrdDepthMap ? pcCU->getPic()->getPredDepthMap() : pcCU->getPic()->getPicYuvRec() ); 144 #else 145 TComPicYuv* pcPic = pcCU->getPic()->getPicYuvRec(); 146 #endif 107 147 if ( iComp == 0 ) 108 148 { … … 142 182 } 143 183 144 Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx, Bool bPrdDepthMap ) 184 Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx 185 #if DEPTH_MAP_GENERATION 186 , Bool bPrdDepthMap 187 #endif 188 ) 145 189 { 146 190 Int uiOffsetLeft = 0; … … 185 229 #endif 186 230 231 #if DEPTH_MAP_GENERATION 187 232 m_cPatternY .setPatternParamCU( pcCU, 0, uiWidth, uiHeight, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap ); 188 233 m_cPatternCb.setPatternParamCU( pcCU, 1, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap ); 189 234 m_cPatternCr.setPatternParamCU( pcCU, 2, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap ); 190 } 191 192 Void TComPattern::initAdiPattern( TComDataCU* pcCU, UInt uiZorderIdxInPart, UInt uiPartDepth, Int* piAdiBuf, Int iOrgBufStride, Int iOrgBufHeight, Bool& bAbove, Bool& bLeft, Bool bPrdDepthMap ) 235 #else 236 m_cPatternY .setPatternParamCU( pcCU, 0, uiWidth, uiHeight, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx ); 237 m_cPatternCb.setPatternParamCU( pcCU, 1, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx ); 238 m_cPatternCr.setPatternParamCU( pcCU, 2, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx ); 239 #endif 240 } 241 242 Void TComPattern::initAdiPattern( TComDataCU* pcCU, UInt uiZorderIdxInPart, UInt uiPartDepth, Int* piAdiBuf, Int iOrgBufStride, Int iOrgBufHeight, Bool& bAbove, Bool& bLeft 243 #if DEPTH_MAP_GENERATION 244 , Bool bPrdDepthMap 245 #endif 246 ) 193 247 { 194 248 Pel* piRoiOrigin; … … 330 384 piAdiTemp = piAdiBuf; 331 385 386 #if DEPTH_MAP_GENERATION 332 387 if( bPrdDepthMap ) 333 388 { … … 338 393 #endif 339 394 } 340 341 342 #if REFERENCE_SAMPLE_PADDING 395 #endif 396 397 398 #if REFERENCE_SAMPLE_PADDING 399 #if DEPTH_MAP_GENERATION 343 400 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, bPrdDepthMap ); 401 #else 402 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride ); 403 #endif 344 404 delete [] bNeighborFlags; 345 405 bNeighborFlags = NULL; … … 586 646 587 647 #if REFERENCE_SAMPLE_PADDING 648 #if DEPTH_MAP_GENERATION 588 649 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, false ); 650 #else 651 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride ); 652 #endif 589 653 #else // REFERENCE_SAMPLE_PADDING 590 654 for (i=0;i<uiWidth;i++) … … 648 712 649 713 #if REFERENCE_SAMPLE_PADDING 714 #if DEPTH_MAP_GENERATION 650 715 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, false ); 716 #else 717 fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride ); 718 #endif 651 719 delete [] bNeighborFlags; 652 720 bNeighborFlags = NULL; … … 709 777 710 778 #if REFERENCE_SAMPLE_PADDING 711 Void TComPattern::fillReferenceSamples( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride, Bool bPrdDepthMap ) 779 Void TComPattern::fillReferenceSamples( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride 780 #if DEPTH_MAP_GENERATION 781 , Bool bPrdDepthMap 782 #endif 783 ) 712 784 { 713 785 Pel* piRoiTemp; 714 786 Int i, j; 787 #if DEPTH_MAP_GENERATION 715 788 Int iDCValue = ( bPrdDepthMap ? PDM_UNDEFINED_DEPTH : ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) ) ); 789 #else 790 Int iDCValue = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) ); 791 #endif 716 792 717 793 if (iNumIntraNeighbor == 0) … … 885 961 886 962 #if QC_MDIS 887 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH888 Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf, Bool bDepth )889 #else890 963 Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf ) 891 #endif892 964 { 893 965 #if MN_MDIS_SIMPLIFICATION … … 919 991 mapPlanartoDC( uiDirMode ); 920 992 #endif 921 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH 922 UChar ucFiltIdx = 0; 923 if ( !bDepth ) 924 { 925 ucFiltIdx = g_aucIntraFilter[uiWidthBits][uiDirMode]; 926 } 927 #else 928 #if HHI_DMM_INTRA 993 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 929 994 UChar ucFiltIdx = 0; 930 995 if ( uiDirMode < 34 ) … … 934 999 #else 935 1000 UChar ucFiltIdx = g_aucIntraFilter[uiWidthBits][uiDirMode]; 936 #endif937 1001 #endif 938 1002
Note: See TracChangeset for help on using the changeset viewer.