Grok 20.3.2
grk::t1::CodeblockCompress Struct Reference

Stores information about compression code block. More...

#include <CodeblockCompress.h>

Inheritance diagram for grk::t1::CodeblockCompress:
grk::t1::Codeblock grk::Rect32_16

Public Member Functions

 CodeblockCompress (uint16_t numLayers)
 Constructs a CodeblockCompress This struct is a wrapper for CodeblockCompressImpl, where the implementation lies.
 ~CodeblockCompress ()
 Destorys a CodeblockCompress.
uint8_t getNumPassesInLayer (uint16_t layno)
 Gets number of passes in layer.
void setNumPassesInLayer (uint16_t layno, uint8_t passes)
 Sets number of passes in layer.
void incNumPassesInLayer (uint16_t layno, uint8_t delta)
 Increments the number of passes in layer.
Buffer8getCompressedStream (void)
 Gets compressed stream.
uint8_t numbps (void)
 Gets number of bit planes in code block.
void setNumBps (uint8_t bps)
 Sets number of bit planes in code blocks.
uint8_t numlenbits ()
 Gets number of length bits, used to calculate length of code block in bytes.
void setNumLenBits (uint8_t bits)
 Sets number of length bits, used to calculate length of code block in bytes.
void init ()
 Initializes the code block - allocates resources.
bool allocData (size_t nominalBlockSize)
 Allocates data memory for a compression code block.
CodePassgetPass (uint8_t passno)
uint8_t getNumPasses (void)
void setNumPasses (uint8_t numPasses)
CodePassgetLastPass (void)
LayergetLayer (uint16_t layno)
uint8_t * getPaddedCompressedStream (void)
void setPaddedCompressedStream (uint8_t *stream)
uint8_t getNumPassesInPreviousLayers (void)
void setNumPassesInPreviousLayers (uint8_t numPasses)
CodeblockCompressImplgetImpl (void)
Public Member Functions inherited from grk::Rect32_16
 Rect32_16 (uint32_t x0, uint32_t y0, uint16_t w, uint16_t h)
 Rect32_16 (void)
virtual ~Rect32_16 ()=default
uint32_t x0 (void) const
uint32_t y0 (void) const
uint32_t x1 (void) const
uint32_t y1 (void) const
uint16_t width () const
uint16_t height () const
bool valid () const
bool empty (void) const
uint32_t area (void) const
Rect32_16 intersection (const Rect32_16 *rhs) const
void setRect (const Rect32_16 *rhs)
void setRect (const Rect32_16 rhs)
virtual void print (void) const

Private Member Functions

 CodeblockCompress (const CodeblockCompress &rhs)=delete
CodeblockCompressoperator= (const CodeblockCompress &rhs)=delete

Private Attributes

CodeblockCompressImplimpl_

Additional Inherited Members

Protected Member Functions inherited from grk::t1::Codeblock
 Codeblock (uint16_t numLayers)
 Creates a Codeblock.
 ~Codeblock ()=default
 Destroys a Codeblock.
Protected Attributes inherited from grk::t1::Codeblock
uint16_t numLayers_
 Number of layers in code block.

Detailed Description

Stores information about compression code block.

Constructor & Destructor Documentation

◆ CodeblockCompress() [1/2]

grk::t1::CodeblockCompress::CodeblockCompress ( uint16_t numLayers)
inlineexplicit

Constructs a CodeblockCompress This struct is a wrapper for CodeblockCompressImpl, where the implementation lies.

Parameters
numlayersNumber of layers in code block

References grk::t1::Codeblock::Codeblock(), and impl_.

Referenced by CodeblockCompress(), and operator=().

◆ ~CodeblockCompress()

grk::t1::CodeblockCompress::~CodeblockCompress ( )
inline

Destorys a CodeblockCompress.

References impl_.

◆ CodeblockCompress() [2/2]

grk::t1::CodeblockCompress::CodeblockCompress ( const CodeblockCompress & rhs)
explicitprivatedelete

References CodeblockCompress().

Member Function Documentation

◆ allocData()

bool grk::t1::CodeblockCompress::allocData ( size_t nominalBlockSize)
inline

Allocates data memory for a compression code block.

We actually allocate 2 more bytes than specified, and then offset data by +2. This is done so that we can safely initialize the MQ coder pointer to data-1, without risk of accessing uninitialized memory.

