grk::PacketParser Class Reference

`#include <PacketParser.h>`

## Public Member Functions

| PacketParser (TileProcessor *tileProcessor, uint16_t packetSequenceNumber, uint16_t compno, uint8_t resno, uint64_t precinctIndex, uint16_t layno, uint8_t *data, uint32_t lengthFromMarker, size_t tileBytes, size_t remainingTilePartBytes)
virtual | ~PacketParser (void)=default
void | readHeader (void)
void | readData (void)
uint32_t | numHeaderBytes (void)
uint32_t | numSignalledDataBytes (void)
uint32_t | numSignalledBytes (void)
uint32_t | numReadDataBytes (void)
void | print (void)

## Private Member Functions

void | readDataFinalize (void)
void | initSegment (DecompressCodeblock *cblk, uint32_t index, uint8_t cblk_sty, bool first)

## Private Attributes

TileProcessor * | tileProcessor_
uint16_t | packetSequenceNumber_
uint16_t | compno_
uint8_t | resno_
uint64_t | precinctIndex_
uint16_t | layno_
uint8_t * | data_
size_t | tileBytes_
size_t | remainingTilePartBytes_
bool | tagBitsPresent_
uint32_t | packetHeaderBytes_
uint32_t | signalledDataBytes_
uint32_t | readDataBytes_
uint32_t | lengthFromMarker_
bool | parsedHeader_
bool | headerError_

## Constructor & Destructor Documentation

## PacketParser()

grk::PacketParser::PacketParser | ( | TileProcessor * | tileProcessor,
|  | uint16_t | packetSequenceNumber,
|  | uint16_t | compno,
|  | uint8_t | resno,
|  | uint64_t | precinctIndex,
|  | uint16_t | layno,
|  | uint8_t * | data,
|  | uint32_t | lengthFromMarker,
|  | size_t | tileBytes,
|  | size_t | remainingTilePartBytes
| ) |  |

## ~PacketParser()

virtual grk::PacketParser::~PacketParser | ( | void |  | ) |

virtual default

## Member Function Documentation

## initSegment()

void grk::PacketParser::initSegment | ( | DecompressCodeblock * | cblk,
|  | uint32_t | index,
|  | uint8_t | cblk_sty,
|  | bool | first
| ) |  |

private

References grk::Segment::clear(), grk::DecompressCodeblock::getSegment(), GRK_CBLKSTY_LAZY, GRK_CBLKSTY_TERMALL, grk::grk_read(), and grk::maxPassesPerSegmentJ2K.

Referenced by readHeader().

## numHeaderBytes()

uint32_t grk::PacketParser::numHeaderBytes | ( | void |  | ) |

References packetHeaderBytes_.

## numReadDataBytes()

uint32_t grk::PacketParser::numReadDataBytes | ( | void |  | ) |

References readDataBytes_.

## numSignalledBytes()

uint32_t grk::PacketParser::numSignalledBytes | ( | void |  | ) |

References packetHeaderBytes_, and signalledDataBytes_.

Referenced by readHeader().

## numSignalledDataBytes()

uint32_t grk::PacketParser::numSignalledDataBytes | ( | void |  | ) |

References signalledDataBytes_.

## print()

void grk::PacketParser::print | ( | void |  | ) |

References compno_, layno_, lengthFromMarker_, packetHeaderBytes_, precinctIndex_, readDataBytes_, remainingTilePartBytes_, resno_, signalledDataBytes_, tagBitsPresent_, and tileBytes_.

## readData()

void grk::PacketParser::readData | ( | void |  | ) |

References compno_, grk::Tile::comps, grk::TileProcessor::cp_, data_, grk::DecompressCodeblock::getCurrentSegment(), grk::Precinct::getDecompressedBlockPtr(), grk::Subband::getPrecinct(), grk::TileProcessor::getTile(), grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), grk::TileCodingParams::isHT(), layno_, precinctIndex_, readDataBytes_, readDataFinalize(), remainingTilePartBytes_, resno_, grk::TileComponent::resolutions_, tagBitsPresent_, grk::CodingParams::tcps, grk::Resolution::tileBand, and tileProcessor_.

## readDataFinalize()

void grk::PacketParser::readDataFinalize | ( | void |  | ) |

private

References compno_, grk::TileProcessor::getTile(), grk::grk_read(), grk::TileProcessor::incNumDecompressedPackets(), resno_, and tileProcessor_.

Referenced by readData().

## readHeader()

void grk::PacketParser::readHeader | ( | void |  | ) |

References compno_, grk::Tile::comps, grk::TileProcessor::cp_, grk::TileCodingParams::csty, data_, grk::floorlog2(), grk::TileProcessor::getIndex(), grk::TileProcessor::getTile(), grk::TileProcessor::getTileCodingParams(), grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), headerError_, initSegment(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_SOP, grk::J2K_MS_EPH, grk::J2K_MS_SOP, layno_, lengthFromMarker_, grk::maxBitPlanesGRK, grk::maxPassesPerSegmentJ2K, numSignalledBytes(), packetHeaderBytes_, packetSequenceNumber_, parsedHeader_, precinctIndex_, remainingTilePartBytes_, resno_, grk::TileComponent::resolutions_, signalledDataBytes_, tagBitsPresent_, tileBytes_, and tileProcessor_.

## Member Data Documentation

## compno_

uint16_t grk::PacketParser::compno_

private

Referenced by print(), readData(), readDataFinalize(), and readHeader().

## data_

uint8_t* grk::PacketParser::data_

private

Referenced by readData(), and readHeader().

## headerError_

bool grk::PacketParser::headerError_

private

Referenced by readHeader().

## layno_

uint16_t grk::PacketParser::layno_

private

Referenced by print(), readData(), and readHeader().

## lengthFromMarker_

uint32_t grk::PacketParser::lengthFromMarker_

private

Referenced by print(), and readHeader().

## packetHeaderBytes_

uint32_t grk::PacketParser::packetHeaderBytes_

private

Referenced by numHeaderBytes(), numSignalledBytes(), print(), and readHeader().

## packetSequenceNumber_

uint16_t grk::PacketParser::packetSequenceNumber_

private

Referenced by readHeader().

## parsedHeader_

bool grk::PacketParser::parsedHeader_

private

Referenced by readHeader().

## precinctIndex_

uint64_t grk::PacketParser::precinctIndex_

private

Referenced by print(), readData(), and readHeader().

## readDataBytes_

uint32_t grk::PacketParser::readDataBytes_

private

Referenced by numReadDataBytes(), print(), and readData().

## remainingTilePartBytes_

size_t grk::PacketParser::remainingTilePartBytes_

private

Referenced by print(), readData(), and readHeader().

## resno_

uint8_t grk::PacketParser::resno_

private

Referenced by print(), readData(), readDataFinalize(), and readHeader().

## signalledDataBytes_

uint32_t grk::PacketParser::signalledDataBytes_

private

Referenced by numSignalledBytes(), numSignalledDataBytes(), print(), and readHeader().

## tagBitsPresent_

bool grk::PacketParser::tagBitsPresent_

private

Referenced by print(), readData(), and readHeader().

## tileBytes_

size_t grk::PacketParser::tileBytes_

private

Referenced by print(), and readHeader().

## tileProcessor_

TileProcessor* grk::PacketParser::tileProcessor_

private

Referenced by readData(), readDataFinalize(), and readHeader().

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

- PacketParser.h
- PacketParser.cpp