Grok  7.6.6
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 
29 struct vec4f {
30  vec4f() : f{0}
31  {}
32  explicit vec4f(float m)
33  {
34  f[0]=m;
35  f[1]=m;
36  f[2]=m;
37  f[3]=m;
38 
39  }
40  float f[4];
41 };
42 
43 uint32_t max_resolution(Resolution *GRK_RESTRICT r, uint32_t i);
44 
45 template<class T> constexpr T getFilterPad(bool lossless) {
46  return lossless ? 1 : 2;
47  }
48 
49 template<class T> constexpr T getHorizontalPassHeight(bool lossless){
50  return T(lossless ? (sizeof(int32_t)/sizeof(int32_t)) : (sizeof(vec4f) / sizeof(float)));
51 }
52 
54 
55 public:
56  bool decompress(TileProcessor *p_tcd,
57  TileComponent* tilec,
58  uint16_t compno,
59  grk_rect_u32 window,
60  uint32_t numres,
61  uint8_t qmfbid);
62 
63 };
64 
65 }
Definition: WaveletReverse.h:53
bool decompress(TileProcessor *p_tcd, TileComponent *tilec, uint16_t compno, grk_rect_u32 window, uint32_t numres, uint8_t qmfbid)
Definition: WaveletReverse.cpp:2230
#define GRK_RESTRICT
Definition: grk_includes.h:101
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
constexpr T getHorizontalPassHeight(bool lossless)
Definition: WaveletReverse.h:49
constexpr T getFilterPad(bool lossless)
Definition: WaveletReverse.h:45
uint32_t max_resolution(Resolution *GRK_RESTRICT r, uint32_t i)
Definition: WaveletReverse.cpp:33
Definition: T1Structs.h:228
Definition: TileComponent.h:30
Tile compressor/decompressor.
Definition: TileProcessor.h:70
Definition: WaveletReverse.h:29
vec4f(float m)
Definition: WaveletReverse.h:32
float f[4]
Definition: WaveletReverse.h:40
vec4f()
Definition: WaveletReverse.h:30