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/TLibEncoder/TEncEntropy.cpp

    r292 r294  
    5252Void TEncEntropy::encodeSliceHeader ( TComSlice* pcSlice )
    5353{
    54 #if SAO_UNIT_INTERLEAVING
    5554  if (pcSlice->getSPS()->getUseSAO())
    5655  {
     
    6867    }
    6968  }
    70 #endif
    7169
    7270  m_pcEntropyCoderIf->codeSliceHeader( pcSlice );
     
    7472}
    7573
    76 #if TILES_WPP_ENTRY_POINT_SIGNALLING
    7774Void  TEncEntropy::encodeTilesWPPEntryPoint( TComSlice* pSlice )
    7875{
    7976  m_pcEntropyCoderIf->codeTilesWPPEntryPoint( pSlice );
    8077}
    81 #else
    82 Void TEncEntropy::encodeSliceHeaderSubstreamTable( TComSlice* pcSlice )
    83 {
    84   m_pcEntropyCoderIf->codeSliceHeaderSubstreamTable( pcSlice );
    85 }
    86 #endif
    8778
    8879Void TEncEntropy::encodeTerminatingBit      ( UInt uiIsLast )
     
    9889}
    9990
    100 #if OL_FLUSH
    10191Void TEncEntropy::encodeFlush()
    10292{
     
    10797  m_pcEntropyCoderIf->encodeStart();
    10898}
    109 #endif
    11099
    111100Void TEncEntropy::encodeSEI(const SEI& sei)
     
    157146    uiAbsPartIdx = 0;
    158147  }
    159 #if BURST_IPCM
    160148  if( !bRD )
    161149  {
     
    165153    }
    166154  }
    167 #endif
    168155  m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx );
    169156}
     
    226213  //  m_pcEntropyCoderIf->codeAlfUvlc(pAlfParam->realfiltNo);
    227214
    228 #if !LCU_SYNTAX_ALF
    229   m_pcEntropyCoderIf->codeAlfFlag(pAlfParam->alf_pcr_region_flag);
    230 #endif
    231 #if !ALF_SINGLE_FILTER_SHAPE
    232   m_pcEntropyCoderIf->codeAlfUvlc(pAlfParam->filter_shape);
    233 #endif
    234215  Int noFilters = min(pAlfParam->filters_per_group-1, 2);
    235216  m_pcEntropyCoderIf->codeAlfUvlc(noFilters);
     
    241222  else if (noFilters == 2)
    242223  {
    243 #if LCU_SYNTAX_ALF
    244 #if ALF_16_BA_GROUPS
    245224    Int numMergeFlags = 16;
    246 #else
    247     Int numMergeFlags = 15;
    248 #endif
    249 #else
    250 #if ALF_16_BA_GROUPS
    251     Int numMergeFlags = 16;
    252 #else
    253     Int numMergeFlags = pAlfParam->alf_pcr_region_flag ? 16 : 15;
    254 #endif
    255 #endif
    256225    for (Int i=1; i<numMergeFlags; i++)
    257226    {
     
    285254  pDepthInt = pDepthIntTabShapes[ALFp->filter_shape];
    286255  maxScanVal = 0;
    287 #if ALF_SINGLE_FILTER_SHAPE
    288256  int minScanVal = MIN_SCAN_POS_CROSS;
    289 #else
    290   int minScanVal = ( ALFp->filter_shape==ALF_STAR5x5 ) ? 0 : MIN_SCAN_POS_CROSS;
    291 #endif
    292257
    293258  for(i = 0; i < sqrFiltLength; i++)
     
    355320  // Coding parameters
    356321  ALFp->minKStart = minKStart;
    357 #if !LCU_SYNTAX_ALF 
    358   ALFp->maxScanVal = maxScanVal;
    359 #endif
    360322  for(scanPos = minScanVal; scanPos < maxScanVal; scanPos++)
    361323  {
     
    363325  }
    364326
    365 #if LCU_SYNTAX_ALF
    366327  if (ALFp->filters_per_group == 1)
    367328  {
     
    370331  else
    371332  {
    372 #endif
    373333  len += writeFilterCodingParams(minKStart, minScanVal, maxScanVal, kMinTab);
    374334
    375335  // Filter coefficients
    376336  len += writeFilterCoeffs(sqrFiltLength, filters_per_group, pDepthInt, ALFp->coeffmulti, kMinTab);
    377 #if LCU_SYNTAX_ALF
    378   }
    379 #endif
     337  }
    380338 
    381339  return len;
     
    415373    {
    416374      scanPos = pDepthInt[i] - 1;
    417 #if LCU_SYNTAX_ALF
    418375      Int k = (filters_per_group == 1) ? kMinTab[i] : kMinTab[scanPos];
    419376      golombEncode(FilterCoeff[ind][i], k);
    420 #else
    421       golombEncode(FilterCoeff[ind][i], kMinTab[scanPos]);
    422 #endif
    423377    }
    424378  }
     
    526480#endif
    527481
    528 #if LCU_SYNTAX_ALF
    529482/** parse the fixed length code (smaller than one max value) in ALF
    530483 * \param run: coded value
     
    793746
    794747}
    795 #endif
    796748
    797749
    798750Void TEncEntropy::encodeAlfParam(ALFParam* pAlfParam)
    799751{
    800 #if LCU_SYNTAX_ALF
    801752  const Int numCoeff = (Int)ALF_MAX_NUM_COEF;
    802753
     
    826777    }
    827778  }
    828 #else
    829   if (!pAlfParam->alf_flag)
    830   {
    831     return;
    832   }
    833   Int pos;
    834   codeAux(pAlfParam);
    835   codeFilt(pAlfParam);
    836  
    837   // filter parameters for chroma
    838   m_pcEntropyCoderIf->codeAlfUvlc(pAlfParam->chroma_idc);
    839   if(pAlfParam->chroma_idc)
    840   {
    841 #if !ALF_SINGLE_FILTER_SHAPE
    842     m_pcEntropyCoderIf->codeAlfUvlc(pAlfParam->filter_shape_chroma);
    843 #endif
    844     // filter coefficients for chroma
    845     for(pos=0; pos<pAlfParam->num_coeff_chroma; pos++)
    846     {
    847       m_pcEntropyCoderIf->codeAlfSvlc(pAlfParam->coeff_chroma[pos]);
    848     }
    849   }
    850 #endif
    851779}
    852780
     
    907835    uiAbsPartIdx = 0;
    908836  }
    909 #if BURST_IPCM
    910837  if( !bRD )
    911838  {
     
    915842    }
    916843  }
    917 #endif
    918844
    919845#if !RWTH_SDC_DLT_B0036
     
    943869    uiAbsPartIdx = 0;
    944870  }
    945 #if BURST_IPCM
    946871  if( !bRD )
    947872  {
     
    951876    }
    952877  }
    953 #endif
    954878
    955879  m_pcEntropyCoderIf->codeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    969893    uiAbsPartIdx = 0;
    970894  }
    971 #if BURST_IPCM
    972895  if( !bRD )
    973896  {
     
    977900    }
    978901  }
    979 #endif 
    980902#if RWTH_SDC_DLT_B0036
    981903  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
     
    1031953  }
    1032954 
    1033 #if BURST_IPCM
    1034955  Int numIPCM = 0;
    1035956  Bool firstIPCMFlag = false;
     
    1047968  }
    1048969  m_pcEntropyCoderIf->codeIPCMInfo ( pcCU, uiAbsPartIdx, numIPCM, firstIPCMFlag);
    1049 #else
    1050   m_pcEntropyCoderIf->codeIPCMInfo ( pcCU, uiAbsPartIdx );
    1051 #endif
    1052 
    1053 }
    1054 
    1055 #if UNIFIED_TRANSFORM_TREE
     970
     971}
     972
    1056973Void TEncEntropy::xEncodeTransform( 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 )
    1057 #else
    1058 Void TEncEntropy::xEncodeTransformSubdiv( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 )
    1059 #endif
    1060974{
    1061975  const UInt uiSubdiv = pcCU->getTransformIdx( uiAbsPartIdx ) + pcCU->getDepth( uiAbsPartIdx ) > uiDepth;
    1062976  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
    1063 #if UNIFIED_TRANSFORM_TREE
    1064977  UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
    1065978  UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
     
    1084997    }
    1085998  }
    1086 #endif // UNIFIED_TRANSFORM_TREE
    1087999  {//CABAC
    10881000    if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
     
    11641076    if( uiSubdiv )
    11651077    {
    1166 #if UNIFIED_TRANSFORM_TREE
    11671078      UInt size;
    11681079      width  >>= 1;
     
    11701081      size = width*height;
    11711082      uiTrIdx++;
    1172 #endif // UNIFIED_TRANSFORM_TREE
    11731083      ++uiDepth;
    1174 #if UNIFIED_TRANSFORM_TREE
    11751084      const UInt partNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    1176 #else
    1177       const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    1178 #endif
    11791085     
    11801086      UInt uiCurrentCbfY = 0;
     
    11821088      UInt uiCurrentCbfV = 0;
    11831089     
    1184 #if UNIFIED_TRANSFORM_TREE
    11851090      UInt nsAddr = 0;
    11861091      nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 0, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
     
    11981103      nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 3, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
    11991104      xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, nsAddr, uiDepth, width, height, uiTrIdx, 3, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV, bCodeDQP );     
    1200 #else // UNIFIED_TRANSFORM_TREE
    1201       UInt nsAddr = 0;
    1202       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 0, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
    1203       xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, 0, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    1204 
    1205       uiAbsPartIdx += uiQPartNum;
    1206       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 1, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
    1207       xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, 1, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    1208 
    1209       uiAbsPartIdx += uiQPartNum;
    1210       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 2, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
    1211       xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, 2, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    1212 
    1213       uiAbsPartIdx += uiQPartNum;
    1214       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, 3, uiDepth - pcCU->getDepth( uiAbsPartIdx ) );
    1215       xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, 3, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    1216 #endif // UNIFIED_TRANSFORM_TREE
    12171105     
    12181106      uiYCbfFront3 += uiCurrentCbfY;
     
    12581146      }
    12591147     
    1260 #if UNIFIED_TRANSFORM_TREE
    12611148      if ( cbfY || cbfU || cbfV )
    12621149      {
     
    13101197        }
    13111198      }
    1312 #endif // UNIFIED_TRANSFORM_TREE
    1313     }
    1314   }
    1315 }
    1316 
    1317 #if !UNIFIED_TRANSFORM_TREE
    1318 // transform index
    1319 Void TEncEntropy::encodeTransformIdx( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD )
    1320 {
    1321   assert( !bRD ); // parameter bRD can be removed
    1322   if( bRD )
    1323   {
    1324     uiAbsPartIdx = 0;
    1325   }
    1326  
    1327   DTRACE_CABAC_VL( g_nSymbolCounter++ )
    1328   DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" )
    1329   DTRACE_CABAC_V( uiDepth )
    1330   DTRACE_CABAC_T( "\n" )
    1331   UInt temp = 0;
    1332   UInt temp1 = 0;
    1333   UInt temp2 = 0;
    1334   xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, uiAbsPartIdx, uiDepth, 0, temp, temp1, temp2 );
    1335 }
    1336 #endif // !UNIFIED_TRANSFORM_TREE
     1199    }
     1200  }
     1201}
     1202
    13371203
    13381204// Intra direction for Luma
     
    15501416
    15511417// texture
    1552 #if !UNIFIED_TRANSFORM_TREE
    1553 Void TEncEntropy::xEncodeCoeff( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP )
    1554 {
    1555   UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiDepth ] + 2;
    1556   UInt uiCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx );
    1557   UInt uiCbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    1558   UInt uiCbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    1559 
    1560   if( uiLog2TrSize == 2 )
    1561   {
    1562     UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    1563     if( ( uiAbsPartIdx % uiQPDiv ) == 0 )
    1564     {
    1565       m_uiBakAbsPartIdx   = uiAbsPartIdx;
    1566       m_uiBakChromaOffset = uiChromaOffset;
    1567     }
    1568     else if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    1569     {
    1570       uiCbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    1571       uiCbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    1572     }
    1573   }
    1574 
    1575   if ( uiCbfY || uiCbfU || uiCbfV )
    1576   {
    1577     // dQP: only for LCU once
    1578     if ( pcCU->getSlice()->getPPS()->getUseDQP() )
    1579     {
    1580       if ( bCodeDQP )
    1581       {
    1582         encodeQP( pcCU, uiAbsPartIdx );
    1583         bCodeDQP = false;
    1584       }
    1585     }
    1586     UInt uiLumaTrMode, uiChromaTrMode;
    1587     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx( uiAbsPartIdx ), uiLumaTrMode, uiChromaTrMode );
    1588     const UInt uiStopTrMode = uiLumaTrMode;
    1589    
    1590     assert(1); // as long as quadtrees are not used for residual transform
    1591    
    1592     if( uiTrIdx == uiStopTrMode )
    1593     {
    1594       if( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx ) )
    1595       {
    1596         Int trWidth = uiWidth;
    1597         Int trHeight = uiHeight;
    1598         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    1599         m_pcEntropyCoderIf->codeCoeffNxN( pcCU, (pcCU->getCoeffY()+uiLumaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA );
    1600       }
    1601 
    1602       uiWidth  >>= 1;
    1603       uiHeight >>= 1;
    1604 
    1605       if( uiLog2TrSize == 2 )
    1606       {
    1607         UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    1608         if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    1609         {
    1610           uiWidth  <<= 1;
    1611           uiHeight <<= 1;
    1612           Int trWidth = uiWidth;
    1613           Int trHeight = uiHeight;
    1614           pcCU->getNSQTSize( uiTrIdx-1, uiAbsPartIdx, trWidth, trHeight );
    1615           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    1616           {
    1617             m_pcEntropyCoderIf->codeCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    1618           }
    1619           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    1620           {
    1621             m_pcEntropyCoderIf->codeCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    1622           }
    1623         }
    1624       }
    1625       else
    1626       {
    1627         Int trWidth = uiWidth;
    1628         Int trHeight = uiHeight;
    1629         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    1630         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    1631         {
    1632           m_pcEntropyCoderIf->codeCoeffNxN( pcCU, (pcCU->getCoeffCb()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    1633         }
    1634         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    1635         {
    1636           m_pcEntropyCoderIf->codeCoeffNxN( pcCU, (pcCU->getCoeffCr()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    1637         }
    1638       }
    1639     }
    1640     else
    1641     {
    1642       {
    1643         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    1644         DTRACE_CABAC_T( "\tgoing down\tdepth=" );
    1645         DTRACE_CABAC_V( uiDepth );
    1646         DTRACE_CABAC_T( "\ttridx=" );
    1647         DTRACE_CABAC_V( uiTrIdx );
    1648         DTRACE_CABAC_T( "\n" );
    1649       }
    1650       if( uiCurrTrIdx <= uiTrIdx )
    1651         assert(1);
    1652      
    1653       UInt uiSize;
    1654       uiWidth  >>= 1;
    1655       uiHeight >>= 1;
    1656       uiSize = uiWidth*uiHeight;
    1657       uiDepth++;
    1658       uiTrIdx++;
    1659      
    1660       UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    1661       UInt uiIdx      = uiAbsPartIdx;
    1662      
    1663       {
    1664         xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    1665         uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    1666 
    1667         xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    1668         uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    1669 
    1670         xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    1671         uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    1672 
    1673         xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    1674       }
    1675       {
    1676         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    1677         DTRACE_CABAC_T( "\tgoing up\n" );
    1678       }
    1679     }
    1680   }
    1681 }
    1682 #endif // !UNIFIED_TRANSFORM_TREE
    16831418
    16841419/** encode coefficients
     
    17181453    DTRACE_CABAC_V( uiDepth )
    17191454    DTRACE_CABAC_T( "\n" )
    1720 #if !UNIFIED_TRANSFORM_TREE
    1721     UInt temp = 0;
    1722     UInt temp1 = 0;
    1723     UInt temp2 = 0;
    1724     xEncodeTransformSubdiv( pcCU, uiAbsPartIdx, uiAbsPartIdx, uiDepth, 0, temp, temp1, temp2 );
    1725 #endif // !UNIFIED_TRANSFORM_TREE
    17261455  }
    17271456  else
     
    17471476      }
    17481477    }
    1749 #if !UNIFIED_TRANSFORM_TREE
    1750     encodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );
    1751 #endif
    17521478  }
    17531479 
     
    17681494#endif
    17691495
    1770 #if UNIFIED_TRANSFORM_TREE
    17711496  UInt temp = 0;
    17721497  UInt temp1 = 0;
    17731498  UInt temp2 = 0;
    17741499  xEncodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
    1775 #else // UNIFIED_TRANSFORM_TREE
    1776   xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    1777 #endif // UNIFIED_TRANSFORM_TREE
    17781500
    17791501#if FIX_MPI_B0065
     
    17971519}
    17981520
    1799 #if SAO_UNIT_INTERLEAVING
    18001521/** Encode SAO Offset
    18011522 * \param  saoLcuParam SAO LCU paramters
     
    19851706  }
    19861707}
    1987 #else
    1988 /** Encode SAO for one partition
    1989  * \param  pSaoParam, iPartIdx
    1990  */
    1991 Void TEncEntropy::encodeSaoOnePart(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    1992 {
    1993   SAOQTPart*  pAlfPart = NULL;
    1994   pAlfPart = &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    1995 
    1996   UInt uiSymbol;
    1997 
    1998   if(!pAlfPart->bSplit)
    1999   {
    2000     if (pAlfPart->bEnableFlag)
    2001     {
    2002       uiSymbol = pAlfPart->iBestType + 1;
    2003     }
    2004     else
    2005     {
    2006       uiSymbol = 0;
    2007     }
    2008    
    2009     m_pcEntropyCoderIf->codeSaoUvlc(uiSymbol);
    2010 
    2011     if (pAlfPart->bEnableFlag)
    2012     {
    2013       for(Int i=0; i< pAlfPart->iLength; i++)
    2014       {
    2015         m_pcEntropyCoderIf->codeSaoSvlc(pAlfPart->iOffset[i]);
    2016       }   
    2017     }
    2018     return;
    2019   }
    2020 
    2021   //split
    2022   if (pAlfPart->PartLevel < pSaoParam->iMaxSplitLevel)
    2023   {
    2024     for (Int i=0;i<NUM_DOWN_PART;i++)
    2025     {
    2026       encodeSaoOnePart(pSaoParam, pAlfPart->DownPartsIdx[i], iYCbCr);
    2027     }
    2028   }
    2029 }
    2030 
    2031 /** Encode quadtree split flag
    2032  * \param  pSaoParam, iPartIdx
    2033  */
    2034 Void TEncEntropy::encodeQuadTreeSplitFlag(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    2035 {
    2036   SAOQTPart*  pSaoPart = NULL;
    2037   pSaoPart = &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    2038 
    2039   if(pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel)
    2040   {
    2041     //send one flag
    2042     m_pcEntropyCoderIf->codeSaoFlag( (pSaoPart->bSplit)?(1):(0)  );
    2043 
    2044     if(pSaoPart->bSplit)
    2045     {
    2046       for (Int i=0;i<NUM_DOWN_PART;i++)
    2047       {
    2048         encodeQuadTreeSplitFlag(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr);
    2049       }
    2050     }
    2051   }
    2052 }
    2053 /** Encode SAO parameters
    2054  * \param  pSaoParam
    2055  */
    2056 Void TEncEntropy::encodeSaoParam(SAOParam* pSaoParam)
    2057 {
    2058   if (pSaoParam->bSaoFlag[0])
    2059   {
    2060     encodeQuadTreeSplitFlag(pSaoParam, 0, 0);
    2061     encodeSaoOnePart(pSaoParam, 0, 0);
    2062     m_pcEntropyCoderIf->codeSaoFlag(pSaoParam->bSaoFlag[1]);
    2063     if (pSaoParam->bSaoFlag[1])
    2064     {
    2065       encodeQuadTreeSplitFlag(pSaoParam, 0, 1);
    2066       encodeSaoOnePart(pSaoParam, 0, 1);
    2067     }
    2068     m_pcEntropyCoderIf->codeSaoFlag(pSaoParam->bSaoFlag[2]);
    2069     if (pSaoParam->bSaoFlag[2])
    2070     {
    2071       encodeQuadTreeSplitFlag(pSaoParam, 0, 2);
    2072       encodeSaoOnePart(pSaoParam, 0, 2);
    2073     }
    2074   }
    2075 }
    2076 #endif
    20771708
    20781709Int TEncEntropy::countNonZeroCoeffs( TCoeff* pcCoef, UInt uiSize )
Note: See TracChangeset for help on using the changeset viewer.