Grok 12.0.1
BlockExec.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2024 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#pragma once
18#include "grk_includes.h"
19
20namespace grk
21{
23{
26 cblk_sty(0), qmfbid(0), x(0), y(0), k_msbs(0), R_b(0)
27 {}
28 virtual bool open(T1Interface* t1) = 0;
29 virtual ~BlockExec() = default;
34 float stepsize;
37 /* code block offset in buffer coordinates*/
40 // missing bit planes for all blocks in band
43};
45{
47 bool open(T1Interface* t1)
48 {
49 return t1->decompress(this);
50 }
51 void close(void) {}
55};
87
88} // namespace grk
Definition T1Interface.h:26
virtual bool decompress(DecompressBlockExec *block)=0
virtual bool compress(CompressBlockExec *block)=0
Copyright (C) 2016-2024 Grok Image Compression Inc.
Definition ICacheable.h:20
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
eBandOrientation
Definition ResSimple.h:23
@ BAND_ORIENT_LL
Definition ResSimple.h:24
Definition BlockExec.h:23
uint32_t y
Definition BlockExec.h:39
uint32_t x
Definition BlockExec.h:38
uint8_t bandNumbps
Definition BlockExec.h:32
uint8_t k_msbs
Definition BlockExec.h:41
uint8_t qmfbid
Definition BlockExec.h:36
TileComponent * tilec
Definition BlockExec.h:30
float stepsize
Definition BlockExec.h:34
virtual bool open(T1Interface *t1)=0
BlockExec()
Definition BlockExec.h:24
virtual ~BlockExec()=default
uint8_t R_b
Definition BlockExec.h:42
uint8_t cblk_sty
Definition BlockExec.h:35
eBandOrientation bandOrientation
Definition BlockExec.h:33
uint8_t bandIndex
Definition BlockExec.h:31
Definition BlockExec.h:57
Tile * tile
Definition BlockExec.h:72
bool open(T1Interface *t1)
Definition BlockExec.h:66
int32_t * tiledp
Definition BlockExec.h:75
bool doRateControl
Definition BlockExec.h:73
void close(void)
Definition BlockExec.h:70
float inv_step_ht
Definition BlockExec.h:80
uint16_t compno
Definition BlockExec.h:76
double distortion
Definition BlockExec.h:74
uint64_t cblkno
Definition BlockExec.h:79
uint8_t resno
Definition BlockExec.h:77
uint16_t mct_numcomps
Definition BlockExec.h:85
uint64_t precinctIndex
Definition BlockExec.h:78
CompressBlockExec()
Definition BlockExec.h:58
const double * mct_norms
Definition BlockExec.h:81
CompressCodeblock * cblk
Definition BlockExec.h:71
Definition Codeblock.h:122
Definition BlockExec.h:45
uint8_t roishift
Definition BlockExec.h:54
uint8_t resno
Definition BlockExec.h:53
bool open(T1Interface *t1)
Definition BlockExec.h:47
void close(void)
Definition BlockExec.h:51
DecompressBlockExec()
Definition BlockExec.h:46
DecompressCodeblock * cblk
Definition BlockExec.h:52
Definition Codeblock.h:178
Definition TileComponent.h:28
Definition TileProcessor.h:39