Ticket #1078: max-latency-increase-plus1.patch

File max-latency-increase-plus1.patch, 2.2 KB (added by tajime, 9 years ago)
  • source/Lib/TLibDecoder/TDecCAVLC.cpp

     
    585585#endif
    586586    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    587587    pcSPS->setNumReorderPics(uiCode, i);
    588     READ_UVLC ( uiCode, "sps_max_latency_increase");
    589     pcSPS->setMaxLatencyIncrease( uiCode, i );
     588    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");
     589    pcSPS->setMaxLatencyIncrease( uiCode - 1, i );
    590590
    591591    if (!subLayerOrderingInfoPresentFlag)
    592592    {
     
    711711    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
    712712#endif
    713713    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
    714     READ_UVLC( uiCode,  "vps_max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     714    READ_UVLC( uiCode,  "vps_max_latency_increase_plus1[i]" );      pcVPS->setMaxLatencyIncrease( uiCode - 1, i );
    715715
    716716    if (!subLayerOrderingInfoPresentFlag)
    717717    {
  • source/Lib/TLibEncoder/TEncCavlc.cpp

     
    478478    WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i),           "sps_max_dec_pic_buffering[i]" );
    479479#endif
    480480    WRITE_UVLC( pcSPS->getNumReorderPics(i),               "sps_num_reorder_pics[i]" );
    481     WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i),           "sps_max_latency_increase[i]" );
     481    WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i) + 1,       "sps_max_latency_increase_plus1[i]" );
    482482    if (!subLayerOrderingInfoPresentFlag)
    483483    {
    484484      break;
     
    574574    WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i),           "vps_max_dec_pic_buffering[i]" );
    575575#endif
    576576    WRITE_UVLC( pcVPS->getNumReorderPics(i),               "vps_num_reorder_pics[i]" );
    577     WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i),           "vps_max_latency_increase[i]" );
     577    WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i) + 1,       "vps_max_latency_increase_plus1[i]" );
    578578    if (!subLayerOrderingInfoPresentFlag)
    579579    {
    580580      break;