Subband.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/>.
*
*/
#pragma once
#include "grk_includes.h"
#include <map>
namespace grk
{
struct Subband : public grk_rect32
{
Subband();
Subband(const Subband& rhs);
virtual ~Subband() = default;
Subband& operator=(const Subband& rhs);
void print() const override;
bool empty();
Precinct* getPrecinct(uint64_t precinctIndex);
grk_rect32 generatePrecinctBounds(uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft,
grk_pt32 precinctExpn, uint32_t precinctGridWidth);
Precinct* createPrecinct(TileProcessor* tileProcessor, uint64_t precinctIndex,
grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn,
uint32_t precinctGridWidth, grk_pt32 cblk_expn);
eBandOrientation orientation;
std::vector<Precinct*> precincts;
// maps global precinct index to precincts vector index
std::map<uint64_t, uint64_t> precinctMap;
uint64_t numPrecincts;
uint8_t numbps;
float stepsize;
};
} // namespace grk
grk_includes.h
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::eBandOrientation
eBandOrientation
Definition ResSimple.h:23
grk::Precinct
Definition Precinct.h:66
grk::Subband
Definition Subband.h:26
grk::Subband::print
void print() const override
Definition Subband.cpp:37
grk::Subband::getPrecinct
Precinct * getPrecinct(uint64_t precinctIndex)
Definition Subband.cpp:45
grk::Subband::orientation
eBandOrientation orientation
Definition Subband.h:39
grk::Subband::empty
bool empty()
Definition Subband.cpp:41
grk::Subband::~Subband
virtual ~Subband()=default
grk::Subband::operator=
Subband & operator=(const Subband &rhs)
Definition Subband.cpp:29
grk::Subband::stepsize
float stepsize
Definition Subband.h:45
grk::Subband::generatePrecinctBounds
grk_rect32 generatePrecinctBounds(uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn, uint32_t precinctGridWidth)
Definition Subband.cpp:53
grk::Subband::numbps
uint8_t numbps
Definition Subband.h:44
grk::Subband::createPrecinct
Precinct * createPrecinct(TileProcessor *tileProcessor, uint64_t precinctIndex, grk_pt32 precinctPartitionTopLeft, grk_pt32 precinctExpn, uint32_t precinctGridWidth, grk_pt32 cblk_expn)
Definition Subband.cpp:67
grk::Subband::precincts
std::vector< Precinct * > precincts
Definition Subband.h:40
grk::Subband::precinctMap
std::map< uint64_t, uint64_t > precinctMap
Definition Subband.h:42
grk::Subband::Subband
Subband()
Definition Subband.cpp:23
grk::Subband::numPrecincts
uint64_t numPrecincts
Definition Subband.h:43
grk::TileProcessor
Definition TileProcessor.h:78
grk::grk_pt< uint32_t >
grk::grk_rect< uint32_t >