Grok  7.6.0
mct.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2020 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 namespace grk {
24 
25 class mct {
26 
27 public:
28 
39 
42 /* ----------------------------------------------------------------------- */
50  static void encode_rev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n);
58  static void decode_rev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n);
59 
63  static const double* get_norms_rev(void);
64 
65 
73  static void encode_irrev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n);
81  static void decode_irrev(float *c0, float *c1, float *c2, uint64_t n);
82 
86  static const double* get_norms_irrev(void);
87 
97  static bool encode_custom(uint8_t *p_coding_data, uint64_t n, uint8_t **p_data,
98  uint32_t nb_comp, uint32_t is_signed);
108  static bool decode_custom(uint8_t *pDecodingData, uint64_t n, uint8_t **pData,
109  uint32_t pNbComp, uint32_t isSigned);
116  static void calculate_norms(double *pNorms, uint32_t nb_comps, float *pMatrix);
117 
118 };
119 
120 /* ----------------------------------------------------------------------- */
124 
125 }
grk::mct::get_norms_rev
static const double * get_norms_rev(void)
Get wavelet norms for reversible transform.
grk::mct::calculate_norms
static void calculate_norms(double *pNorms, uint32_t nb_comps, float *pMatrix)
Calculate norm of MCT transform.
grk::mct::encode_irrev
static void encode_irrev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n)
Apply an irreversible multi-component transform to an image.
grk::mct::decode_custom
static bool decode_custom(uint8_t *pDecodingData, uint64_t n, uint8_t **pData, uint32_t pNbComp, uint32_t isSigned)
Custom MCT decode.
grk::mct::get_norms_irrev
static const double * get_norms_irrev(void)
Get wavelet norms for irreversible transform.
grk::mct::decode_irrev
static void decode_irrev(float *c0, float *c1, float *c2, uint64_t n)
Apply an irreversible multi-component inverse transform to an image.
grk::mct
Definition: mct.h:25
grk
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.h:27
grk::mct::decode_rev
static void decode_rev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n)
Apply a reversible multi-component inverse transform to an image.
grk::mct::encode_custom
static bool encode_custom(uint8_t *p_coding_data, uint64_t n, uint8_t **p_data, uint32_t nb_comp, uint32_t is_signed)
Custom MCT transform.
grk::mct::encode_rev
static void encode_rev(int32_t *c0, int32_t *c1, int32_t *c2, uint64_t n)
Apply a reversible multi-component transform to an image.