grk::T2Compress Struct Reference

Tier-2 coding. More...

`#include <T2Compress.h>`

## Public Member Functions

| T2Compress (TileProcessor *tileProc)
bool | compressPackets (uint16_t tileno, uint16_t maxlayers, BufferedStream *stream, uint32_t *p_data_written, bool first_poc_tile_part, uint32_t tppos, uint32_t pino)
bool | compressPacketsSimulate (uint16_t tileno, uint16_t maxlayers, uint32_t *p_data_written, uint32_t max_len, uint32_t tppos, PLMarkerMgr *markers, bool isFinal)
| Simulate compressing packets of a tile to a destination buffer.

## Private Member Functions

bool | compressPacket (TileCodingParams *tcp, PacketIter *pi, BufferedStream *stream, uint32_t *p_data_written)
| Encode a packet of a tile to a destination buffer.
bool | compressPacketSimulate (TileCodingParams *tcp, PacketIter *pi, uint32_t *p_data_written, uint32_t len, PLMarkerMgr *markers)
| Encode a packet of a tile to a destination buffer.
bool | compressHeader (BitIO *bio, Resolution *res, uint16_t layno, uint64_t precinctIndex)

## Private Attributes

TileProcessor * | tileProcessor

## Detailed Description

Tier-2 coding.

## Constructor & Destructor Documentation

## T2Compress()

grk::T2Compress::T2Compress | ( | TileProcessor * | tileProc | ) |

## Member Function Documentation

## compressHeader()

bool grk::T2Compress::compressHeader | ( | BitIO * | bio,
|  | Resolution * | res,
|  | uint16_t | layno,
|  | uint64_t | precinctIndex
| ) |  |

private

References grk::floorlog2(), grk::GRK_ERROR(), grk::grk_read(), and grk::GRK_WARN().

Referenced by compressPacket(), and compressPacketSimulate().

## compressPacket()

bool grk::T2Compress::compressPacket | ( | TileCodingParams * | tcp,
|  | PacketIter * | pi,
|  | BufferedStream * | stream,
|  | uint32_t * | p_data_written
| ) |  |

private

Encode a packet of a tile to a destination buffer.

Parameters

  tcp | Tile coding parameters
  pi | packet iterator
  stream | stream
  p_data_written | amount of data written

Returns

References compressHeader(), grk::Tile::comps, grk::TileProcessor::getNumProcessedPackets(), grk::TileProcessor::getPacketTracker(), grk::TileProcessor::getTile(), grk::GRK_ERROR(), grk::grk_read(), grk::PacketTracker::is_packet_encoded(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_SOP, grk::J2K_MS_EPH, grk::J2K_MS_SOP, grk::PacketTracker::packet_encoded(), grk::BufferedStream::tell(), tileProcessor, grk::BufferedStream::writeByte(), and grk::BufferedStream::writeBytes().

Referenced by compressPackets().

## compressPackets()

bool grk::T2Compress::compressPackets | ( | uint16_t | tileno,
|  | uint16_t | maxlayers,
|  | BufferedStream * | stream,
|  | uint32_t * | p_data_written,
|  | bool | first_poc_tile_part,
|  | uint32_t | tppos,
|  | uint32_t | pino
| ) |  |

References compressPacket(), grk::TileProcessor::cp_, grk::PacketManager::enableTilePartGeneration(), grk::FINAL_PASS, grk::PacketManager::getPacketIter(), grk::GRK_ERROR(), GRK_PROG_UNKNOWN, grk::grk_read(), grk::TileProcessor::headerImage, grk::TileProcessor::incNumProcessedPackets(), and tileProcessor.

## compressPacketSimulate()

bool grk::T2Compress::compressPacketSimulate | ( | TileCodingParams * | tcp,
|  | PacketIter * | pi,
|  | uint32_t * | p_data_written,
|  | uint32_t | len,
|  | PLMarkerMgr * | markers
| ) |  |

private

Encode a packet of a tile to a destination buffer.

Parameters

  tcp | Tile coding parameters
  pi | packet iterator
  p_data_written | amount of data written
  len | length of the destination buffer
  markers | packet length markers

Returns

References compressHeader(), grk::Tile::comps, grk::TileProcessor::getPacketTracker(), grk::TileProcessor::getTile(), grk::GRK_ERROR(), grk::grk_read(), grk::PacketTracker::is_packet_encoded(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_SOP, grk::PacketTracker::packet_encoded(), grk::PLMarkerMgr::pushPL(), grk::TileComponent::resolutions_, and tileProcessor.

Referenced by compressPacketsSimulate().

## compressPacketsSimulate()

bool grk::T2Compress::compressPacketsSimulate | ( | uint16_t | tileno,
|  | uint16_t | maxlayers,
|  | uint32_t * | p_data_written,
|  | uint32_t | max_len,
|  | uint32_t | tppos,
|  | PLMarkerMgr * | markers,
|  | bool | isFinal
| ) |  |

Simulate compressing packets of a tile to a destination buffer.

Parameters

  tileno | number of the tile encoded
  maxlayers | maximum number of layers
  p_data_written | amount of data written
  max_len | the max length of the destination buffer
  tppos | position of the tile part flag in the progression order
  markers | markers

References grk::PacketTracker::clear(), compressPacketSimulate(), grk::TileProcessor::cp_, grk::PacketManager::enableTilePartGeneration(), grk::PacketManager::getPacketIter(), grk::TileProcessor::getPacketTracker(), grk::GRK_ERROR(), GRK_PROFILE_CINEMA_4K, GRK_PROG_UNKNOWN, grk::grk_read(), grk::TileProcessor::headerImage, grk::PLMarkerMgr::pushInit(), grk::THRESH_CALC, and tileProcessor.

## Member Data Documentation

## tileProcessor

TileProcessor* grk::T2Compress::tileProcessor

private

Referenced by compressPacket(), compressPackets(), compressPacketSimulate(), and compressPacketsSimulate().

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

- T2Compress.h
- T2Compress.cpp