Grok  9.7.5
WaveletFwd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2022 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  * This source code incorporates work covered by the BSD 2-clause license.
17  * Please see the LICENSE file in the root directory for details.
18  *
19  */
20 
21 #pragma once
22 
23 namespace grk
24 {
25 class dwt53
26 {
27  public:
28  void encode_and_deinterleave_v(int32_t* arrayIn, int32_t* tmpIn, uint32_t height, bool even,
29  uint32_t stride_width, uint32_t cols);
30 
31  void encode_and_deinterleave_h_one_row(int32_t* rowIn, int32_t* tmpIn, uint32_t width,
32  bool even);
33 };
34 
35 class dwt97
36 {
37  public:
38  void encode_and_deinterleave_v(float* arrayIn, float* tmpIn, uint32_t height, bool even,
39  uint32_t stride_width, uint32_t cols);
40 
41  void encode_and_deinterleave_h_one_row(float* rowIn, float* tmpIn, uint32_t width, bool even);
42 
43  private:
44  void grk_v8dwt_encode_step1(float* fw, uint32_t end, const float cst);
45  void grk_v8dwt_encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float cst);
46  void encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float c);
47 
48  void encode_step1_combined(float* fw, uint32_t iters_c1, uint32_t iters_c2, const float c1,
49  const float c2);
50  void encode_1_real(float* w, int32_t dn, int32_t sn, int32_t parity);
51 };
52 
54 {
55  public:
56  virtual ~WaveletFwdImpl() = default;
57  bool compress(TileComponent* tile_comp, uint8_t qmfbid);
58 
59  private:
60  template<typename T, typename DWT>
61  bool encode_procedure(TileComponent* tilec);
62 };
63 
64 } // namespace grk
Definition: WaveletFwd.h:54
bool encode_procedure(TileComponent *tilec)
Definition: WaveletFwd.cpp:383
bool compress(TileComponent *tile_comp, uint8_t qmfbid)
Definition: WaveletFwd.cpp:580
virtual ~WaveletFwdImpl()=default
Definition: WaveletFwd.h:26
void encode_and_deinterleave_v(int32_t *arrayIn, int32_t *tmpIn, uint32_t height, bool even, uint32_t stride_width, uint32_t cols)
Definition: WaveletFwd.cpp:590
void encode_and_deinterleave_h_one_row(int32_t *rowIn, int32_t *tmpIn, uint32_t width, bool even)
Process one line for the horizontal pass of the 5x3 forward transform.
Definition: WaveletFwd.cpp:814
Definition: WaveletFwd.h:36
void encode_step2(float *fl, float *fw, uint32_t end, uint32_t m, float c)
Definition: WaveletFwd.cpp:116
void encode_and_deinterleave_v(float *arrayIn, float *tmpIn, uint32_t height, bool even, uint32_t stride_width, uint32_t cols)
Definition: WaveletFwd.cpp:864
void encode_step1_combined(float *fw, uint32_t iters_c1, uint32_t iters_c2, const float c1, const float c2)
Definition: WaveletFwd.cpp:79
void grk_v8dwt_encode_step1(float *fw, uint32_t end, const float cst)
Definition: WaveletFwd.cpp:304
void encode_1_real(float *w, int32_t dn, int32_t sn, int32_t parity)
Definition: WaveletFwd.cpp:146
void encode_and_deinterleave_h_one_row(float *rowIn, float *tmpIn, uint32_t width, bool even)
Process one line for the horizontal pass of the 9x7 forward transform.
Definition: WaveletFwd.cpp:905
void grk_v8dwt_encode_step2(float *fl, float *fw, uint32_t end, uint32_t m, float cst)
Definition: WaveletFwd.cpp:326
Copyright (C) 2016-2022 Grok Image Compression Inc.
Definition: ICacheable.h:20
Definition: TileComponent.h:28