Grok  9.5.0
WaveletReverse.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  * This source code incorporates work covered by the BSD 2-clause license.
18  * Please see the LICENSE file in the root directory for details.
19  *
20  */
21 
22 #pragma once
23 
24 #include <cstdint>
25 
26 namespace grk
27 {
28 struct vec4f
29 {
30  vec4f() : f{0} {}
31  explicit vec4f(float m)
32  {
33  f[0] = m;
34  f[1] = m;
35  f[2] = m;
36  f[3] = m;
37  }
38  float f[4];
39 };
40 
41 uint32_t max_resolution(Resolution* GRK_RESTRICT r, uint32_t i);
42 
43 template<class T>
44 constexpr T getFilterPad(bool lossless)
45 {
46  return lossless ? 1 : 2;
47 }
48 
49 template<class T>
50 constexpr T getHorizontalPassHeight(bool lossless)
51 {
52  return T(lossless ? (sizeof(int32_t) / sizeof(int32_t)) : (sizeof(vec4f) / sizeof(float)));
53 }
54 
56 {
57  public:
58  bool decompress(TileProcessor* p_tcd, TileComponent* tilec, uint16_t compno, grkRectU32 window,
59  uint8_t numres, uint8_t qmfbid);
60 };
61 
62 } // namespace grk
Definition: WaveletReverse.h:56
bool decompress(TileProcessor *p_tcd, TileComponent *tilec, uint16_t compno, grkRectU32 window, uint8_t numres, uint8_t qmfbid)
#define GRK_RESTRICT
Definition: grk_includes.h:77
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: ICacheable.h:20
constexpr T getHorizontalPassHeight(bool lossless)
Definition: WaveletReverse.h:50
constexpr T getFilterPad(bool lossless)
Definition: WaveletReverse.h:44
uint32_t max_resolution(Resolution *GRK_RESTRICT r, uint32_t i)
Definition: Resolution.h:24
Definition: TileComponent.h:28
Tile processor for decompression and compression.
Definition: TileProcessor.h:77
Definition: WaveletReverse.h:29
vec4f(float m)
Definition: WaveletReverse.h:31
float f[4]
Definition: WaveletReverse.h:38
vec4f()
Definition: WaveletReverse.h:30