DecompressScheduler.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"
namespace grk
{
struct ResDecompressBlocks
{
ResDecompressBlocks(void) = default;
void clear(void);
bool empty(void) const;
void release(void);
std::vector<DecompressBlockExec*> blocks_;
};
typedef std::vector<ResDecompressBlocks> ComponentDecompressBlocks;
typedef std::vector<ComponentDecompressBlocks> TileDecompressBlocks;
class DecompressScheduler : public Scheduler
{
public:
DecompressScheduler(TileProcessor* tileProcessor, Tile* tile, TileCodingParams* tcp,
uint8_t prec);
~DecompressScheduler();
bool schedule(uint16_t compno) override;
private:
bool scheduleBlocks(uint16_t compno);
bool scheduleWavelet(uint16_t compno);
bool decompressBlock(T1Interface* impl, DecompressBlockExec* block);
void releaseBlocks(uint16_t compno);
TileProcessor* tileProcessor_;
TileCodingParams* tcp_;
uint8_t prec_;
uint16_t numcomps_;
TileDecompressBlocks tileBlocks_;
WaveletReverse** waveletReverse_;
};
} // namespace grk
grk::DecompressScheduler
Definition DecompressScheduler.h:38
grk::DecompressScheduler::numcomps_
uint16_t numcomps_
Definition DecompressScheduler.h:54
grk::DecompressScheduler::tileBlocks_
TileDecompressBlocks tileBlocks_
Definition DecompressScheduler.h:55
grk::DecompressScheduler::waveletReverse_
WaveletReverse ** waveletReverse_
Definition DecompressScheduler.h:56
grk::DecompressScheduler::scheduleBlocks
bool scheduleBlocks(uint16_t compno)
Definition DecompressScheduler.cpp:90
grk::DecompressScheduler::releaseBlocks
void releaseBlocks(uint16_t compno)
Definition DecompressScheduler.cpp:82
grk::DecompressScheduler::~DecompressScheduler
~DecompressScheduler()
Definition DecompressScheduler.cpp:48
grk::DecompressScheduler::tcp_
TileCodingParams * tcp_
Definition DecompressScheduler.h:52
grk::DecompressScheduler::decompressBlock
bool decompressBlock(T1Interface *impl, DecompressBlockExec *block)
Definition DecompressScheduler.cpp:217
grk::DecompressScheduler::tileProcessor_
TileProcessor * tileProcessor_
Definition DecompressScheduler.h:51
grk::DecompressScheduler::schedule
bool schedule(uint16_t compno) override
Definition DecompressScheduler.cpp:57
grk::DecompressScheduler::prec_
uint8_t prec_
Definition DecompressScheduler.h:53
grk::DecompressScheduler::scheduleWavelet
bool scheduleWavelet(uint16_t compno)
Definition DecompressScheduler.cpp:235
grk::Scheduler
Definition Scheduler.h:22
grk::T1Interface
Definition T1Interface.h:26
grk::WaveletReverse
Definition WaveletReverse.h:140
grk_includes.h
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::TileDecompressBlocks
std::vector< ComponentDecompressBlocks > TileDecompressBlocks
Definition DecompressScheduler.h:35
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::ComponentDecompressBlocks
std::vector< ResDecompressBlocks > ComponentDecompressBlocks
Definition DecompressScheduler.h:34
grk::DecompressBlockExec
Definition BlockExec.h:45
grk::ResDecompressBlocks
Definition DecompressScheduler.h:25
grk::ResDecompressBlocks::empty
bool empty(void) const
Definition DecompressScheduler.cpp:27
grk::ResDecompressBlocks::blocks_
std::vector< DecompressBlockExec * > blocks_
Definition DecompressScheduler.h:31
grk::ResDecompressBlocks::release
void release(void)
Definition DecompressScheduler.cpp:31
grk::ResDecompressBlocks::clear
void clear(void)
Definition DecompressScheduler.cpp:23
grk::ResDecompressBlocks::ResDecompressBlocks
ResDecompressBlocks(void)=default
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition CodingParams.h:122
grk::Tile
Definition TileProcessor.h:39
grk::TileProcessor
Definition TileProcessor.h:78