Grok 20.3.2
PPMMarker.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2026 Grok Image Compression Inc.
3 *
4 * This source code is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License, version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This source code is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Affero General Public License for more details.
12 *
13 * You should have received a copy of the GNU Affero General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#pragma once
19
20#include <vector>
21
22#include "buffer.h"
23
24namespace grk
25{
26struct grk_ppx
27{
28 uint8_t* data_; /* data_ == nullptr => Zppx not read yet */
29 uint32_t data_size_;
30};
31
33{
34public:
35 PPMMarker();
36 ~PPMMarker();
37
45 bool read(uint8_t* headerData, uint16_t headerSize);
46
51 bool merge(void);
52
53 std::vector<Buffer8> packetHeaders;
54
55private:
57 uint32_t markers_count;
60
62 uint8_t* buffer;
63};
64
65} /* namespace grk */
grk_ppx * markers
ppm markers data (table indexed by Zppm)
Definition PPMMarker.h:59
std::vector< Buffer8 > packetHeaders
Definition PPMMarker.h:53
PPMMarker()
Definition PPMMarker.cpp:32
uint8_t * buffer
packet header storage original buffer
Definition PPMMarker.h:62
bool read(uint8_t *headerData, uint16_t headerSize)
Read a PPM marker (Packed headers, main header).
Definition PPMMarker.cpp:49
bool merge(void)
Merges all PPM markers read (Packed headers, main header).
Definition PPMMarker.cpp:114
uint32_t markers_count
number of ppm markers (reserved size)
Definition PPMMarker.h:57
~PPMMarker()
Definition PPMMarker.cpp:34
ResWindow.
Definition CompressedChunkCache.h:36
Definition PPMMarker.h:27
uint32_t data_size_
Definition PPMMarker.h:29
uint8_t * data_
Definition PPMMarker.h:28