OpenJPEG  1.5.1
dwt.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
3  * Copyright (c) 2002-2007, Professor Benoit Macq
4  * Copyright (c) 2001-2003, David Janssens
5  * Copyright (c) 2002-2003, Yannick Verschueren
6  * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
7  * Copyright (c) 2005, Herve Drolon, FreeImage Team
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef __DWT_H
33 #define __DWT_H
34 
45 
46 
49 /* ----------------------------------------------------------------------- */
55 void dwt_encode(opj_tcd_tilecomp_t * tilec);
62 void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres);
68 int dwt_getgain(int orient);
75 double dwt_getnorm(int level, int orient);
88 void dwt_decode_real(opj_tcd_tilecomp_t* tilec, int numres);
94 int dwt_getgain_real(int orient);
101 double dwt_getnorm_real(int level, int orient);
107 void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec);
108 /* ----------------------------------------------------------------------- */
112 
113 #endif /* __DWT_H */
dwt_norms_real
static const double dwt_norms_real[4][10]
Definition: dwt.c:148
opj_tcd_resolution::y1
int y1
Definition: tcd.h:131
DD_
#define DD_(i)
Definition: dwt.c:133
dwt_getnorm_real
double dwt_getnorm_real(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
Definition: dwt.c:473
dwt_local::dn
int dn
Definition: dwt.c:51
opj_free
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
dwt_deinterleave_v
static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas)
Forward lazy transform (vertical)
Definition: dwt.c:173
opj_malloc
#define opj_malloc(size)
Allocate an uninitialized memory block.
Definition: opj_malloc.h:51
v4dwt_interleave_h
static void v4dwt_interleave_h(v4dwt_t *restrict w, float *restrict a, int x, int size)
Definition: dwt.c:568
dwt_encode
void dwt_encode(opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet tranform in 2-D.
Definition: dwt.c:326
opj_stepsize::expn
int expn
exponent
Definition: j2k.h:126
dwt_decode
void dwt_decode(opj_tcd_tilecomp_t *tilec, int numres)
Inverse 5-3 wavelet tranform in 2-D.
Definition: dwt.c:382
opj_tccp::qntsty
int qntsty
quantisation style
Definition: j2k.h:148
dwt_alpha
static const float dwt_alpha
Definition: dwt.c:67
opj_stepsize::mant
int mant
mantissa
Definition: j2k.h:128
dwt_delta
static const float dwt_delta
Definition: dwt.c:70
opj_tccp::qmfbid
int qmfbid
discrete wavelet transform identifier
Definition: j2k.h:146
D_
#define D_(i)
Definition: dwt.c:130
dwt_decode_1
static void dwt_decode_1(dwt_t *v)
Inverse 5-3 wavelet transform in 1-D.
Definition: dwt.c:267
c13318
static const float c13318
Definition: dwt.c:74
dwt_getgain_real
int dwt_getgain_real(int orient)
Get the gain of a subband for the irreversible 9-7 DWT.
Definition: dwt.c:465
D
#define D(i)
Definition: dwt.c:128
dwt_local
Definition: dwt.c:49
dwt_local::sn
int sn
Definition: dwt.c:52
dwt_interleave_v
static void dwt_interleave_v(dwt_t *v, int *a, int x)
Inverse lazy transform (vertical)
Definition: dwt.c:202
dwt_norms
static const double dwt_norms[4][10]
Definition: dwt.c:138
opj_tccp::stepsizes
opj_stepsize_t stepsizes[J2K_MAXBANDS]
stepsizes used for quantization
Definition: j2k.h:150
dwt_t
struct dwt_local dwt_t
dwt_local::mem
int * mem
Definition: dwt.c:50
opj_tcd_tilecomp::resolutions
opj_tcd_resolution_t * resolutions
Definition: tcd.h:143
opj_tcd_tilecomp::x0
int x0
Definition: tcd.h:141
opj_tcd_tilecomp::x1
int x1
Definition: tcd.h:141
dwt_getnorm_real
double dwt_getnorm_real(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
Definition: dwt.c:473
opj_aligned_free
#define opj_aligned_free(m)
Definition: opj_malloc.h:110
opj_stepsize
Quantization stepsize.
Definition: j2k.h:124
opj_aligned_malloc
#define opj_aligned_malloc(size)
Definition: opj_malloc.h:108
v4dwt_decode
static void v4dwt_decode(v4dwt_t *restrict dwt)
Definition: dwt.c:740
v4dwt_decode_step2
static void v4dwt_decode_step2(v4 *l, v4 *w, int k, int m, float c)
Definition: dwt.c:687
v4dwt_local::sn
int sn
Definition: dwt.c:63
opj_includes.h
opj_tcd_resolution::y0
int y0
Definition: tcd.h:131
v4dwt_local::dn
int dn
Definition: dwt.c:62
dwt_decode_max_resolution
static int dwt_decode_max_resolution(opj_tcd_resolution_t *restrict r, int i)
Definition: dwt.c:502
opj_tcd_resolution
FIXME: documentation.
Definition: tcd.h:130
opj_tcd_tilecomp
FIXME: documentation.
Definition: tcd.h:140
dwt_getgain
int dwt_getgain(int orient)
Get the gain of a subband for the reversible 5-3 DWT.
Definition: dwt.c:390
dwt_encode_stepsize
static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:309
dwt_getnorm
double dwt_getnorm(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
Definition: dwt.c:401
fix_mul
static INLINE int fix_mul(int a, int b)
Multiply two fixed-precision rational numbers.
Definition: fix.h:56
int_floorlog2
static INLINE int int_floorlog2(int a)
Get logarithm of an integer and round downwards.
Definition: int.h:107
int_min
static INLINE int int_min(int a, int b)
Get the minimum of two integers.
Definition: int.h:50
opj_tcd_tilecomp::numresolutions
int numresolutions
Definition: tcd.h:142
dwt_getgain
int dwt_getgain(int orient)
Get the gain of a subband for the reversible 5-3 DWT.
Definition: dwt.c:390
opj_tccp::numresolutions
int numresolutions
number of resolutions
Definition: j2k.h:138
dwt_encode_1_real
static void dwt_encode_1_real(int *a, int dn, int sn, int cas)
Forward 9-7 wavelet transform in 1-D.
Definition: dwt.c:274
K
static const float K
Definition: dwt.c:72
dwt_encode_real
void dwt_encode_real(opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:409
opj_tcd_resolution::x1
int x1
Definition: tcd.h:131
dwt_decode_1_
static void dwt_decode_1_(int *a, int dn, int sn, int cas)
Definition: dwt.c:246
dwt_getgain_real
int dwt_getgain_real(int orient)
Get the gain of a subband for the irreversible 9-7 DWT.
Definition: dwt.c:465
v4::f
float f[4]
Definition: dwt.c:57
dwt_local::cas
int cas
Definition: dwt.c:53
v4dwt_local::cas
int cas
Definition: dwt.c:64
v4dwt_t
struct v4dwt_local v4dwt_t
DWT1DFN
void(* DWT1DFN)(dwt_t *v)
Virtual function type for wavelet transform in 1-D.
Definition: dwt.c:81
dwt_encode
void dwt_encode(opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet tranform in 2-D.
Definition: dwt.c:326
v4dwt_interleave_v
static void v4dwt_interleave_v(v4dwt_t *restrict v, float *restrict a, int x)
Definition: dwt.c:608
restrict
#define restrict
Definition: opj_includes.h:85
opj_tccp
Tile-component coding parameters.
Definition: j2k.h:134
v4
Definition: dwt.c:56
dwt_encode_real
void dwt_encode_real(opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:409
dwt_encode_1
static void dwt_encode_1(int *a, int dn, int sn, int cas)
Forward 5-3 wavelet transform in 1-D.
Definition: dwt.c:225
v4dwt_local::wavelet
v4 * wavelet
Definition: dwt.c:61
dwt_gamma
static const float dwt_gamma
Definition: dwt.c:69
opj_tcd_resolution::x0
int x0
Definition: tcd.h:131
S
#define S(i)
Definition: dwt.c:127
dwt_deinterleave_h
static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas)
Forward lazy transform (horizontal)
Definition: dwt.c:164
dwt_beta
static const float dwt_beta
Definition: dwt.c:68
opj_tcd_tilecomp::data
int * data
Definition: tcd.h:144
dwt_interleave_h
static void dwt_interleave_h(dwt_t *h, int *a)
Inverse lazy transform (horizontal)
Definition: dwt.c:182
dwt_calc_explicit_stepsizes
void dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, int prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:477
dwt_decode_real
void dwt_decode_real(opj_tcd_tilecomp_t *tilec, int numres)
Inverse 9-7 wavelet transform in 2-D.
dwt_decode_tile
static void dwt_decode_tile(opj_tcd_tilecomp_t *tilec, int i, DWT1DFN fn)
Inverse wavelet transform in 2-D.
Definition: dwt.c:519
dwt_getnorm
double dwt_getnorm(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
Definition: dwt.c:401
v4dwt_local
Definition: dwt.c:60
dwt_calc_explicit_stepsizes
void dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, int prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:477
J2K_CCP_QNTSTY_NOQNT
#define J2K_CCP_QNTSTY_NOQNT
Definition: j2k.h:54
v4dwt_decode_step1
static void v4dwt_decode_step1(v4 *w, int count, const float c)
Definition: dwt.c:672
dwt_decode
void dwt_decode(opj_tcd_tilecomp_t *tilec, int numres)
Inverse 5-3 wavelet tranform in 2-D.
Definition: dwt.c:382
SS_
#define SS_(i)
Definition: dwt.c:132
S_
#define S_(i)
Definition: dwt.c:129
dwt_decode_real
void dwt_decode_real(opj_tcd_tilecomp_t *restrict tilec, int numres)
Definition: dwt.c:775