|
Grok 20.3.2
|
Manages raw (uncompressed) PLT and PLM markers. More...
#include <PLMarker.h>
Public Member Functions | |
| PLMarker (void) | |
| Constructs a PLMarker. | |
| ~PLMarker (void) | |
| Destroys a PLMarker. | |
| void | disable (void) |
| Disables object in event of corrupt PL marker. | |
| bool | isEnabled (void) |
| Checks if object is enabled. | |
| void | pushInit (bool isFinal) |
| Prepares for pushing markers. | |
| bool | pushPL (uint32_t len) |
| Pushes packet length @len length of packet. | |
| bool | write (void) |
| Writes marker to stream. | |
| uint32_t | getTotalBytesWritten (void) |
| Gets total bytes written. | |
| PLMarker (IStream *strm) | |
| Constructs a PLMarker. | |
| bool | readPLT (uint8_t *headerData, uint16_t headerSize, int16_t tilePartIndex=-1) |
| Reads PLT marker. | |
| bool | readPLM (uint8_t *headerData, uint16_t headerSize) |
| Reads PLM marker. | |
| void | rewind (void) |
| Resets object for reading packet lengths. | |
| uint32_t | pop (void) |
| pop next packet length | |
| uint64_t | pop (uint64_t numPackets) |
| pop length of next set of consecutive packets | |
Private Member Functions | |
| void | clearMarkers (void) |
| bool | findMarker (uint32_t index, bool compress) |
| Buffer8 * | addNewMarker (uint8_t *data, uint16_t len, int16_t tilePartIndex=-1) |
| bool | readNextByte (uint8_t Iplm, uint32_t *packetLength) |
Private Attributes | |
| std::unique_ptr< RAW_PL_MARKER_MAP > | rawMarkers_ |
| RAW_PL_MARKER_MAP::iterator | currMarkerIter_ |
| uint32_t | totalBytesWritten_ |
| bool | isFinal_ |
| IStream * | stream_ |
| bool | sequential_ |
| uint32_t | packetLen_ |
| uint32_t | currMarkerBufIndex_ |
| Buffer8 * | currMarkerBuf_ |
| bool | enabled_ |
Manages raw (uncompressed) PLT and PLM markers.
Marker data is stored raw, and decompressed on the fly. Pop methods are used to get length of next packet(s)
| grk::PLMarker::PLMarker | ( | void | ) |
Constructs a PLMarker.
References currMarkerBuf_, currMarkerBufIndex_, currMarkerIter_, enabled_, isFinal_, packetLen_, rawMarkers_, sequential_, stream_, and totalBytesWritten_.
Referenced by PLMarker().
| grk::PLMarker::~PLMarker | ( | void | ) |
Destroys a PLMarker.
References clearMarkers().
|
explicit |
|
private |
References currMarkerIter_, and grk::grklog.
|
private |
References currMarkerBuf_, currMarkerIter_, and rawMarkers_.
Referenced by pushInit(), readPLM(), and ~PLMarker().
| void grk::PLMarker::disable | ( | void | ) |
|
private |
References currMarkerIter_, grk::grklog, rawMarkers_, and sequential_.
| uint32_t grk::PLMarker::getTotalBytesWritten | ( | void | ) |
Gets total bytes written.
References totalBytesWritten_.
Referenced by grk::FileFormatJP2Compress::transcodeCodestream().
| bool grk::PLMarker::isEnabled | ( | void | ) |
| uint64_t grk::PLMarker::pop | ( | uint64_t | numPackets | ) |
pop length of next set of consecutive packets
| numPackets | number of packets to generate length for |
References pop().
| uint32_t grk::PLMarker::pop | ( | void | ) |
pop next packet length
References currMarkerBuf_, currMarkerBufIndex_, currMarkerIter_, grk::grklog, rawMarkers_, and readNextByte().
Referenced by pop().
| void grk::PLMarker::pushInit | ( | bool | isFinal | ) |
Prepares for pushing markers.
| isFinal | true if this is the final Packet Length |
References clearMarkers(), isFinal_, and totalBytesWritten_.
Referenced by grk::T2Compress::compressPacketsSimulate(), and grk::FileFormatJP2Compress::transcodeCodestream().
| bool grk::PLMarker::pushPL | ( | uint32_t | len | ) |
Pushes packet length @len length of packet.
References addNewMarker(), currMarkerIter_, findMarker(), grk::floorlog2(), isFinal_, grk::plWriteBufferLen, rawMarkers_, and totalBytesWritten_.
Referenced by grk::T2Compress::compressPacketSimulate(), and grk::FileFormatJP2Compress::transcodeCodestream().
|
private |
References packetLen_.
Referenced by pop().
| bool grk::PLMarker::readPLM | ( | uint8_t * | headerData, |
| uint16_t | headerSize ) |
Reads PLM marker.
| headerData | header data |
| headerSize | header size |
References addNewMarker(), clearMarkers(), currMarkerIter_, findMarker(), grk::grklog, and rawMarkers_.
| bool grk::PLMarker::readPLT | ( | uint8_t * | headerData, |
| uint16_t | headerSize, | ||
| int16_t | tilePartIndex = -1 ) |
Reads PLT marker.
| headerData | header data |
| headerSize | header size |
| tilePartIndex | tile part index (optional, -1 to push) |
References addNewMarker(), findMarker(), and grk::grklog.
| void grk::PLMarker::rewind | ( | void | ) |
Resets object for reading packet lengths.
References currMarkerBuf_, currMarkerBufIndex_, currMarkerIter_, disable(), grk::grklog, and rawMarkers_.
| bool grk::PLMarker::write | ( | void | ) |
Writes marker to stream.
References isFinal_, grk::PLT, rawMarkers_, and stream_.
|
private |
Referenced by clearMarkers(), PLMarker(), pop(), and rewind().
|
private |
Referenced by PLMarker(), pop(), and rewind().
|
private |
Referenced by addNewMarker(), clearMarkers(), findMarker(), PLMarker(), pop(), pushPL(), readPLM(), and rewind().
|
private |
Referenced by disable(), isEnabled(), and PLMarker().
|
private |
Referenced by PLMarker(), pushInit(), pushPL(), and write().
|
private |
Referenced by PLMarker(), and readNextByte().
|
private |
Referenced by clearMarkers(), findMarker(), PLMarker(), pop(), pushPL(), readPLM(), rewind(), and write().
|
private |
Referenced by findMarker(), and PLMarker().
|
private |
Referenced by PLMarker(), PLMarker(), and write().
|
private |
Referenced by getTotalBytesWritten(), PLMarker(), pushInit(), and pushPL().