Ticket #1464: fix_localRPS.patch

File fix_localRPS.patch, 1.4 KB (added by Tomohiro Ikai, 4 years ago)
  • source/Lib/TLibCommon/TypeDef.h

     
    3838#ifndef __TYPEDEF__
    3939#define __TYPEDEF__
    4040
     41#define FIX_LOCAL_RPS                                     2 ///< fix localRPS usage in arrangeLongtermPicturesInRPS
     42
    4143#ifndef __COMMONDEF__
    4244#error Include CommonDef.h not TypeDef.h
    4345#endif
  • source/Lib/TLibEncoder/TEncGOP.cpp

     
    25112511  {
    25122512    return;
    25132513  }
     2514#if FIX_LOCAL_RPS == 1
     2515  TComReferencePictureSet *rps = pcSlice->getRPS();
     2516#elif FIX_LOCAL_RPS == 2
     2517  TComReferencePictureSet *rps = pcSlice->getLocalRPS();
     2518  if (pcSlice->getRPSidx() != -1)
     2519  {
     2520//  (*rps)=TComReferencePictureSet();
     2521    memcpy(rps, pcSlice->getRPS(), sizeof(TComReferencePictureSet));
     2522    pcSlice->setRPS(rps);
     2523    pcSlice->setRPSidx(-1);
     2524  }
     2525#else
    25142526  // we can only modify the local RPS!
    25152527  assert (pcSlice->getRPSidx()==-1);
    25162528  TComReferencePictureSet *rps = pcSlice->getLocalRPS();
     2529#endif
    25172530
    25182531  // Arrange long-term reference pictures in the correct order of LSB and MSB,
    25192532  // and assign values for pocLSBLT and MSB present flag