Ticket #1227: num_reorder_pic_assert.patch

File num_reorder_pic_assert.patch, 1.1 KB (added by Smarter, 11 years ago)
  • source/Lib/TLibDecoder/TDecCAVLC.cpp

    diff --git a/source/Lib/TLibDecoder/TDecCAVLC.cpp b/source/Lib/TLibDecoder/TDecCAVLC.cpp
    index 819939d..d4af0db 100644
    a b Void TDecCavlc::parseSPS(TComSPS* pcSPS) 
    546546    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    547547    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    548548    pcSPS->setNumReorderPics(uiCode, i);
     549    assert(pcSPS->getNumReorderPics(i) <= pcSPS->getMaxDecPicBuffering(i) - 1);
    549550    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");
    550551    pcSPS->setMaxLatencyIncrease( uiCode, i );
    551552
    Void TDecCavlc::parseVPS(TComVPS* pcVPS) 
    672673  {
    673674    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
    674675    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
     676    assert(pcVPS->getNumReorderPics(i) <= pcVPS->getMaxDecPicBuffering(i) - 1);
    675677    READ_UVLC( uiCode,  "vps_max_latency_increase_plus1[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
    676678
    677679    if (!subLayerOrderingInfoPresentFlag)