grk::TileLengthMarkers Struct Reference

`#include <LengthCache.h>`

## Public Member Functions

| TileLengthMarkers (uint16_t numSignalledTiles)
| TileLengthMarkers (BufferedStream *stream)
| ~TileLengthMarkers ()
bool | read (uint8_t *headerData, uint16_t header_size)
void | rewind (void)
TilePartLengthInfo * | next (void)
TilePartLengthInfo * | next (bool peek)
| Query next TLM entry.
void | invalidate (void)
bool | valid (void)
void | seek (TileSet *tilesToDecompress, CodingParams *cp, BufferedStream *stream)
| Seek to next scheduled tile part.
bool | writeBegin (uint16_t numTilePartsTotal)
void | push (uint16_t tileIndex, uint32_t tile_part_size)
bool | writeEnd (void)

## Static Public Member Functions

static bool | addTileMarkerInfo (uint16_t tileno, CodeStreamInfo *codeStreamInfo, uint16_t type, uint64_t pos, uint32_t len)
| Add tile header marker information.

## Private Member Functions

void | push (uint8_t i_TLM, TilePartLengthInfo curr_vec)

## Private Attributes

TL_MAP * | markers_
TL_MAP::iterator | markerIt_
uint16_t | markerTilePartIndex_
TL_INFO_VEC * | curr_vec_
BufferedStream * | stream_
uint64_t | streamStart
bool | valid_
bool | hasTileIndices_
uint16_t | tileCount_
uint16_t | numSignalledTiles_

## Constructor & Destructor Documentation

## TileLengthMarkers() [1/2]

grk::TileLengthMarkers::TileLengthMarkers | ( | uint16_t | numSignalledTiles | ) |

explicit

## TileLengthMarkers() [2/2]

grk::TileLengthMarkers::TileLengthMarkers | ( | BufferedStream * | stream | ) |

explicit

References stream_.

## ~TileLengthMarkers()

grk::TileLengthMarkers::~TileLengthMarkers | ( |  | ) |

References markers_.

## Member Function Documentation

## addTileMarkerInfo()

bool grk::TileLengthMarkers::addTileMarkerInfo | ( | uint16_t | tileno,
|  | CodeStreamInfo * | codeStreamInfo,
|  | uint16_t | type,
|  | uint64_t | pos,
|  | uint32_t | len
| ) |  |

static

Add tile header marker information.

Parameters

  tileno | tile index number
  codeStreamInfo | Codestream information structure
  type | marker type
  pos | byte offset of marker segment
  len | length of marker segment

References grk::grk_read(), and grk::J2K_MS_SOT.

Referenced by grk::TileProcessor::cacheTilePartPackets(), and grk::CodeStreamDecompress::parseTileParts().

## invalidate()

void grk::TileLengthMarkers::invalidate | ( | void |  | ) |

References valid_.

Referenced by grk::CodeStreamDecompress::nextTLM(), and grk::CodeStreamDecompress::read_tlm().

## next() [1/2]

TilePartLengthInfo * grk::TileLengthMarkers::next | ( | bool | peek | ) |

Query next TLM entry.

Parameters

  peek | if false, then move to next TLM entry. Otherwise, stay at current TLM entry

References curr_vec_, grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), markerIt_, markers_, markerTilePartIndex_, numSignalledTiles_, and valid_.

## next() [2/2]

TilePartLengthInfo * grk::TileLengthMarkers::next | ( | void |  | ) |

References next().

Referenced by next(), grk::CodeStreamDecompress::nextTLM(), and seek().

## push() [1/2]

void grk::TileLengthMarkers::push | ( | uint16_t | tileIndex,
|  | uint32_t | tile_part_size
| ) |  |

References grk::grk_read(), markerIt_, and push().

Referenced by push(), read(), and grk::CodeStreamCompress::writeTilePart().

## push() [2/2]

