WaveletFwd.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* This source code incorporates work covered by the BSD 2-clause license.
* Please see the LICENSE file in the root directory for details.
*
*/
#pragma once
namespace grk
{
class dwt53
{
public:
void encode_and_deinterleave_v(int32_t* arrayIn, int32_t* tmpIn, uint32_t height, bool even,
uint32_t stride_width, uint32_t cols);
void encode_and_deinterleave_h_one_row(int32_t* rowIn, int32_t* tmpIn, uint32_t width,
bool even);
};
class dwt97
{
public:
void encode_and_deinterleave_v(float* arrayIn, float* tmpIn, uint32_t height, bool even,
uint32_t stride_width, uint32_t cols);
void encode_and_deinterleave_h_one_row(float* rowIn, float* tmpIn, uint32_t width, bool even);
private:
void grk_v8dwt_encode_step1(float* fw, uint32_t end, const float cst);
void grk_v8dwt_encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float cst);
void encode_step2(float* fl, float* fw, uint32_t end, uint32_t m, float c);
void encode_step1_combined(float* fw, uint32_t iters_c1, uint32_t iters_c2, const float c1,
const float c2);
void encode_1_real(float* w, int32_t dn, int32_t sn, int32_t parity);
};
class WaveletFwdImpl
{
public:
virtual ~WaveletFwdImpl() = default;
bool compress(TileComponent* tile_comp, uint8_t qmfbid);
private:
template<typename T, typename DWT>
bool encode_procedure(TileComponent* tilec);
};
} // namespace grk
grk::WaveletFwdImpl
Definition WaveletFwd.h:54
grk::WaveletFwdImpl::encode_procedure
bool encode_procedure(TileComponent *tilec)
Definition WaveletFwd.cpp:383
grk::WaveletFwdImpl::compress
bool compress(TileComponent *tile_comp, uint8_t qmfbid)
Definition WaveletFwd.cpp:580
grk::WaveletFwdImpl::~WaveletFwdImpl
virtual ~WaveletFwdImpl()=default
grk::dwt53
Definition WaveletFwd.h:26
grk::dwt53::encode_and_deinterleave_v
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
grk::dwt53::encode_and_deinterleave_h_one_row
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
grk::dwt97
Definition WaveletFwd.h:36
grk::dwt97::encode_step2
void encode_step2(float *fl, float *fw, uint32_t end, uint32_t m, float c)
Definition WaveletFwd.cpp:116
grk::dwt97::encode_and_deinterleave_v
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
grk::dwt97::encode_step1_combined
void encode_step1_combined(float *fw, uint32_t iters_c1, uint32_t iters_c2, const float c1, const float c2)
Definition WaveletFwd.cpp:79
grk::dwt97::grk_v8dwt_encode_step1
void grk_v8dwt_encode_step1(float *fw, uint32_t end, const float cst)
Definition WaveletFwd.cpp:304
grk::dwt97::encode_1_real
void encode_1_real(float *w, int32_t dn, int32_t sn, int32_t parity)
Definition WaveletFwd.cpp:146
grk::dwt97::encode_and_deinterleave_h_one_row
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
grk::dwt97::grk_v8dwt_encode_step2
void grk_v8dwt_encode_step2(float *fl, float *fw, uint32_t end, uint32_t m, float cst)
Definition WaveletFwd.cpp:326
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::TileComponent
Definition TileComponent.h:28