2 * Copyright (c) 2001-2003, David Janssens
\r
3 * Copyright (c) 2002-2003, Yannick Verschueren
\r
4 * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
\r
5 * Copyright (c) 2005, Hervé Drolon, FreeImage Team
\r
6 * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
\r
7 * All rights reserved.
\r
9 * Redistribution and use in source and binary forms, with or without
\r
10 * modification, are permitted provided that the following conditions
\r
12 * 1. Redistributions of source code must retain the above copyright
\r
13 * notice, this list of conditions and the following disclaimer.
\r
14 * 2. Redistributions in binary form must reproduce the above copyright
\r
15 * notice, this list of conditions and the following disclaimer in the
\r
16 * documentation and/or other materials provided with the distribution.
\r
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
\r
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
\r
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
\r
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
\r
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
\r
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\r
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
\r
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
\r
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
28 * POSSIBILITY OF SUCH DAMAGE.
\r
35 @brief Implementation of a discrete wavelet transform (DWT)
\r
37 The functions in DWT.C have for goal to realize forward and inverse discret wavelet
\r
38 transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in
\r
39 DWT.C are used by some function in TCD.C.
\r
42 /** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
\r
46 /** @name Exported functions */
\r
48 /* ----------------------------------------------------------------------- */
\r
50 Forward 5-3 wavelet tranform in 2-D.
\r
51 Apply a reversible DWT transform to a component of an image.
\r
52 @param tilec Tile component information (current tile)
\r
54 void dwt_encode(opj_tcd_tilecomp_t * tilec);
\r
56 Inverse 5-3 wavelet tranform in 2-D.
\r
57 Apply a reversible inverse DWT transform to a component of an image.
\r
58 @param tilec Tile component information (current tile)
\r
59 @param stop FIXME Number of decoded resolution levels ?
\r
61 void dwt_decode(opj_tcd_tilecomp_t * tilec, int stop);
\r
63 Get the gain of a subband for the reversible 5-3 DWT.
\r
64 @param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
\r
65 @return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise
\r
67 int dwt_getgain(int orient);
\r
69 Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
\r
70 @param level Level of the wavelet function
\r
71 @param orient Band of the wavelet function
\r
72 @return Returns the norm of the wavelet function
\r
74 double dwt_getnorm(int level, int orient);
\r
76 Forward 9-7 wavelet transform in 2-D.
\r
77 Apply an irreversible DWT transform to a component of an image.
\r
78 @param tilec Tile component information (current tile)
\r
80 void dwt_encode_real(opj_tcd_tilecomp_t * tilec);
\r
82 Inverse 9-7 wavelet transform in 2-D.
\r
83 Apply an irreversible inverse DWT transform to a component of an image.
\r
84 @param tilec Tile component information (current tile)
\r
85 @param stop FIXME Number of decoded resolution levels ?
\r
87 void dwt_decode_real(opj_tcd_tilecomp_t * tilec, int stop);
\r
89 Get the gain of a subband for the irreversible 9-7 DWT.
\r
90 @param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
\r
91 @return Returns the gain of the 9-7 wavelet transform
\r
93 int dwt_getgain_real(int orient);
\r
95 Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT
\r
96 @param level Level of the wavelet function
\r
97 @param orient Band of the wavelet function
\r
98 @return Returns the norm of the 9-7 wavelet
\r
100 double dwt_getnorm_real(int level, int orient);
\r
102 FIXME : comment ???
\r
106 void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec);
\r
107 /* ----------------------------------------------------------------------- */
\r
112 #endif /* __DWT_H */
\r