Grok 20.3.2
CoderOJPH.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 "ICoder.h"
21#include "BlockExec.h"
22
23namespace grk::t1::ojph
24{
27
28class T1OJPH : public ICoder
29{
30public:
31 T1OJPH(bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH);
32 virtual ~T1OJPH();
33
34 bool compress(CompressBlockExec* block) override;
35 bool decompress(DecompressBlockExec* block) override;
36
37private:
38 bool preCompress(CompressBlockExec* block);
40
42 uint8_t* coded_data;
45
48};
49} // namespace grk::t1::ojph
interface to code block compressor / decompressor
Definition ICoder.h:31
uint32_t unencoded_data_size
Definition CoderOJPH.h:43
virtual ~T1OJPH()
Definition CoderOJPH.cpp:103
T1OJPH(bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH)
Definition CoderOJPH.cpp:93
mem_elastic_allocator * elastic_alloc
Definition CoderOJPH.h:47
mem_fixed_allocator * allocator
Definition CoderOJPH.h:46
uint32_t coded_data_size
Definition CoderOJPH.h:41
int32_t * unencoded_data
Definition CoderOJPH.h:44
bool decompress(DecompressBlockExec *block) override
decompress code block
Definition CoderOJPH.cpp:207
bool compress(CompressBlockExec *block) override
compress code block
Definition CoderOJPH.cpp:181
uint8_t * coded_data
Definition CoderOJPH.h:42
bool postProcess(DecompressBlockExec *block)
bool preCompress(CompressBlockExec *block)
Definition CoderOJPH.cpp:110
Definition ojph_mem.h:218
Definition ojph_mem.h:59
Definition CoderOJPH.cpp:92
Definition BlockExec.h:129
Definition BlockExec.h:64