Ticket #1301: tiles.patch

File tiles.patch, 1.5 KB (added by gregory, 10 years ago)

Suggested fix

  • source/Lib/TLibCommon/TComPicSym.cpp

     
    249249  }
    250250
    251251#if TILE_SIZE_CHECK
    252   Int minWidth  = 1;
    253   Int minHeight = 1;
    254   const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc();
    255   if (  profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10)
     252  if (pps->getTilesEnabledFlag())
    256253  {
    257     minHeight = 64  / g_uiMaxCUHeight;
    258     minWidth  = 256 / g_uiMaxCUWidth;
    259   }
    260   for(Int row=0; row < numRows; row++)
    261   {
    262     for(Int col=0; col < numCols; col++)
     254    Int minWidth  = 1;
     255    Int minHeight = 1;
     256    const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc();
     257    if (  profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10)
    263258    {
    264       const Int tileIdx = row * numCols + col;
    265       assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth);
    266       assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight);
     259      minHeight = 64  / g_uiMaxCUHeight;
     260      minWidth  = 256 / g_uiMaxCUWidth;
    267261    }
     262    for(Int row=0; row < numRows; row++)
     263    {
     264      for(Int col=0; col < numCols; col++)
     265      {
     266        const Int tileIdx = row * numCols + col;
     267        assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth);
     268        assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight);
     269      }
     270    }
    268271  }
    269272#endif
    270273