Ticket #670: TEncSearch.cpp.patch

File TEncSearch.cpp.patch, 1.8 KB (added by jzxu, 10 years ago)
  • TEncSearch.cpp

     
    19051905  ::memcpy( pcCoeffDstY, pcCoeffSrcY, sizeof( TCoeff ) * uiNumCoeffY );
    19061906#if ADAPTIVE_QP_SELECTION
    19071907  Int* pcArlCoeffDstY = m_ppcQTTempArlCoeffY [ uiQTLayer ] + ( uiNumCoeffIncY * uiAbsPartIdx );
    1908   Int* pcArlCoeffSrcY = m_ppcQTTempTUArlCoeffY            + ( uiNumCoeffIncY * uiAbsPartIdx );
     1908  Int* pcArlCoeffSrcY = m_ppcQTTempTUArlCoeffY;
    19091909  ::memcpy( pcArlCoeffDstY, pcArlCoeffSrcY, sizeof( Int ) * uiNumCoeffY );
    19101910#endif
    19111911  if( !bLumaOnly && !bSkipChroma )
     
    21732173    Bool checkTransformSkip = pcCU->getSlice()->getSPS()->getUseTransformSkip();
    21742174#endif
    21752175    UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiFullDepth ] + 2;
     2176
     2177    UInt actualTrDepth = uiTrDepth;
     2178    if( uiLog2TrSize == 2 )
     2179    {
     2180      assert( uiTrDepth > 0 );
     2181      actualTrDepth--;
     2182      UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth( 0 ) + actualTrDepth) << 1 );
     2183      Bool bFirstQ = ( ( uiAbsPartIdx % uiQPDiv ) == 0 );
     2184      if( !bFirstQ )
     2185      {
     2186        return;
     2187      }
     2188    }
     2189
    21762190    checkTransformSkip &= (uiLog2TrSize <= 3);
    21772191#if INTRA_TRANSFORMSKIP_FAST
    21782192    if ( m_pcEncCfg->getUseTransformSkipFast() )
     
    21902204    }
    21912205#endif
    21922206
    2193     UInt actualTrDepth = uiTrDepth;
    2194     if( uiLog2TrSize == 2 )
    2195     {
    2196       assert( uiTrDepth > 0 );
    2197       actualTrDepth--;
    2198       UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth( 0 ) + actualTrDepth) << 1 );
    2199       Bool bFirstQ = ( ( uiAbsPartIdx % uiQPDiv ) == 0 );
    2200       if( !bFirstQ )
    2201       {
    2202         return;
    2203       }
    2204     }
    22052207    if(checkTransformSkip)
    22062208    {
    22072209#if INTRA_TRANSFORMSKIP_FAST==0