Changeset 125 in SHVCSoftware for trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
- Timestamp:
- 16 Apr 2013, 06:39:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r2 r125 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2013, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 123 123 } 124 124 125 /** Encode # of subsequent IPCM blocks.126 * \param numSubseqIPCM127 * \returns Void128 */129 Void TEncBinCABAC::encodeNumSubseqIPCM( Int numSubseqIPCM )130 {131 finish();132 m_pcTComBitIf->write( 1, 1 ); // stop bit133 134 m_pcTComBitIf->write( numSubseqIPCM ? 1 : 0, 1);135 136 if ( numSubseqIPCM > 0)137 {138 Bool bCodeLast = ( 3 > numSubseqIPCM );139 140 while( --numSubseqIPCM )141 {142 m_pcTComBitIf->write( 1, 1 );143 }144 if( bCodeLast )145 {146 m_pcTComBitIf->write( 0, 1 );147 }148 }149 }150 151 125 /** Encode PCM alignment zero bits. 152 126 * \returns Void … … 154 128 Void TEncBinCABAC::encodePCMAlignBits() 155 129 { 130 finish(); 131 m_pcTComBitIf->write(1, 1); 156 132 m_pcTComBitIf->writeAlignZero(); // pcm align zero 157 133 } … … 383 359 } 384 360 385 /** flush bits when CABAC termination386 * \param [in] bEnd true means this flushing happens at the end of RBSP. No need to encode stop bit387 */388 Void TEncBinCABAC::encodeFlush(Bool bEnd)389 {390 m_uiRange = 2;391 392 m_uiLow += 2;393 m_uiLow <<= 7;394 m_uiRange = 2 << 7;395 m_bitsLeft -= 7;396 testAndWriteOut();397 finish();398 399 if(!bEnd)400 {401 m_pcTComBitIf->write( 1, 1 ); // stop bit402 }403 }404 405 361 //! \}
Note: See TracChangeset for help on using the changeset viewer.