Grok 15.1.0
WaveletFwd.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2025 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
23namespace grk
24{
25class dwt53
26{
27public:
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, bool even);
32};
33
34class dwt97
35{
36public:
37 void encode_and_deinterleave_v(float* arrayIn, float* tmpIn, uint32_t height, bool even,
38 uint32_t stride_width, uint32_t cols);
39
40 void encode_and_deinterleave_h_one_row(float* rowIn, float* tmpIn, uint32_t width, bool even);
41
42private:
43 void grk_v8dwt_encode_step1(float* fw, uint32_t end, const float cst);
44 void grk_v8dwt_encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float cst);
45 void encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float c);
46
47 void encode_step1_combined(float* fw, uint32_t iters_c1, uint32_t iters_c2, const float c1,
48 const float c2);
49 void encode_1_real(float* w, int32_t dn, int32_t sn, int32_t parity);
50};
51
53{
54public:
55 virtual ~WaveletFwdImpl() = default;
56 bool compress(TileComponent* tile_comp, uint8_t qmfbid);
57
58private:
59 template<typename T, typename DWT>
61};
62
63} // namespace grk
Definition WaveletFwd.h:53
bool encode_procedure(TileComponent *tilec)
Definition WaveletFwd.cpp:382
bool compress(TileComponent *tile_comp, uint8_t qmfbid)
Definition WaveletFwd.cpp:572
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:582
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:802
Definition WaveletFwd.h:35
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:852
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:303
void encode_1_real(float *w, int32_t dn, int32_t sn, int32_t parity)
Definition WaveletFwd.cpp:145
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:893
void grk_v8dwt_encode_step2(float *fl, float *fw, uint32_t end, uint32_t m, float cst)
Definition WaveletFwd.cpp:325
Copyright (C) 2016-2025 Grok Image Compression Inc.
Definition ICacheable.h:20
Definition TileComponent.h:28