Parameters
nominalBlockSizenominal block size - actual size may be smaller
Returns

References grk::t1::CodeblockCompressImpl::allocData(), and getImpl().

◆ getCompressedStream()

Buffer8 * grk::t1::CodeblockCompress::getCompressedStream ( void )
inline

Gets compressed stream.

Returns
Buffer8 containing compressed stream

References grk::t1::CodeblockImpl::getCompressedStream(), and getImpl().

Referenced by grk::compress_synch_with_plugin().

◆ getImpl()

◆ getLastPass()

CodePass * grk::t1::CodeblockCompress::getLastPass ( void )
inline

◆ getLayer()

Layer * grk::t1::CodeblockCompress::getLayer ( uint16_t layno)
inline

◆ getNumPasses()

uint8_t grk::t1::CodeblockCompress::getNumPasses ( void )
inline

◆ getNumPassesInLayer()

uint8_t grk::t1::CodeblockCompress::getNumPassesInLayer ( uint16_t layno)
inline

Gets number of passes in layer.

Parameters
laynoLayer number

References getImpl(), and grk::t1::CodeblockImpl::getNumPassesInLayer().

◆ getNumPassesInPreviousLayers()

uint8_t grk::t1::CodeblockCompress::getNumPassesInPreviousLayers ( void )
inline

◆ getPaddedCompressedStream()

uint8_t * grk::t1::CodeblockCompress::getPaddedCompressedStream ( void )
inline

◆ getPass()

CodePass * grk::t1::CodeblockCompress::getPass ( uint8_t passno)
inline

◆ incNumPassesInLayer()

void grk::t1::CodeblockCompress::incNumPassesInLayer ( uint16_t layno,
uint8_t delta )
inline

Increments the number of passes in layer.

Parameters
laynoLayer number
deltaChange in number of passes in layer

References getImpl(), and grk::t1::CodeblockImpl::incNumPassesInLayer().

◆ init()

void grk::t1::CodeblockCompress::init ( )
inline

Initializes the code block - allocates resources.

References getImpl(), and grk::t1::CodeblockCompressImpl::init().

◆ numbps()

uint8_t grk::t1::CodeblockCompress::numbps ( void )
inline

Gets number of bit planes in code block.

Returns
number of bit planes

References getImpl(), and grk::t1::CodeblockImpl::numbps().

◆ numlenbits()

uint8_t grk::t1::CodeblockCompress::numlenbits ( )
inline

Gets number of length bits, used to calculate length of code block in bytes.

Returns
number of length bits

References getImpl(), and grk::t1::CodeblockImpl::numlenbits().

◆ operator=()

CodeblockCompress & grk::t1::CodeblockCompress::operator= ( const CodeblockCompress & rhs)
privatedelete

References CodeblockCompress().

◆ setNumBps()

void grk::t1::CodeblockCompress::setNumBps ( uint8_t bps)
inline

Sets number of bit planes in code blocks.

Parameters
bpsnumber of bit planes

References getImpl(), and grk::t1::CodeblockImpl::setNumBps().

Referenced by grk::t1::ojph::T1OJPH::compress(), and grk::compress_synch_with_plugin().

◆ setNumLenBits()

void grk::t1::CodeblockCompress::setNumLenBits ( uint8_t bits)
inline

Sets number of length bits, used to calculate length of code block in bytes.

Parameters
bitsnumber of length bits

References getImpl(), and grk::t1::CodeblockImpl::setNumLenBits().

◆ setNumPasses()

void grk::t1::CodeblockCompress::setNumPasses ( uint8_t numPasses)
inline

◆ setNumPassesInLayer()

void grk::t1::CodeblockCompress::setNumPassesInLayer ( uint16_t layno,
uint8_t passes )
inline

Sets number of passes in layer.

Parameters
laynoLayer number
passesNumber of passes

References getImpl(), and grk::t1::CodeblockImpl::setNumPassesInLayer().

◆ setNumPassesInPreviousLayers()

void grk::t1::CodeblockCompress::setNumPassesInPreviousLayers ( uint8_t numPasses)
inline

◆ setPaddedCompressedStream()

void grk::t1::CodeblockCompress::setPaddedCompressedStream ( uint8_t * stream)
inline

Member Data Documentation

◆ impl_

CodeblockCompressImpl* grk::t1::CodeblockCompress::impl_
private

The documentation for this struct was generated from the following file: