Changeset 1349 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 22 Jul 2015, 03:12:10 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1348 r1349 1094 1094 } 1095 1095 1096 hrd->setBitRateScale( 4 ); // in units of 2 ~( 6 + 4 ) = 1,024 bps1097 hrd->setCpbSizeScale( 6 ); // in units of 2 ~( 4 + 4) = 1,024 bit1098 hrd->setDuCpbSizeScale( 6 ); // in units of 2~( 4 + 4) = 1,024 bit1096 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 1099 1099 1100 1100 hrd->setInitialCpbRemovalDelayLengthMinus1(15); // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit … … 1123 1123 hrd->setCpbCntMinus1( i, 0 ); 1124 1124 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 1128 1132 // 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; 1132 1135 1133 1136 for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
Note: See TracChangeset for help on using the changeset viewer.