HEVC Test Model (HM)  HM-16.3
Public Member Functions | Protected Attributes | Private Attributes | List of all members
TComInputBitstream Class Reference

#include <TComBitStream.h>

Collaboration diagram for TComInputBitstream:
Collaboration graph

Public Member Functions

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 ()
std::vector< UIntgetEmulationPreventionByteLocation ()
UInt getEmulationPreventionByteLocation (UInt idx)
Void clearEmulationPreventionByteLocation ()
Void setEmulationPreventionByteLocation (std::vector< UInt > vec)
const std::vector< uint8_t > * getFifo () const
 TComInputBitstream (std::vector< uint8_t > *buf)
 ~TComInputBitstream ()
Void pseudoRead (UInt uiNumberOfBits, UInt &ruiBits)
Void read (UInt uiNumberOfBits, UInt &ruiBits)
UInt readOutTrailingBits ()
TComInputBitstreamextractSubstream (UInt uiNumBits)
Void deleteFifo ()
UInt readByteAlignment ()

Protected Attributes

UInt m_fifo_idx
UInt m_num_held_bits
 Read index into m_fifo. More...
UChar m_held_bits
UInt m_numBitsRead

Private Attributes

std::vector< uint8_t > * m_fifo
std::vector< UIntm_emulationPreventionByteLocation
 FIFO for storage of complete bytes. More...

Detailed Description

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

Definition at line 163 of file TComBitStream.h.

Constructor & Destructor Documentation

TComInputBitstream::TComInputBitstream ( std::vector< uint8_t > *  buf)

Create a new bitstream reader object that reads from buf. Ownership of buf remains with the callee, although the constructed object will hold a reference to buf

Definition at line 62 of file TComBitStream.cpp.

TComInputBitstream::~TComInputBitstream ( )

Definition at line 71 of file TComBitStream.cpp.

Member Function Documentation

Void TComInputBitstream::clearEmulationPreventionByteLocation ( )

Definition at line 221 of file TComBitStream.h.

Void TComInputBitstream::deleteFifo ( )
  • delete internal fifo

Definition at line 367 of file TComBitStream.cpp.

TComInputBitstream * TComInputBitstream::extractSubstream ( UInt  uiNumBits)

Extract substream from the current bitstream.

uiNumBitsnumber of bits to transfer

Definition at line 344 of file TComBitStream.cpp.

UInt TComInputBitstream::getByteLocation ( )

Definition at line 202 of file TComBitStream.h.

std::vector<UInt> TComInputBitstream::getEmulationPreventionByteLocation ( )

Definition at line 219 of file TComBitStream.h.

UInt TComInputBitstream::getEmulationPreventionByteLocation ( UInt  idx)

Definition at line 220 of file TComBitStream.h.

const std::vector<uint8_t>* TComInputBitstream::getFifo ( ) const

Definition at line 224 of file TComBitStream.h.

UChar TComInputBitstream::getHeldBits ( )

Definition at line 200 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsLeft ( )

Definition at line 211 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsRead ( )

Definition at line 214 of file TComBitStream.h.

UInt TComInputBitstream::getNumBitsUntilByteAligned ( )

Definition at line 210 of file TComBitStream.h.

UInt TComInputBitstream::numEmulationPreventionBytesRead ( )

Definition at line 218 of file TComBitStream.h.

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

Definition at line 205 of file TComBitStream.h.

Void TComInputBitstream::peekPreviousByte ( UInt byte)

Definition at line 193 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 224 of file TComBitStream.cpp.

Void TComInputBitstream::pushEmulationPreventionByteLocation ( UInt  pos)

Definition at line 217 of file TComBitStream.h.

Void TComInputBitstream::read ( UInt  uiNumberOfBits,
UInt ruiBits 

Definition at line 240 of file TComBitStream.cpp.

UInt TComInputBitstream::read ( UInt  numberOfBits)

Definition at line 208 of file TComBitStream.h.

Void TComInputBitstream::readByte ( UInt ruiBits)

Definition at line 187 of file TComBitStream.h.

UInt TComInputBitstream::readByte ( )

Definition at line 209 of file TComBitStream.h.

UInt TComInputBitstream::readByteAlignment ( )

Definition at line 373 of file TComBitStream.cpp.

UInt TComInputBitstream::readOutTrailingBits ( )

Definition at line 315 of file TComBitStream.cpp.

Void TComInputBitstream::setEmulationPreventionByteLocation ( std::vector< UInt vec)

Definition at line 222 of file TComBitStream.h.

Member Data Documentation

std::vector<UInt> TComInputBitstream::m_emulationPreventionByteLocation

FIFO for storage of complete bytes.

Definition at line 166 of file TComBitStream.h.

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

Definition at line 165 of file TComBitStream.h.

UInt TComInputBitstream::m_fifo_idx

Definition at line 169 of file TComBitStream.h.

UChar TComInputBitstream::m_held_bits

Definition at line 172 of file TComBitStream.h.

UInt TComInputBitstream::m_num_held_bits

Read index into m_fifo.

Definition at line 171 of file TComBitStream.h.

UInt TComInputBitstream::m_numBitsRead

Definition at line 173 of file TComBitStream.h.

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