Grok 10.0.5
CompressScheduler.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2023 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
19namespace grk
20{
21class CompressScheduler : public Scheduler
22{
23 public:
24 CompressScheduler(Tile* tile, bool needsRateControl, TileCodingParams* tcp,
25 const double* mct_norms, uint16_t mct_numcomps);
26 ~CompressScheduler() = default;
27 bool schedule(uint16_t compno) override;
28
29 private:
30 bool scheduleBlocks(uint16_t compno);
31 void compress(std::vector<CompressBlockExec*>* blocks);
32 bool compress(size_t threadId, uint64_t maxBlocks);
33 void compress(T1Interface* impl, CompressBlockExec* block);
34
35 Tile* tile;
36 mutable std::mutex distortion_mutex;
38 CompressBlockExec** encodeBlocks;
39 std::atomic<int64_t> blockCount;
40 TileCodingParams* tcp_;
41 const double* mct_norms_;
42 uint16_t mct_numcomps_;
43};
44
45} // namespace grk
uint16_t mct_numcomps
Definition BlockExec.h:85
double * mct_norms
compressing norms
Definition CodingParams.h:179
const double * mct_norms_
Definition CompressScheduler.h:41
std::atomic< int64_t > blockCount
Definition CompressScheduler.h:39
CompressBlockExec ** encodeBlocks
Definition CompressScheduler.h:38
std::mutex distortion_mutex
Definition CompressScheduler.h:36
uint16_t mct_numcomps_
Definition CompressScheduler.h:42
bool needsRateControl
Definition CompressScheduler.h:37
PrecinctImpl * impl
Definition Precinct.h:86
SparseBlock ** blocks
Definition SparseCanvas.h:274
TileCodingParams * tcp_
Definition mct.h:131
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk_plugin_tile * tile
Definition plugin_interface.h:64
uint16_t compno
Definition plugin_interface.h:43