Grok 12.0.1
CompressScheduler.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
19namespace grk
20{
22{
23 public:
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);
34
36 mutable std::mutex distortion_mutex;
39 std::atomic<int64_t> blockCount;
41 const double* mct_norms_;
43};
44
45} // namespace grk
Definition CompressScheduler.h:22
TileCodingParams * tcp_
Definition CompressScheduler.h:40
Tile * tile
Definition CompressScheduler.h:35
CompressBlockExec ** encodeBlocks
Definition CompressScheduler.h:38
uint16_t mct_numcomps_
Definition CompressScheduler.h:42
std::mutex distortion_mutex
Definition CompressScheduler.h:36
bool scheduleBlocks(uint16_t compno)
Definition CompressScheduler.cpp:37
void compress(std::vector< CompressBlockExec * > *blocks)
Definition CompressScheduler.cpp:101
~CompressScheduler()=default
bool needsRateControl
Definition CompressScheduler.h:37
const double * mct_norms_
Definition CompressScheduler.h:41
CompressScheduler(Tile *tile, bool needsRateControl, TileCodingParams *tcp, const double *mct_norms, uint16_t mct_numcomps)
Definition CompressScheduler.cpp:22
std::atomic< int64_t > blockCount
Definition CompressScheduler.h:39
bool schedule(uint16_t compno) override
Definition CompressScheduler.cpp:33
Definition Scheduler.h:22
Definition T1Interface.h:26
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
Definition BlockExec.h:57
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition CodingParams.h:122
Definition TileProcessor.h:39