Grok  9.5.0
Public Member Functions | Public Attributes | List of all members
grk::CompressCodeblock Struct Reference

#include <Codeblock.h>

Inheritance diagram for grk::CompressCodeblock:
grk::Codeblock grk::grkBuffer2d< int32_t, AllocatorAligned > grk::ICacheable grk::grkBuffer< T, A > grk::grkRect< uint32_t >

Public Member Functions

 CompressCodeblock ()
 
virtual ~CompressCodeblock ()
 
bool init ()
 
bool allocData (size_t nominalBlockSize)
 Allocates data memory for an compressing code block. More...
 
- Public Member Functions inherited from grk::Codeblock
 Codeblock ()
 
virtual ~Codeblock ()
 
 Codeblock (const Codeblock &rhs)
 
Codeblockoperator= (const Codeblock &rhs)
 
void setRect (grkRectU32 r)
 
- Public Member Functions inherited from grk::grkBuffer2d< int32_t, AllocatorAligned >
 grkBuffer2d (int32_t *buffer, bool ownsData, uint32_t w, uint32_t strd, uint32_t h)
 
 grkBuffer2d (uint32_t w, uint32_t strd, uint32_t h)
 
 grkBuffer2d (uint32_t w, uint32_t h)
 
 grkBuffer2d (const grkRectU32 *b)
 
 grkBuffer2d (void)
 
 grkBuffer2d (const grkBuffer2d &rhs)
 
grkBuffer2doperator= (const grkBuffer2d &rhs)
 
grkBuffer2doperator= (const grkBuffer2d *rhs)
 
virtual ~grkBuffer2d ()=default
 
bool alloc2d (bool clear)
 
void attach (int32_t *buffer, uint32_t strd)
 
void acquire (int32_t *buffer, uint32_t strd)
 
void transfer (int32_t **buffer, uint32_t *strd)
 
bool isWindowValid (grkRectU32 win)
 Returns whether window bounds are valid (non empty and within buffer bounds) More...
 
bool read (grkRectU32 window, int32_t *dest, const uint32_t destColStride, const uint32_t destStride)
 Read the contents of a rectangular window into a user buffer. More...
 
bool write (grkRectU32 window, const int32_t *src, const uint32_t srcColStride, const uint32_t srcStride)
 Write the contents of a rectangular window from a user buffer. More...
 
bool copy_data (int32_t *dest, uint32_t dest_w, uint32_t dest_h, uint32_t dest_stride) const
 
void copy (const grkBuffer2d &rhs, F filter)
 
int32_t * getBuffer (void) const
 
- Public Member Functions inherited from grk::grkRect< uint32_t >
 grkRect (uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
 
 grkRect (const grkRect &rhs)
 
 grkRect (void)
 
void print (void) const
 
std::string boundsString ()
 
bool is_valid (void) const
 
bool non_empty (void) const
 
bool contains (grkPoint< uint32_t > pt)
 
grkRect< uint32_t > & operator= (const grkRect< uint32_t > &rhs)
 
grkRect< uint32_t > & operator= (const grkRect< uint32_t > *rhs)
 
bool operator== (const grkRect< uint32_t > &rhs) const
 
void set (grkRect< uint32_t > *rhs)
 
void set (grkRect< uint32_t > rhs)
 
grkRect< uint32_t > rectceildivpow2 (uint32_t power) const
 
grkRect< uint32_t > rectceildiv (uint32_t den) const
 
grkRect< uint32_t > rectceildiv (uint32_t denx, uint32_t deny) const
 
grkRect< uint32_t > intersection (const grkRect< uint32_t > rhs) const
 
grkRect< uint32_t > intersection (const grkRect< uint32_t > *rhs) const
 
bool isContainedIn (const grkRect< uint32_t > rhs) const
 
void clip (const grkRect< uint32_t > *rhs)
 
bool non_empty_intersection (const grkRect< uint32_t > *rhs) const
 
grkRect< uint32_t > rectUnion (const grkRect< uint32_t > *rhs) const
 
grkRect< uint32_t > rectUnion (const grkRect< uint32_t > &rhs) const
 
uint64_t area (void) const
 
uint32_t width () const
 
uint32_t height () const
 
grkLine< uint32_t > dimX ()
 
grkLine< uint32_t > dimY ()
 
grkRect< uint32_t > pan (int64_t x, int64_t y) const
 
void panInplace (int64_t x, int64_t y)
 
grkRect< uint32_t > & grow (uint32_t boundary)
 
grkRect< uint32_t > & grow (uint32_t boundaryx, uint32_t boundaryy)
 
grkRect< uint32_t > & grow (uint32_t boundary, uint32_t maxX, uint32_t maxY)
 
grkRect< uint32_t > & grow (uint32_t boundaryx, uint32_t boundaryy, uint32_t maxX, uint32_t maxY)
 
grkRect< uint32_t > & grow (uint32_t boundary, grkRect< uint32_t > bounds)
 
grkRect< uint32_t > & grow (uint32_t boundaryx, uint32_t boundaryy, grkRect< uint32_t > bounds)
 
uint32_t parityX (void)
 
uint32_t parityY (void)
 
- Public Member Functions inherited from grk::ICacheable
 ICacheable ()
 
virtual ~ICacheable ()=default
 
bool isOpen (void)
 
bool isClosed (void)
 
bool isError (void)
 
void setCacheState (GrkCacheState state)
 

Public Attributes

uint8_t * paddedCompressedStream
 
Layerlayers
 
CodePasspasses
 
uint32_t numPassesInPreviousPackets
 
uint32_t numPassesTotal
 
uint32_t * contextStream
 
- Public Attributes inherited from grk::Codeblock
grkBufferU8 compressedStream
 
uint8_t numbps
 
uint8_t numlenbits
 
uint32_t numPassesInPacket
 
- Public Attributes inherited from grk::grkBuffer2d< int32_t, AllocatorAligned >
uint32_t stride
 
- Public Attributes inherited from grk::grkRect< uint32_t >
uint32_t x0
 
uint32_t y0
 
uint32_t x1
 
uint32_t y1
 

Constructor & Destructor Documentation

◆ CompressCodeblock()

grk::CompressCodeblock::CompressCodeblock ( )
inline

◆ ~CompressCodeblock()

virtual grk::CompressCodeblock::~CompressCodeblock ( )
inlinevirtual

Member Function Documentation

◆ allocData()

bool grk::CompressCodeblock::allocData ( size_t  nominalBlockSize)
inline

Allocates data memory for an compressing 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.

References grk::grkBuffer< T, A >::buf, grk::Codeblock::compressedStream, grk_cblk_enc_compressed_data_pad_left, grk::grkBuffer< T, A >::len, grk::grkBuffer< T, A >::owns_data, and paddedCompressedStream.

◆ init()

bool grk::CompressCodeblock::init ( )
inline

Member Data Documentation

◆ contextStream

uint32_t* grk::CompressCodeblock::contextStream

◆ layers

Layer* grk::CompressCodeblock::layers

Referenced by init(), and ~CompressCodeblock().

◆ numPassesInPreviousPackets

uint32_t grk::CompressCodeblock::numPassesInPreviousPackets

◆ numPassesTotal

uint32_t grk::CompressCodeblock::numPassesTotal

◆ paddedCompressedStream

uint8_t* grk::CompressCodeblock::paddedCompressedStream

◆ passes

CodePass* grk::CompressCodeblock::passes

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