Grok  7.6.6
T1CompressScheduler.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2021 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 
18 #pragma once
19 
20 #include <thread>
21 
22 namespace grk {
23 
25 public:
28  void compress(std::vector<CompressBlockExec*> *blocks);
29 
31  const double *mct_norms,
32  uint16_t mct_numcomps);
33 private:
34  bool compress(size_t threadId, uint64_t maxBlocks);
35  void compress(T1Interface *impl, CompressBlockExec *block);
36 
38  std::vector<T1Interface*> t1Implementations;
39  mutable std::mutex distortion_mutex;
41  mutable std::mutex block_mutex;
43  std::atomic<int64_t> blockCount;
44 
45 };
46 
47 }
Definition: T1CompressScheduler.h:24
~T1CompressScheduler()
Definition: T1CompressScheduler.cpp:28
std::mutex block_mutex
Definition: T1CompressScheduler.h:41
void scheduleCompress(TileCodingParams *tcp, const double *mct_norms, uint16_t mct_numcomps)
Definition: T1CompressScheduler.cpp:33
grk_tile * tile
Definition: T1CompressScheduler.h:37
T1CompressScheduler(grk_tile *tile, bool needsRateControl)
Definition: T1CompressScheduler.cpp:22
bool needsRateControl
Definition: T1CompressScheduler.h:40
std::mutex distortion_mutex
Definition: T1CompressScheduler.h:39
std::vector< T1Interface * > t1Implementations
Definition: T1CompressScheduler.h:38
CompressBlockExec ** encodeBlocks
Definition: T1CompressScheduler.h:42
void compress(std::vector< CompressBlockExec * > *blocks)
Definition: T1CompressScheduler.cpp:89
std::atomic< int64_t > blockCount
Definition: T1CompressScheduler.h:43
Definition: T1Interface.h:23
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
Definition: T1Structs.h:279
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:121
Definition: TileProcessor.h:37