Grok 12.0.1
mct.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2024 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#include <vector>
24
25namespace grk
26{
35
51
52class mct
53{
54 public:
56
65
74
79
84
88 static const double* get_norms_rev(void);
89
93 static const double* get_norms_irrev(void);
94
105 uint16_t numComps, uint32_t is_signed);
123 static void calculate_norms(double* pNorms, uint16_t nb_comps, float* pMatrix);
124
125 private:
126 void genShift(uint16_t compno, int32_t sign, std::vector<ShiftInfo>& shiftInfo);
127 void genShift(int32_t sign, std::vector<ShiftInfo>& shiftInfo);
128
133};
134
135/* ----------------------------------------------------------------------- */
139
140} // namespace grk
Definition FlowComponent.h:21
Definition GrkImage.h:24
Definition StripCache.h:110
Definition mct.h:53
static bool decompress_custom(uint8_t *pDecodingData, uint64_t n, uint8_t **pData, uint16_t pNbComp, uint32_t isSigned)
Custom MCT decode.
static bool compress_custom(uint8_t *p_coding_data, uint64_t n, uint8_t **p_data, uint16_t numComps, uint32_t is_signed)
Custom MCT transform.
GrkImage * image_
Definition mct.h:130
static const double * get_norms_irrev(void)
Get wavelet norms for irreversible transform.
void decompress_rev(FlowComponent *flow)
Apply a reversible multi-component inverse transform to an image.
static void calculate_norms(double *pNorms, uint16_t nb_comps, float *pMatrix)
Calculate norm of MCT transform.
void decompress_dc_shift_rev(FlowComponent *flow, uint16_t compno)
Apply a reversible inverse dc shift to an image.
TileCodingParams * tcp_
Definition mct.h:131
void compress_irrev(FlowComponent *flow)
Apply an irreversible multi-component transform to an image.
static const double * get_norms_rev(void)
Get wavelet norms for reversible transform.
void genShift(int32_t sign, std::vector< ShiftInfo > &shiftInfo)
StripCache * stripCache_
Definition mct.h:132
void decompress_irrev(FlowComponent *flow)
Apply an irreversible multi-component inverse transform to an image.
void genShift(uint16_t compno, int32_t sign, std::vector< ShiftInfo > &shiftInfo)
Tile * tile_
Definition mct.h:129
void compress_rev(FlowComponent *flow)
Apply a reversible multi-component transform to an image.
mct(Tile *tile, GrkImage *image, TileCodingParams *tcp, StripCache *stripCache)
void decompress_dc_shift_irrev(FlowComponent *flow, uint16_t compno)
Apply an irreversible inverse dc shift to an image.
Copyright (C) 2016-2024 Grok Image Compression Inc.
Definition ICacheable.h:20
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
Definition mct.h:37
uint32_t linesPerTask_
Definition mct.h:46
uint16_t compno
Definition mct.h:43
uint32_t yBegin
Definition mct.h:48
Tile * tile
Definition mct.h:42
FlowComponent * flow_
Definition mct.h:45
std::vector< ShiftInfo > shiftInfo
Definition mct.h:44
ScheduleInfo(Tile *t, FlowComponent *flow, StripCache *stripCache, uint32_t linesPerTask)
Definition mct.h:38
uint32_t yEnd
Definition mct.h:49
StripCache * stripCache_
Definition mct.h:47
Definition mct.h:28
int32_t _shift
Definition mct.h:33
ShiftInfo(int32_t mn, int32_t mx, int32_t shift)
Definition mct.h:29
int32_t _min
Definition mct.h:31
ShiftInfo()
Definition mct.h:30
int32_t _max
Definition mct.h:32
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition CodingParams.h:122
Definition TileProcessor.h:39