Grok 12.0.1
Subband.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
19#include "grk_includes.h"
20#include <map>
21
22namespace grk
23{
24
25struct Subband : public grk_rect32
26{
27 Subband();
28 Subband(const Subband& rhs);
29 virtual ~Subband() = default;
31 void print() const override;
32 bool empty();
33 Precinct* getPrecinct(uint64_t precinctIndex);
34 grk_rect32 generatePrecinctBounds(uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft,
35 grk_pt32 precinctExpn, uint32_t precinctGridWidth);
36 Precinct* createPrecinct(TileProcessor* tileProcessor, uint64_t precinctIndex,
37 grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn,
38 uint32_t precinctGridWidth, grk_pt32 cblk_expn);
40 std::vector<Precinct*> precincts;
41 // maps global precinct index to precincts vector index
42 std::map<uint64_t, uint64_t> precinctMap;
45 float stepsize;
46};
47
48} // namespace grk
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
Definition Precinct.h:66
Definition Subband.h:26
void print() const override
Definition Subband.cpp:37
Precinct * getPrecinct(uint64_t precinctIndex)
Definition Subband.cpp:45
eBandOrientation orientation
Definition Subband.h:39
bool empty()
Definition Subband.cpp:41
virtual ~Subband()=default
Subband & operator=(const Subband &rhs)
Definition Subband.cpp:29
float stepsize
Definition Subband.h:45
grk_rect32 generatePrecinctBounds(uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn, uint32_t precinctGridWidth)
Definition Subband.cpp:53
uint8_t numbps
Definition Subband.h:44
Precinct * createPrecinct(TileProcessor *tileProcessor, uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn, uint32_t precinctGridWidth, grk_pt32 cblk_expn)
Definition Subband.cpp:67
std::vector< Precinct * > precincts
Definition Subband.h:40
std::map< uint64_t, uint64_t > precinctMap
Definition Subband.h:42
Subband()
Definition Subband.cpp:23
uint64_t numPrecincts
Definition Subband.h:43
Definition TileProcessor.h:78