Changeset 1349 in SHVCSoftware


Ignore:
Timestamp:
22 Jul 2015, 03:12:10 (9 years ago)
Author:
seregin
Message:

port rev 4427

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1348 r1349  
    10941094  }
    10951095
    1096   hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
    1097   hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
    1098   hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
     1096  hrd->setBitRateScale( 4 );                                       // in units of 2^( 6 + 4 ) = 1,024 bps
     1097  hrd->setCpbSizeScale( 6 );                                       // in units of 2^( 4 + 6 ) = 1,024 bit
     1098  hrd->setDuCpbSizeScale( 6 );                                     // in units of 2^( 4 + 6 ) = 1,024 bit
    10991099
    11001100  hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
     
    11231123    hrd->setCpbCntMinus1( i, 0 );
    11241124
    1125     bitrateValue = bitRate;
    1126     cpbSizeValue = bitRate;                                     // 1 second
    1127     // DU CPB size could be smaller, but we don't know how
     1125    //! \todo check for possible PTL violations
     1126    // BitRate[ i ] = ( bit_rate_value_minus1[ i ] + 1 ) * 2^( 6 + bit_rate_scale )
     1127    bitrateValue = bitRate / (1 << (6 + hrd->getBitRateScale()) );      // bitRate is in bits, so it needs to be scaled down
     1128    // CpbSize[ i ] = ( cpb_size_value_minus1[ i ] + 1 ) * 2^( 4 + cpb_size_scale )
     1129    cpbSizeValue = bitRate / (1 << (4 + hrd->getCpbSizeScale()) );      // using bitRate results in 1 second CPB size
     1130
     1131    // DU CPB size could be smaller (i.e. bitrateValue / number of DUs), but we don't know
    11281132    // in how many DUs the slice segment settings will result
    1129     // (used to be: bitRate/numDU)
    1130     duCpbSizeValue = bitRate;
    1131     duBitRateValue = bitRate;
     1133    duCpbSizeValue = bitrateValue;
     1134    duBitRateValue = cpbSizeValue;
    11321135
    11331136    for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
Note: See TracChangeset for help on using the changeset viewer.