Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPattern.cpp


Ignore:
Timestamp:
12 Dec 2011, 18:35:44 (12 years ago)
Author:
hhi
Message:

Clean version with cfg-files

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
    134
    235
     
    91124                                         Int         iOffsetBottom,
    92125                                         UInt        uiPartDepth,
    93                                          UInt        uiAbsPartIdx,
    94                                          Bool        bPrdDepthMap )
     126                                         UInt        uiAbsPartIdx
     127#if DEPTH_MAP_GENERATION
     128                                        ,Bool        bPrdDepthMap
     129#endif
     130                                         )
    95131{
    96132  m_iOffsetLeft   = iOffsetLeft;
     
    104140  UInt uiAbsZorderIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    105141 
     142#if DEPTH_MAP_GENERATION
    106143  TComPicYuv* pcPic = ( bPrdDepthMap ? pcCU->getPic()->getPredDepthMap() : pcCU->getPic()->getPicYuvRec() );
     144#else
     145  TComPicYuv* pcPic = pcCU->getPic()->getPicYuvRec();
     146#endif
    107147  if ( iComp == 0 )
    108148  {
     
    142182}
    143183
    144 Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx, Bool bPrdDepthMap )
     184Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx
     185#if DEPTH_MAP_GENERATION
     186                             , Bool bPrdDepthMap
     187#endif
     188                             )
    145189{
    146190  Int   uiOffsetLeft  = 0;
     
    185229#endif
    186230
     231#if DEPTH_MAP_GENERATION
    187232  m_cPatternY .setPatternParamCU( pcCU, 0, uiWidth,      uiHeight,      uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap );
    188233  m_cPatternCb.setPatternParamCU( pcCU, 1, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap );
    189234  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
     242Void 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                                )
    193247{
    194248  Pel*  piRoiOrigin;
     
    330384  piAdiTemp   = piAdiBuf;
    331385
     386#if DEPTH_MAP_GENERATION
    332387  if( bPrdDepthMap )
    333388  {
     
    338393#endif
    339394  }
    340 
    341 
    342 #if REFERENCE_SAMPLE_PADDING
     395#endif
     396
     397
     398#if REFERENCE_SAMPLE_PADDING
     399#if DEPTH_MAP_GENERATION
    343400  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
    344404  delete [] bNeighborFlags;
    345405  bNeighborFlags = NULL;
     
    586646
    587647#if REFERENCE_SAMPLE_PADDING
     648#if DEPTH_MAP_GENERATION
    588649  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
    589653#else // REFERENCE_SAMPLE_PADDING
    590654  for (i=0;i<uiWidth;i++)
     
    648712 
    649713#if REFERENCE_SAMPLE_PADDING
     714#if DEPTH_MAP_GENERATION
    650715  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
    651719  delete [] bNeighborFlags;
    652720  bNeighborFlags = NULL;
     
    709777
    710778#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 )
     779Void 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                                        )
    712784{
    713785  Pel* piRoiTemp;
    714786  Int  i, j;
     787#if DEPTH_MAP_GENERATION
    715788  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
    716792 
    717793  if (iNumIntraNeighbor == 0)
     
    885961
    886962#if QC_MDIS
    887 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH
    888 Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf, Bool bDepth )
    889 #else
    890963Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf )
    891 #endif
    892964{
    893965#if MN_MDIS_SIMPLIFICATION
     
    919991  mapPlanartoDC( uiDirMode );
    920992#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
    929994  UChar ucFiltIdx = 0;
    930995  if ( uiDirMode < 34 )
     
    934999#else
    9351000  UChar ucFiltIdx = g_aucIntraFilter[uiWidthBits][uiDirMode];
    936 #endif
    9371001#endif
    9381002
Note: See TracChangeset for help on using the changeset viewer.