Ticket #429: HM-6.0-dev-r2140-WPPEntryPoint_r1.patch

File HM-6.0-dev-r2140-WPPEntryPoint_r1.patch, 1.9 KB (added by hao, 10 years ago)
  • source/Lib/TLibDecoder/TDecCAVLC.cpp

     
    21522152  }
    21532153  else if ( tilesOrEntropyCodingSyncIdc == 2 ) // wavefront
    21542154  {
    2155     UInt numSubstreams = pps->getNumSubstreams();
     2155    Int numSubstreams = pps->getNumSubstreams();
    21562156    rpcSlice->allocSubstreamSizes(numSubstreams);
    21572157    UInt *pSubstreamSizes       = rpcSlice->getSubstreamSizes();
    2158     for (Int idx=0; idx<numSubstreams; idx++)
     2158    for (Int idx=0; idx<numSubstreams-1; idx++)
    21592159    {
    21602160      if ( idx < numEntryPointOffsets )
    21612161      {
  • source/Lib/TLibEncoder/TEncCavlc.cpp

     
    987987  else if (tilesOrEntropyCodingSyncIdc == 2) // wavefront
    988988  {
    989989    Int  numZeroSubstreamsAtEndOfSlice  = 0;
    990     entryPointOffset                    = new UInt[pSlice->getPPS()->getNumSubstreams()];
    991990    UInt* pSubstreamSizes               = pSlice->getSubstreamSizes();
    992991    // Find number of zero substreams at the end of slice
    993     for (Int idx=pSlice->getPPS()->getNumSubstreams()-1; idx>=0; idx--)
     992    for (Int idx=pSlice->getPPS()->getNumSubstreams()-2; idx>=0; idx--)
    994993    {
    995994      if ( pSubstreamSizes[ idx ] ==  0 )
    996995      {
     
    10011000        break;
    10021001      }
    10031002    }
    1004     numEntryPointOffsets       = pSlice->getPPS()->getNumSubstreams() - numZeroSubstreamsAtEndOfSlice;
     1003    numEntryPointOffsets       = pSlice->getPPS()->getNumSubstreams() - 1 - numZeroSubstreamsAtEndOfSlice;
     1004    entryPointOffset           = new UInt[numEntryPointOffsets];
    10051005    for (Int idx=0; idx<numEntryPointOffsets; idx++)
    10061006    {
    10071007      entryPointOffset[ idx ] = ( pSubstreamSizes[ idx ] >> 3 ) ;