Ticket #1419: ticket_1419.patch

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

     
    11011101  bReusedPrev = (Bool*)xMalloc(Bool, uiMaxPLTPredSize + 1);
    11021102  memset(bPredicted, 0, sizeof(Bool)*(uiMaxPLTSize + 1));
    11031103  memset(bReusedPrev, 0, sizeof(Bool)*(uiMaxPLTPredSize + 1));
     1104
     1105#if FIX_PLT_REORDER
     1106  Int uiNumPLTRceived = uiDictMaxSize;
     1107  UInt uiNumPLTPredicted = 0;
     1108
     1109  for (uiIdxCurr = 0; uiIdxCurr < uiDictMaxSize; uiIdxCurr++)
     1110#else
    11041111  UInt uiNumPLTRceived = uiDictMaxSize, uiNumPLTPredicted = 0;
    11051112  for (uiIdxPrev = 0; uiIdxPrev < uiPLTSizePrev; uiIdxPrev++)
     1113#endif
    11061114  {
    11071115    bReused = false;
    11081116    Int iCounter = 0;
     1117
     1118#if FIX_PLT_REORDER
     1119    for (uiIdxPrev = 0; uiIdxPrev < uiPLTSizePrev; uiIdxPrev++)
     1120#else
    11091121    for (uiIdxCurr = 0; uiIdxCurr < uiDictMaxSize; uiIdxCurr++)
     1122#endif
    11101123    {
    11111124      iCounter = 0;
    11121125
     
    11311144      uiNumPLTPredicted++;
    11321145    }
    11331146  }
     1147
     1148#if FIX_PLT_REORDER
     1149  assert( uiNumPLTRceived >= 0 );
     1150  assert( uiNumPLTPredicted <= uiDictMaxSize );
     1151#endif
     1152
    11341153  for (uiIdxPrev = 0; uiIdxPrev < uiMaxPLTPredSize; uiIdxPrev++)
    11351154  {
    11361155    for (UInt comp = compBegin; comp < compBegin + uiNumComp; comp++)
  • Lib/TLibCommon/TypeDef.h

     
    4545#include <vector>
    4646#include <cstdlib>
    4747
     48#define FIX_PLT_REORDER         1
     49
    4850//! \ingroup TLibCommon
    4951//! \{
    5052