Changeset 1265 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
14 Jul 2015, 03:43:14 (10 years ago)
Author:
seregin
Message:

port rev 4262

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1264 r1265  
    385385              UInt tableSizeMinus1 = 0;
    386386              READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1");
    387               /* skip zero index */
    388               for (Int chromaQpAdjustmentIndex = 1; chromaQpAdjustmentIndex <= (tableSizeMinus1 + 1); chromaQpAdjustmentIndex++)
     387              assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE);
     388
     389              for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++)
    389390              {
    390391                Int cbOffset;
     
    394395                READ_SVLC(crOffset, "cr_qp_offset_list[i]");
    395396                assert(crOffset >= -12 && crOffset <= 12);
    396                 pcPPS->setChromaQpAdjTableAt(chromaQpAdjustmentIndex, cbOffset, crOffset);
     397                // table uses +1 for index (see comment inside the function)
     398                pcPPS->setChromaQpAdjTableAt(cuChromaQpOffsetIdx+1, cbOffset, crOffset);
    397399              }
    398400              assert(pcPPS->getChromaQpAdjTableSize() == tableSizeMinus1 + 1);
Note: See TracChangeset for help on using the changeset viewer.