Grok  9.7.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
grk::TileComponentWindowBuffer< T > Struct Template Reference

#include <TileComponentWindowBuffer.h>

Public Member Functions

 TileComponentWindowBuffer (bool isCompressor, bool lossless, bool wholeTileDecompress, grk_rect32 tileCompUnreduced, grk_rect32 tileCompReduced, grk_rect32 unreducedTileCompOrImageCompWindow, Resolution *tileCompResolution, uint8_t numresolutions, uint8_t reducedNumResolutions)
 
 ~TileComponentWindowBuffer ()
 
void toRelativeCoordinates (uint8_t resno, eBandOrientation orientation, uint32_t &offsetx, uint32_t &offsety) const
 Transform code block offsets from canvas coordinates to either band coordinates (relative to sub band origin) or buffer coordinates (relative to associated resolution origin) More...
 
const grk_buf2d< T, AllocatorAligned > * getCodeBlockDestWindowREL (uint8_t resno, eBandOrientation orientation) const
 Get code block destination window. More...
 
const grk_buf2d< T, AllocatorAligned > * getBandWindowBufferPaddedREL (uint8_t resno, eBandOrientation orientation) const
 Get padded band window buffer. More...
 
const grk_rect32getBandWindowPadded (uint8_t resno, eBandOrientation orientation) const
 Get padded band window. More...
 
const grk_rect32getResWindowPadded (uint8_t resno) const
 
const grk_buf2d< T, AllocatorAligned > * getResWindowBufferSplitREL (uint8_t resno, eSplitOrientation orientation) const
 
const grk_buf2d< T, AllocatorAligned > * getResWindowBufferREL (uint32_t resno) const
 Get resolution window. More...
 
grk_buf2d< T, AllocatorAligned > * getResWindowBufferHighestREL (void) const
 Get highest resolution window. More...
 
bool alloc ()
 
grk_rect32 bounds () const
 Get bounds of tile component (canvas coordinates) decompress: reduced canvas coordinates of window compress: unreduced canvas coordinates of entire tile. More...
 
grk_rect32 unreducedBounds () const
 
uint64_t stridedArea (void) const
 
void attach (T *buffer, uint32_t stride)
 
void transfer (T **buffer, uint32_t *stride)
 

Private Member Functions

bool useBandWindows () const
 
bool useBufferCoordinatesForCodeblock () const
 
uint8_t getBandIndex (uint8_t resno, eBandOrientation orientation) const
 

Private Attributes

grk_rect32 unreducedBounds_
 
grk_rect32 bounds_
 
std::vector< Resolution * > resolution_
 
std::vector< ResWindowBuffer< T > * > resWindowBuffers
 
uint8_t numResolutions_
 
bool compress_
 
bool wholeTileDecompress_
 

Constructor & Destructor Documentation

◆ TileComponentWindowBuffer()

template<typename T >
grk::TileComponentWindowBuffer< T >::TileComponentWindowBuffer ( bool  isCompressor,
bool  lossless,
bool  wholeTileDecompress,
grk_rect32  tileCompUnreduced,
grk_rect32  tileCompReduced,
grk_rect32  unreducedTileCompOrImageCompWindow,
Resolution tileCompResolution,
uint8_t  numresolutions,
uint8_t  reducedNumResolutions 
)
inline

◆ ~TileComponentWindowBuffer()

template<typename T >
grk::TileComponentWindowBuffer< T >::~TileComponentWindowBuffer ( )
inline

Member Function Documentation

◆ alloc()

template<typename T >
bool grk::TileComponentWindowBuffer< T >::alloc ( )
inline

◆ attach()

template<typename T >
void grk::TileComponentWindowBuffer< T >::attach ( T *  buffer,
uint32_t  stride 
)
inline

◆ bounds()

template<typename T >
grk_rect32 grk::TileComponentWindowBuffer< T >::bounds ( ) const
inline

Get bounds of tile component (canvas coordinates) decompress: reduced canvas coordinates of window compress: unreduced canvas coordinates of entire tile.

References grk::TileComponentWindowBuffer< T >::bounds_.

Referenced by grk::GrkImage::duplicate(), and grk::TileProcessor::isWholeTileDecompress().

◆ getBandIndex()

template<typename T >
uint8_t grk::TileComponentWindowBuffer< T >::getBandIndex ( uint8_t  resno,
eBandOrientation  orientation 
) const
inlineprivate

◆ getBandWindowBufferPaddedREL()

template<typename T >
const grk_buf2d<T, AllocatorAligned>* grk::TileComponentWindowBuffer< T >::getBandWindowBufferPaddedREL ( uint8_t  resno,
eBandOrientation  orientation 
) const
inline

Get padded band window buffer.

Parameters
resnoresolution number
orientationband orientation {0,1,2,3} for {LL,HL,LH,HH} band windows

If resno is > 0, return LL,HL,LH or HH band window, otherwise return LL resolution window