void grk::TileLengthMarkers::push | ( | uint8_t | i_TLM,
|  | TilePartLengthInfo | curr_vec
| ) |  |

private

References grk::grk_read(), markerIt_, and markers_.

## read()

bool grk::TileLengthMarkers::read | ( | uint8_t * | headerData,
|  | uint16_t | header_size
| ) |  |

References grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), hasTileIndices_, markerIt_, markers_, push(), tileCount_, grk::tlm_marker_start_bytes, and valid_.

Referenced by grk::CodeStreamDecompress::read_tlm().

## rewind()

void grk::TileLengthMarkers::rewind | ( | void |  | ) |

References curr_vec_, markerIt_, markers_, and markerTilePartIndex_.

Referenced by grk::CodeStreamDecompress::readHeaderProcedureImpl().

## seek()

void grk::TileLengthMarkers::seek | ( | TileSet * | tilesToDecompress,
|  | CodingParams * | cp,
|  | BufferedStream * | stream
| ) |  |

Seek to next scheduled tile part.

return false if TLM marker is corrupt, otherwise false

References grk::GRK_ERROR(), grk::grk_read(), next(), grk::BufferedStream::seek(), grk::CodingParams::tcps, grk::BufferedStream::tell(), and grk::TileCodingParams::tilePartCounter_.

Referenced by grk::CodeStreamDecompress::skipNonScheduledTLM().

## valid()

bool grk::TileLengthMarkers::valid | ( | void |  | ) |

References valid_.

Referenced by grk::CodeStreamDecompress::hasTLM().

## writeBegin()

bool grk::TileLengthMarkers::writeBegin | ( | uint16_t | numTilePartsTotal | ) |

References grk::grk_read(), grk::J2K_MS_TLM, grk::MARKER_BYTES, grk::BufferedStream::skip(), stream_, streamStart, grk::BufferedStream::tell(), grk::tlm_marker_start_bytes, grk::tlmMarkerBytesPerTilePart, grk::BufferedStream::writeByte(), and grk::BufferedStream::writeShort().

Referenced by grk::CodeStreamCompress::write_tlm_begin().

## writeEnd()

bool grk::TileLengthMarkers::writeEnd | ( | void |  | ) |

References grk::grk_read(), markers_, grk::BufferedStream::seek(), stream_, streamStart, grk::BufferedStream::tell(), grk::tlm_marker_start_bytes, grk::BufferedStream::writeInt(), and grk::BufferedStream::writeShort().

Referenced by grk::CodeStreamCompress::write_tlm_end().

## Member Data Documentation

## curr_vec_

TL_INFO_VEC* grk::TileLengthMarkers::curr_vec_

private

Referenced by next(), and rewind().

## hasTileIndices_

bool grk::TileLengthMarkers::hasTileIndices_

private

Referenced by read().

## markerIt_

TL_MAP::iterator grk::TileLengthMarkers::markerIt_

private

Referenced by next(), push(), push(), read(), and rewind().

## markers_

TL_MAP* grk::TileLengthMarkers::markers_

private

Referenced by next(), push(), read(), rewind(), writeEnd(), and ~TileLengthMarkers().

## markerTilePartIndex_

uint16_t grk::TileLengthMarkers::markerTilePartIndex_

private

Referenced by next(), and rewind().

## numSignalledTiles_

uint16_t grk::TileLengthMarkers::numSignalledTiles_

private

Referenced by next().

## stream_

BufferedStream* grk::TileLengthMarkers::stream_

private

Referenced by TileLengthMarkers(), writeBegin(), and writeEnd().

## streamStart

uint64_t grk::TileLengthMarkers::streamStart

private

Referenced by writeBegin(), and writeEnd().

## tileCount_

uint16_t grk::TileLengthMarkers::tileCount_

private

Referenced by read().

## valid_

bool grk::TileLengthMarkers::valid_

private

Referenced by invalidate(), next(), read(), and valid().

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

- LengthCache.h
- LengthCache.cpp