SOTMarker.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* This source code incorporates work covered by the BSD 2-clause license.
* Please see the LICENSE file in the root directory for details.
*
*/
#pragma once
namespace grk
{
struct TileProcessor;
class CodeStreamCompress;
class CodeStreamDecompress;
class SOTMarker
{
public:
SOTMarker(void);
bool write(TileProcessor* proc, uint32_t tileLength);
bool write_psot(BufferedStream* stream, uint32_t tileLength);
bool read(CodeStreamDecompress* codeStream, uint8_t* headerData, uint16_t header_size);
private:
uint64_t psot_location_;
bool read(CodeStreamDecompress* codeStream, uint8_t* headerData, uint32_t header_size,
uint32_t* tot_len, uint16_t* tileIndex, uint8_t* current_part, uint8_t* num_parts);
};
} /* namespace grk */
grk::CodeStreamDecompress
Definition CodeStreamDecompress.h:38
grk::SOTMarker
Definition SOTMarker.h:31
grk::SOTMarker::psot_location_
uint64_t psot_location_
Definition SOTMarker.h:52
grk::SOTMarker::write_psot
bool write_psot(BufferedStream *stream, uint32_t tileLength)
Definition SOTMarker.cpp:27
grk::SOTMarker::read
bool read(CodeStreamDecompress *codeStream, uint8_t *headerData, uint16_t header_size)
Decompress a SOT marker (Start of tile-part)
Definition SOTMarker.cpp:116
grk::SOTMarker::SOTMarker
SOTMarker(void)
Definition SOTMarker.cpp:26
grk::SOTMarker::write
bool write(TileProcessor *proc, uint32_t tileLength)
Writes the SOT marker (Start of tile-part)
Definition SOTMarker.cpp:41
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::BufferedStream
Definition BufferedStream.h:35
grk::TileProcessor
Definition TileProcessor.h:78