Ticket #1064: TComPrediction.patch

File TComPrediction.patch, 1.6 KB (added by pieterkapsenberg, 9 years ago)
  • source/Lib/TLibCommon/TComPrediction.cpp

     
    7878  }
    7979}
    8080
     81#if 1
    8182Void TComPrediction::initTempBuff()
    8283{
    8384  if( m_piYuvExt == NULL )
    8485  {
     86    Int extWidth  = MAX_CU_SIZE + 16;
     87    Int extHeight = MAX_CU_SIZE + 1;
     88    Int i, j;
     89    for (i = 0; i < 4; i++)
     90    {
     91      m_filteredBlockTmp[i].create(extWidth, extHeight + 7);
     92      for (j = 0; j < 4; j++)
     93      {
     94        m_filteredBlock[i][j].create(extWidth, extHeight);
     95      }
     96    }
     97    m_iYuvExtHeight  = ((MAX_CU_SIZE + 2) << 4);
     98    m_iYuvExtStride = ((MAX_CU_SIZE  + 8) << 4);
     99    m_piYuvExt = new Int[ m_iYuvExtStride * m_iYuvExtHeight ];
     100
     101    // new structure
     102    m_acYuvPred[0] .create( MAX_CU_SIZE, MAX_CU_SIZE );
     103    m_acYuvPred[1] .create( MAX_CU_SIZE, MAX_CU_SIZE );
     104
     105    m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE );
     106  }
     107
     108  if (m_iLumaRecStride != (MAX_CU_SIZE>>1) + 1)
     109  {
     110    m_iLumaRecStride =  (MAX_CU_SIZE>>1) + 1;
     111    if (!m_pLumaRecBuffer)
     112    {
     113      m_pLumaRecBuffer = new Pel[ m_iLumaRecStride * m_iLumaRecStride ];
     114    }
     115  }
     116}
     117#else
     118Void TComPrediction::initTempBuff()
     119{
     120  if( m_piYuvExt == NULL )
     121  {
    85122    Int extWidth  = g_uiMaxCUWidth + 16;
    86123    Int extHeight = g_uiMaxCUHeight + 1;
    87124    Int i, j;
     
    113150    }
    114151  }
    115152}
     153#endif
    116154
    117155// ====================================================================================================================
    118156// Public member functions