HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
TComInputBitstream Class Reference

#include <TComBitStream.h>

Collaboration diagram for TComInputBitstream:
Collaboration graph
[legend]

Public Member Functions

virtual ~TComInputBitstream ()
 
Void readByte (UInt &ruiBits)
 
Void peekPreviousByte (UInt &byte)
 
UChar getHeldBits ()
 
TComOutputBitstreamoperator= (const TComOutputBitstream &src)
 
UInt getByteLocation ()
 
UInt peekBits (UInt uiBits)
 
UInt read (UInt numberOfBits)
 
UInt readByte ()
 
UInt getNumBitsUntilByteAligned ()
 
UInt getNumBitsLeft ()
 
UInt getNumBitsRead ()
 
Void pushEmulationPreventionByteLocation (UInt pos)
 
UInt numEmulationPreventionBytesRead ()
 
const std::vector< UInt > & getEmulationPreventionByteLocation () const
 
UInt getEmulationPreventionByteLocation (UInt idx)
 
Void clearEmulationPreventionByteLocation ()
 
Void setEmulationPreventionByteLocation (const std::vector< UInt > &vec)
 
const std::vector< uint8_t > & getFifo () const
 
std::vector< uint8_t > & getFifo ()
 
 TComInputBitstream ()
 
 TComInputBitstream (const TComInputBitstream &src)
 
Void resetToStart ()
 
Void pseudoRead (UInt uiNumberOfBits, UInt &ruiBits)
 
Void read (UInt uiNumberOfBits, UInt &ruiBits)
 
UInt readOutTrailingBits ()
 
TComInputBitstreamextractSubstream (UInt uiNumBits)
 
UInt readByteAlignment ()
 

Protected Attributes

std::vector< uint8_t > m_fifo
 
std::vector< UIntm_emulationPreventionByteLocation
 FIFO for storage of complete bytes. More...
 
UInt m_fifo_idx
 
UInt m_num_held_bits
 Read index into m_fifo. More...
 
UChar m_held_bits
 
UInt m_numBitsRead
 

Detailed Description

Model of an input bitstream that extracts bits from a predefined bytestream.

Definition at line 164 of file TComBitStream.h.

Constructor & Destructor Documentation

TComInputBitstream::TComInputBitstream ( )

Create a new bitstream reader object that reads from buf.

Definition at line 63 of file TComBitStream.cpp.

virtual TComInputBitstream::~TComInputBitstream ( )
inlinevirtual

Definition at line 181 of file TComBitStream.h.

TComInputBitstream::TComInputBitstream ( const TComInputBitstream src)

Definition at line 72 of file TComBitStream.cpp.

Member Function Documentation

Void TComInputBitstream::clearEmulationPreventionByteLocation ( )
inline

Definition at line 222 of file TComBitStream.h.

TComInputBitstream * TComInputBitstream::extractSubstream ( UInt  uiNumBits)

Extract substream from the current bitstream.

Parameters
uiNumBitsnumber of bits to transfer

Definition at line 358 of file TComBitStream.cpp.

UInt TComInputBitstream::getByteLocation ( )
inline

Definition at line 204 of file TComBitStream.h.

const std::vector<UInt>& TComInputBitstream::getEmulationPreventionByteLocation ( ) const
inline

Definition at line 220 of file TComBitStream.h.

UInt TComInputBitstream::getEmulationPreventionByteLocation ( UInt  idx)
inline

Definition at line 221 of file TComBitStream.h.

const std::vector<uint8_t>& TComInputBitstream::getFifo ( ) const
inline

Definition at line 225 of file TComBitStream.h.

std::vector<uint8_t>& TComInputBitstream::getFifo ( )
inline

Definition at line 226 of file TComBitStream.h.

UChar TComInputBitstream::getHeldBits ( )
inline

Definition at line 202 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsLeft ( )
inline

Definition at line 213 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsRead ( )
inline

Definition at line 215 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsUntilByteAligned ( )
inline

Definition at line 212 of file TComBitStream.h.

UInt TComInputBitstream::numEmulationPreventionBytesRead ( )
inline

Definition at line 219 of file TComBitStream.h.

TComOutputBitstream& TComInputBitstream::operator= ( const TComOutputBitstream src)
UInt TComInputBitstream::peekBits ( UInt  uiBits)
inline

Definition at line 207 of file TComBitStream.h.

Void TComInputBitstream::peekPreviousByte ( UInt byte)
inline

Definition at line 195 of file TComBitStream.h.

Void TComInputBitstream::pseudoRead ( UInt  uiNumberOfBits,
UInt ruiBits 
)

read uiNumberOfBits from bitstream without updating the bitstream state, storing the result in ruiBits.

If reading uiNumberOfBits would overrun the bitstream buffer, the bitstream is effectively padded with sufficient zero-bits to avoid the overrun.

Definition at line 238 of file TComBitStream.cpp.

Void TComInputBitstream::pushEmulationPreventionByteLocation ( UInt  pos)
inline

Definition at line 218 of file TComBitStream.h.

Void TComInputBitstream::read ( UInt  uiNumberOfBits,
UInt ruiBits 
)

Definition at line 254 of file TComBitStream.cpp.

UInt TComInputBitstream::read ( UInt  numberOfBits)
inline

Definition at line 210 of file TComBitStream.h.

Void TComInputBitstream::readByte ( UInt ruiBits)
inline

Definition at line 189 of file TComBitStream.h.

UInt TComInputBitstream::readByte ( )
inline

Definition at line 211 of file TComBitStream.h.

UInt TComInputBitstream::readByteAlignment ( )

Definition at line 396 of file TComBitStream.cpp.

UInt TComInputBitstream::readOutTrailingBits ( )

Definition at line 329 of file TComBitStream.cpp.

Void TComInputBitstream::resetToStart ( )

Definition at line 85 of file TComBitStream.cpp.

Void TComInputBitstream::setEmulationPreventionByteLocation ( const std::vector< UInt > &  vec)
inline

Definition at line 223 of file TComBitStream.h.

Member Data Documentation

std::vector<UInt> TComInputBitstream::m_emulationPreventionByteLocation
protected

FIFO for storage of complete bytes.

Definition at line 168 of file TComBitStream.h.

std::vector<uint8_t> TComInputBitstream::m_fifo
protected

Definition at line 167 of file TComBitStream.h.

UInt TComInputBitstream::m_fifo_idx
protected

Definition at line 170 of file TComBitStream.h.

UChar TComInputBitstream::m_held_bits
protected

Definition at line 173 of file TComBitStream.h.

UInt TComInputBitstream::m_num_held_bits
protected

Read index into m_fifo.

Definition at line 172 of file TComBitStream.h.

UInt TComInputBitstream::m_numBitsRead
protected

Definition at line 174 of file TComBitStream.h.


The documentation for this class was generated from the following files: