Grok  7.6.0
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
grk::TileProcessor Struct Reference

Tile coder/decoder. More...

#include <TileProcessor.h>

Public Member Functions

 TileProcessor (CodeStream *codeStream)
 
 ~TileProcessor ()
 
bool init_tile (grk_image *output_image, bool isEncoder)
 Allocates memory for decoding a specific tile. More...
 
bool pre_write_tile (void)
 
bool compress_tile_part (BufferedStream *stream, uint32_t *tile_bytes_written)
 Compress a tile from a raw image into stream. More...
 
bool pre_compress_first_tile_part (BufferedStream *stream)
 
bool do_encode (BufferedStream *stream)
 Compress a tile from a raw image into stream. More...
 
bool decompress_tile_t1 (void)
 T1 Decode a tile from a buffer. More...
 
bool decompress_tile_t2 (ChunkBuffer *src_buf)
 T2 Decode a tile from a buffer. More...
 
bool copy_uncompressed_data_to_tile (uint8_t *p_src, uint64_t src_length)
 Copies tile data from the given memory block onto the system. More...
 
bool needs_rate_control ()
 
bool copy_decompressed_tile_to_output_image (grk_image *p_output_image)
 
void copy_image_to_tile ()
 

Data Fields

uint16_t m_tile_index
 index of tile being currently coded/decoded More...
 
uint8_t m_poc_tile_part_index
 tile part index, regardless of poc. More...
 
uint8_t m_tile_part_index
 index of tile part being currently coding, taking into account POC. More...
 
uint32_t tile_part_data_length
 
uint8_t totnum_tp
 Total number of tile parts of the tile. More...
 
uint32_t pino
 Current packet iterator number. More...
 
grk_tiletile
 info on image tile More...
 
grk_imageimage
 image header More...
 
grk_plugin_tilecurrent_plugin_tile
 
bool whole_tile_decoding
 Only valid for decoding. More...
 
PacketLengthMarkersplt_markers
 
CodingParamsm_cp
 coding parameters More...
 
PacketTracker m_packetTracker
 
uint32_t * m_resno_decoded
 
bool m_corrupt_packet
 

Private Member Functions

bool t2_decode (ChunkBuffer *src_buf, uint64_t *p_data_read)
 
bool is_whole_tilecomp_decoding (uint32_t compno)
 
bool mct_decode ()
 
bool dc_level_shift_decode ()
 
bool dc_level_shift_encode ()
 
bool mct_encode ()
 
bool dwt_encode ()
 
void t1_encode ()
 
bool t2_encode (BufferedStream *stream, uint32_t *packet_bytes_written)
 
bool rate_allocate (void)
 
bool layer_needs_rate_control (uint32_t layno)
 
bool make_single_lossless_layer ()
 
void makelayer_final (uint32_t layno)
 
bool pcrd_bisect_simple (uint32_t *p_data_written)
 
void make_layer_simple (uint32_t layno, double thresh, bool final)
 
bool pcrd_bisect_feasible (uint32_t *p_data_written)
 
void makelayer_feasible (uint32_t layno, uint16_t thresh, bool final)
 

Private Attributes

uint32_t tp_pos
 position of the tile part flag in progression order More...
 
TileCodingParamsm_tcp
 coding/decoding parameters common to all tiles More...
 

Detailed Description

Tile coder/decoder.

Constructor & Destructor Documentation

◆ TileProcessor()

grk::TileProcessor::TileProcessor ( CodeStream codeStream)
explicit

◆ ~TileProcessor()

grk::TileProcessor::~TileProcessor ( )

Member Function Documentation

◆ compress_tile_part()

bool grk::TileProcessor::compress_tile_part ( BufferedStream stream,
uint32_t *  tile_bytes_written 
)

Compress a tile from a raw image into stream.

Parameters
streamstream
tile_bytes_writtennumber of bytes written to stream
Returns
true if the coding is successful.

◆ copy_decompressed_tile_to_output_image()

bool grk::TileProcessor::copy_decompressed_tile_to_output_image ( grk_image p_output_image)

◆ copy_image_to_tile()

void grk::TileProcessor::copy_image_to_tile ( )

◆ copy_uncompressed_data_to_tile()

bool grk::TileProcessor::copy_uncompressed_data_to_tile ( uint8_t *  p_src,
uint64_t  src_length 
)

Copies tile data from the given memory block onto the system.

◆ dc_level_shift_decode()

bool grk::TileProcessor::dc_level_shift_decode ( )
private

◆ dc_level_shift_encode()

bool grk::TileProcessor::dc_level_shift_encode ( )
private

◆ decompress_tile_t1()

bool grk::TileProcessor::decompress_tile_t1 ( void  )

T1 Decode a tile from a buffer.

Returns
true if successful

◆ decompress_tile_t2()

bool grk::TileProcessor::decompress_tile_t2 ( ChunkBuffer src_buf)

T2 Decode a tile from a buffer.

Parameters
src_bufSource buffer
Returns
true if successful

◆ do_encode()

bool grk::TileProcessor::do_encode ( BufferedStream stream)

Compress a tile from a raw image into stream.

Returns
true if the coding is successful.

◆ dwt_encode()

bool grk::TileProcessor::dwt_encode ( )
private

◆ init_tile()

bool grk::TileProcessor::init_tile ( grk_image output_image,
bool  isEncoder 
)

Allocates memory for decoding a specific tile.

Parameters
output_imageoutput image - stores the decompress region of interest
Returns
true if the remaining data is sufficient.

◆ is_whole_tilecomp_decoding()

bool grk::TileProcessor::is_whole_tilecomp_decoding ( uint32_t  compno)
private

◆ layer_needs_rate_control()

bool grk::TileProcessor::layer_needs_rate_control ( uint32_t  layno)
private

◆ make_layer_simple()

void grk::TileProcessor::make_layer_simple ( uint32_t  layno,
double  thresh,
bool  final 
)
private

◆ make_single_lossless_layer()

bool grk::TileProcessor::make_single_lossless_layer ( )
private

◆ makelayer_feasible()

void grk::TileProcessor::makelayer_feasible ( uint32_t  layno,
uint16_t  thresh,
bool  final 
)
private

◆ makelayer_final()

void grk::TileProcessor::makelayer_final ( uint32_t  layno)
private

◆ mct_decode()

bool grk::TileProcessor::mct_decode ( )
private

◆ mct_encode()

bool grk::TileProcessor::mct_encode ( )
private

◆ needs_rate_control()

bool grk::TileProcessor::needs_rate_control ( )

◆ pcrd_bisect_feasible()

bool grk::TileProcessor::pcrd_bisect_feasible ( uint32_t *  p_data_written)
private

◆ pcrd_bisect_simple()

bool grk::TileProcessor::pcrd_bisect_simple ( uint32_t *  p_data_written)
private

◆ pre_compress_first_tile_part()

bool grk::TileProcessor::pre_compress_first_tile_part ( BufferedStream stream)

◆ pre_write_tile()

bool grk::TileProcessor::pre_write_tile ( void  )

◆ rate_allocate()

bool grk::TileProcessor::rate_allocate ( void  )
private

◆ t1_encode()

void grk::TileProcessor::t1_encode ( )
private

◆ t2_decode()

bool grk::TileProcessor::t2_decode ( ChunkBuffer src_buf,
uint64_t *  p_data_read 
)
private

◆ t2_encode()

bool grk::TileProcessor::t2_encode ( BufferedStream stream,
uint32_t *  packet_bytes_written 
)
private

Field Documentation

◆ current_plugin_tile

grk_plugin_tile* grk::TileProcessor::current_plugin_tile

◆ image

grk_image* grk::TileProcessor::image

image header

◆ m_corrupt_packet

bool grk::TileProcessor::m_corrupt_packet

◆ m_cp

CodingParams* grk::TileProcessor::m_cp

coding parameters

◆ m_packetTracker

PacketTracker grk::TileProcessor::m_packetTracker

◆ m_poc_tile_part_index

uint8_t grk::TileProcessor::m_poc_tile_part_index

tile part index, regardless of poc.

for each new poc, tp is reset to 0

◆ m_resno_decoded

uint32_t* grk::TileProcessor::m_resno_decoded

◆ m_tcp

TileCodingParams* grk::TileProcessor::m_tcp
private

coding/decoding parameters common to all tiles

◆ m_tile_index

uint16_t grk::TileProcessor::m_tile_index

index of tile being currently coded/decoded

◆ m_tile_part_index

uint8_t grk::TileProcessor::m_tile_part_index

index of tile part being currently coding, taking into account POC.

m_tile_part_index holds the total number of tile parts while encoding the last tile part.

◆ pino

uint32_t grk::TileProcessor::pino

Current packet iterator number.

◆ plt_markers

PacketLengthMarkers* grk::TileProcessor::plt_markers

◆ tile

grk_tile* grk::TileProcessor::tile

info on image tile

◆ tile_part_data_length

uint32_t grk::TileProcessor::tile_part_data_length

◆ totnum_tp

uint8_t grk::TileProcessor::totnum_tp

Total number of tile parts of the tile.

◆ tp_pos

uint32_t grk::TileProcessor::tp_pos
private

position of the tile part flag in progression order

◆ whole_tile_decoding

bool grk::TileProcessor::whole_tile_decoding

Only valid for decoding.

Whether the whole tile is decoded, or just the region in win_x0/win_y0/win_x1/win_y1


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