Ignore:
Timestamp:
19 Feb 2013, 20:33:52 (12 years ago)
Author:
tech
Message:

Removed HM-6.1 related guard macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r292 r294  
    330330      else
    331331      {
    332 #if SIMP_MRG_PRUN
    333332        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    334333        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    335 #else     
    336         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    337         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    338 #endif
    339334      }
    340335#else
    341 #if SIMP_MRG_PRUN       
    342336      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    343337#if MERL_VSP_C0152
     
    375369#else
    376370      pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    377 #endif
    378 #else     
    379       pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    380       UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    381371#endif
    382372#endif
     
    547537}
    548538
    549 #if UNIFIED_TRANSFORM_TREE
    550539Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3, Bool& bCodeDQP )
    551 #else
    552 Void TDecEntropy::xDecodeTransformSubdiv( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 )
    553 #endif
    554540{
    555541  UInt uiSubdiv;
    556542  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
    557543
    558 #if UNIFIED_TRANSFORM_TREE
    559544  if(uiTrIdx==0)
    560545  {
     
    570555    }
    571556  }
    572 #endif // UNIFIED_TRANSFORM_TREE
    573557  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    574558  {
    575559    uiSubdiv = 1;
    576560  }
    577 #if G519_TU_AMP_NSQT_HARMONIZATION
    578561  else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
    579 #else
    580   else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
    581 #endif
    582562  {
    583563    uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));
     
    656636  if( uiSubdiv )
    657637  {
    658 #if UNIFIED_TRANSFORM_TREE
    659638    UInt size;
    660639    width  >>= 1;
     
    662641    size = width*height;
    663642    uiTrIdx++;
    664 #endif
    665643    ++uiDepth;
    666644    const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
     
    678656    for( Int i = 0; i < 4; i++ )
    679657    {
    680 #if UNIFIED_TRANSFORM_TREE
    681658      UInt nsAddr = 0;
    682659      nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 );
    683660      xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, nsAddr, uiDepth, width, height, uiTrIdx, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV, bCodeDQP );
    684 #else
    685       UInt nsAddr = 0;
    686       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 );
    687       xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    688 #endif
    689661      uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiLumaTrMode );
    690662      uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiChromaTrMode );
    691663      uiVCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiChromaTrMode );
    692664      uiAbsPartIdx += uiQPartNum;
    693 #if UNIFIED_TRANSFORM_TREE
    694665      offsetLuma += size;  offsetChroma += (size>>2);
    695 #endif
    696666    }
    697667   
     
    751721      }
    752722    }
    753 #if UNIFIED_TRANSFORM_TREE
    754723    // transform_unit begin
    755724    UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
     
    817786    }
    818787    // transform_unit end
    819 #endif // UNIFIED_TRANSFORM_TREE
    820   }
    821 }
    822 
    823 #if !UNIFIED_TRANSFORM_TREE
    824 Void TDecEntropy::decodeTransformIdx( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    825 {
    826   DTRACE_CABAC_VL( g_nSymbolCounter++ )
    827   DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" )
    828   DTRACE_CABAC_V( uiDepth )
    829   DTRACE_CABAC_T( "\n" )
    830   UInt temp = 0;
    831   UInt temp1 = 0;
    832   UInt temp2 = 0;
    833   xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, uiAbsPartIdx, uiDepth, 0, temp, temp1, temp2 );
    834 }
    835 #endif // UNIFIED_TRANSFORM_TREE
    836 
    837 #if UNIFIED_TRANSFORM_TREE
     788  }
     789}
     790
     791
    838792Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    839793{
     
    843797  }
    844798}
    845 #else
    846 Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    847 {
    848   if ( pcCU->getSlice()->getPPS()->getUseDQP() )
    849   {
    850     m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, uiDepth );
    851   }
    852 }
    853 #endif
    854 
    855 #if !UNIFIED_TRANSFORM_TREE
    856 Void TDecEntropy::xDecodeCoeff( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP )
    857 {
    858   UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiDepth ] + 2;
    859   UInt uiCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx );
    860   UInt uiCbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    861   UInt uiCbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    862   if( uiLog2TrSize == 2 )
    863   {
    864     UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    865     if( ( uiAbsPartIdx % uiQPDiv ) == 0 )
    866     {
    867       m_uiBakAbsPartIdx   = uiAbsPartIdx;
    868       m_uiBakChromaOffset = uiChromaOffset;
    869     }
    870     else if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    871     {
    872       uiCbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    873       uiCbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    874     }
    875   }
    876 
    877   if ( uiCbfY || uiCbfU || uiCbfV )
    878   {
    879     // dQP: only for LCU
    880     if ( pcCU->getSlice()->getPPS()->getUseDQP() )
    881     {
    882       if ( bCodeDQP )
    883       {
    884         decodeQP( pcCU, uiAbsPartIdx, uiDepth);
    885         bCodeDQP = false;
    886       }
    887     }   
    888     UInt uiLumaTrMode, uiChromaTrMode;
    889     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx( uiAbsPartIdx ), uiLumaTrMode, uiChromaTrMode );
    890     const UInt uiStopTrMode = uiLumaTrMode;
    891    
    892     if( uiTrIdx == uiStopTrMode )
    893     {
    894       if( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx ) )
    895       {
    896         Int trWidth = uiWidth;
    897         Int trHeight = uiHeight;
    898         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    899         m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffY()+uiLumaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA );
    900       }
    901      
    902       uiWidth  >>= 1;
    903       uiHeight >>= 1;
    904 
    905       if( uiLog2TrSize == 2 )
    906       {
    907         UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    908         if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    909         {
    910           uiWidth  <<= 1;
    911           uiHeight <<= 1;
    912           Int trWidth = uiWidth;
    913           Int trHeight = uiHeight;
    914           pcCU->getNSQTSize( uiTrIdx-1, uiAbsPartIdx, trWidth, trHeight );
    915           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    916           {
    917             m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    918           }
    919           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    920           {
    921             m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    922           }
    923         }
    924       }
    925       else
    926       {
    927         Int trWidth = uiWidth;
    928         Int trHeight = uiHeight;
    929         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    930         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    931         {
    932           m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    933         }
    934         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    935         {
    936           m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    937         }
    938       }
    939     }
    940     else
    941     {
    942       {
    943         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    944         DTRACE_CABAC_T( "\tgoing down\tdepth=" );
    945         DTRACE_CABAC_V( uiDepth );
    946         DTRACE_CABAC_T( "\ttridx=" );
    947         DTRACE_CABAC_V( uiTrIdx );
    948         DTRACE_CABAC_T( "\n" );
    949       }
    950       if( uiCurrTrIdx <= uiTrIdx )
    951       {
    952         assert(1);
    953       }
    954       UInt uiSize;
    955       uiWidth  >>= 1;
    956       uiHeight >>= 1;
    957       uiSize = uiWidth*uiHeight;
    958       uiDepth++;
    959       uiTrIdx++;
    960      
    961       UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    962       UInt uiIdx      = uiAbsPartIdx;
    963      
    964       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    965       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    966      
    967       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    968       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    969      
    970       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    971       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    972      
    973       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    974       {
    975         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    976         DTRACE_CABAC_T( "\tgoing up\n" );
    977       }
    978     }
    979   }
    980 }
    981 #endif // !UNIFIED_TRANSFORM_TREE
     799
    982800
    983801/** decode coefficients
     
    994812  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    995813  UInt uiChromaOffset = uiLumaOffset>>2;
    996 #if UNIFIED_TRANSFORM_TREE
    997814  UInt temp  = 0;
    998815  UInt temp1 = 0;
    999816  UInt temp2 = 0;
    1000 #else
    1001   UInt uiLumaTrMode, uiChromaTrMode;
    1002 #endif
    1003817 
    1004818#if RWTH_SDC_DLT_B0036
     
    1018832  if( pcCU->isIntra(uiAbsPartIdx) )
    1019833  {
    1020 #if !UNIFIED_TRANSFORM_TREE
    1021     decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );
    1022    
    1023     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    1024    
    1025 #endif // !UNIFIED_TRANSFORM_TREE
    1026834  }
    1027835  else
     
    1045853    }
    1046854   
    1047 #if !UNIFIED_TRANSFORM_TREE
    1048     decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );
    1049    
    1050     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    1051 #endif // !UNIFIED_TRANSFORM_TREE
    1052855  }
    1053856
     
    1068871#endif
    1069872
    1070 #if UNIFIED_TRANSFORM_TREE
    1071873  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
    1072 #else // UNIFIED_TRANSFORM_TREE
    1073   xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    1074 #endif // UNIFIED_TRANSFORM_TREE
    1075874
    1076875#if FIX_MPI_B0065
Note: See TracChangeset for help on using the changeset viewer.