References grk::BAND_ORIENT_LL, grk::TileComponentWindowBuffer< T >::compress_, grk::TileComponentWindowBuffer< T >::resolution_, grk::TileComponentWindowBuffer< T >::resWindowBuffers, and grk::TileComponentWindowBuffer< T >::wholeTileDecompress_.

Referenced by grk::TileComponentWindowBuffer< T >::getCodeBlockDestWindowREL().

◆ getBandWindowPadded()

template<typename T >
const grk_rect32* grk::TileComponentWindowBuffer< T >::getBandWindowPadded ( uint8_t  resno,
eBandOrientation  orientation 
) const
inline

Get padded band window.

Parameters
resnoresolution number
orientationband orientation {0,1,2,3} for {LL,HL,LH,HH} band windows

References grk::TileComponentWindowBuffer< T >::resWindowBuffers.

Referenced by grk::TileComponent::allocSparseCanvas(), and grk::TileComponent::subbandIntersectsAOI().

◆ getCodeBlockDestWindowREL()

template<typename T >
const grk_buf2d<T, AllocatorAligned>* grk::TileComponentWindowBuffer< T >::getCodeBlockDestWindowREL ( uint8_t  resno,
eBandOrientation  orientation 
) const
inline

◆ getResWindowBufferHighestREL()

template<typename T >
grk_buf2d<T, AllocatorAligned>* grk::TileComponentWindowBuffer< T >::getResWindowBufferHighestREL ( void  ) const
inline

◆ getResWindowBufferREL()

template<typename T >
const grk_buf2d<T, AllocatorAligned>* grk::TileComponentWindowBuffer< T >::getResWindowBufferREL ( uint32_t  resno) const
inline

Get resolution window.

Parameters
resnoresolution number

References grk::TileComponentWindowBuffer< T >::resWindowBuffers.

◆ getResWindowBufferSplitREL()

template<typename T >
const grk_buf2d<T, AllocatorAligned>* grk::TileComponentWindowBuffer< T >::getResWindowBufferSplitREL ( uint8_t  resno,
eSplitOrientation  orientation 
) const
inline

◆ getResWindowPadded()

template<typename T >
const grk_rect32* grk::TileComponentWindowBuffer< T >::getResWindowPadded ( uint8_t  resno) const
inline

◆ stridedArea()

template<typename T >
uint64_t grk::TileComponentWindowBuffer< T >::stridedArea ( void  ) const
inline

◆ toRelativeCoordinates()

template<typename T >
void grk::TileComponentWindowBuffer< T >::toRelativeCoordinates ( uint8_t  resno,
eBandOrientation  orientation,
uint32_t &  offsetx,
uint32_t &  offsety 
) const
inline

Transform code block offsets from canvas coordinates to either band coordinates (relative to sub band origin) or buffer coordinates (relative to associated resolution origin)

Parameters
resnoresolution number
orientationband orientation {LL,HL,LH,HH}
offsetxx offset of code block in canvas coordinates
offsetyy offset of code block in canvas coordinates

References grk::TileComponentWindowBuffer< T >::getBandIndex(), grk::TileComponentWindowBuffer< T >::resolution_, and grk::TileComponentWindowBuffer< T >::useBufferCoordinatesForCodeblock().

Referenced by grk::TileComponent::postDecompressImpl().

◆ transfer()

template<typename T >
void grk::TileComponentWindowBuffer< T >::transfer ( T **  buffer,
uint32_t *  stride 
)
inline

◆ unreducedBounds()

template<typename T >
grk_rect32 grk::TileComponentWindowBuffer< T >::unreducedBounds ( ) const
inline

◆ useBandWindows()

template<typename T >
bool grk::TileComponentWindowBuffer< T >::useBandWindows ( ) const
inlineprivate

◆ useBufferCoordinatesForCodeblock()

template<typename T >
bool grk::TileComponentWindowBuffer< T >::useBufferCoordinatesForCodeblock ( ) const
inlineprivate

Member Data Documentation

◆ bounds_

template<typename T >
grk_rect32 grk::TileComponentWindowBuffer< T >::bounds_
private

◆ compress_

template<typename T >
bool grk::TileComponentWindowBuffer< T >::compress_
private

◆ numResolutions_

template<typename T >
uint8_t grk::TileComponentWindowBuffer< T >::numResolutions_
private

◆ resolution_

template<typename T >
std::vector<Resolution*> grk::TileComponentWindowBuffer< T >::resolution_
private

◆ resWindowBuffers

template<typename T >
std::vector<ResWindowBuffer<T>*> grk::TileComponentWindowBuffer< T >::resWindowBuffers
private

◆ unreducedBounds_

template<typename T >
grk_rect32 grk::TileComponentWindowBuffer< T >::unreducedBounds_
private

◆ wholeTileDecompress_

template<typename T >
bool grk::TileComponentWindowBuffer< T >::wholeTileDecompress_
private

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