Ignore:
Timestamp:
16 Apr 2013, 06:39:31 (12 years ago)
Author:
seregin
Message:

copy from HM-10.0-dev-SHM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp

    r2 r125  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2013, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    123123}
    124124
    125 /** Encode # of subsequent IPCM blocks.
    126  * \param numSubseqIPCM
    127  * \returns Void
    128  */
    129 Void TEncBinCABAC::encodeNumSubseqIPCM( Int numSubseqIPCM )
    130 {
    131   finish();
    132   m_pcTComBitIf->write( 1, 1 ); // stop bit
    133 
    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 
    151125/** Encode PCM alignment zero bits.
    152126 * \returns Void
     
    154128Void TEncBinCABAC::encodePCMAlignBits()
    155129{
     130  finish();
     131  m_pcTComBitIf->write(1, 1);
    156132  m_pcTComBitIf->writeAlignZero(); // pcm align zero
    157133}
     
    383359}
    384360
    385 /** flush bits when CABAC termination
    386   * \param [in] bEnd true means this flushing happens at the end of RBSP. No need to encode stop bit
    387   */
    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 bit
    402   }
    403 }
    404 
    405361//! \}
Note: See TracChangeset for help on using the changeset viewer.