Ticket #327: amp_at_smallest_cu_bug.patch

File amp_at_smallest_cu_bug.patch, 1.3 KB (added by bheng, 12 years ago)

Fix to disable AMP when cLog2CbSize == Log2MinCbSize

  • TLibDecoder/TDecTop.cpp

     
    280280  }
    281281  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    282282
    283   for (Int i = 0; i < sps->getMaxCUDepth() - 1; i++)
     283  for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++)
    284284  {
    285285    sps->setAMPAcc( i, sps->getUseAMP() );
    286286  }
    287287
    288   for (Int i = sps->getMaxCUDepth() - 1; i < sps->getMaxCUDepth(); i++)
     288  for (Int i = sps->getMaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)
    289289  {
    290290    sps->setAMPAcc( i, 0 );
    291291  }
  • TLibEncoder/TEncTop.cpp

     
    536536  }
    537537#endif
    538538 
    539   for (i = 0; i < g_uiMaxCUDepth-1; i++ )
     539  for (i = 0; i < g_uiMaxCUDepth-g_uiAddCUDepth; i++ )
    540540  {
    541541    m_cSPS.setAMPAcc( i, m_useAMP );
    542542    //m_cSPS.setAMPAcc( i, 1 );
     
    544544
    545545  m_cSPS.setUseAMP ( m_useAMP );
    546546
    547   for (i = g_uiMaxCUDepth-1; i < g_uiMaxCUDepth; i++ )
     547  for (i = g_uiMaxCUDepth-g_uiAddCUDepth; i < g_uiMaxCUDepth; i++ )
    548548  {
    549549    m_cSPS.setAMPAcc(i, 0);
    550550  }