j2k.c: remove hardcoded constants related to m_state, and useless FIXME
[openjpeg.git] / src / lib / openmj2 / mct.h
1 /*
2  * The copyright in this software is being made available under the 2-clauses
3  * BSD License, included below. This software may be subject to other third
4  * party and contributor rights, including patent rights, and no such rights
5  * are granted under this license.
6  *
7  * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8  * Copyright (c) 2002-2014, Professor Benoit Macq
9  * Copyright (c) 2001-2003, David Janssens
10  * Copyright (c) 2002-2003, Yannick Verschueren
11  * Copyright (c) 2003-2007, Francois-Olivier Devaux
12  * Copyright (c) 2003-2014, Antonin Descampe
13  * Copyright (c) 2005, Herve Drolon, FreeImage Team
14  * All rights reserved.
15  *
16  * Redistribution and use in source and binary forms, with or without
17  * modification, are permitted provided that the following conditions
18  * are met:
19  * 1. Redistributions of source code must retain the above copyright
20  *    notice, this list of conditions and the following disclaimer.
21  * 2. Redistributions in binary form must reproduce the above copyright
22  *    notice, this list of conditions and the following disclaimer in the
23  *    documentation and/or other materials provided with the distribution.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  */
37
38 #ifndef __MCT_H
39 #define __MCT_H
40 /**
41 @file mct.h
42 @brief Implementation of a multi-component transforms (MCT)
43
44 The functions in MCT.C have for goal to realize reversible and irreversible multicomponent
45 transform. The functions in MCT.C are used by some function in TCD.C.
46 */
47
48 /** @defgroup MCT MCT - Implementation of a multi-component transform */
49 /*@{*/
50
51 /** @name Exported functions */
52 /*@{*/
53 /* ----------------------------------------------------------------------- */
54 /**
55 Apply a reversible multi-component transform to an image
56 @param c0 Samples for red component
57 @param c1 Samples for green component
58 @param c2 Samples blue component
59 @param n Number of samples for each component
60 */
61 void mct_encode(int *c0, int *c1, int *c2, int n);
62 /**
63 Apply a reversible multi-component inverse transform to an image
64 @param c0 Samples for luminance component
65 @param c1 Samples for red chrominance component
66 @param c2 Samples for blue chrominance component
67 @param n Number of samples for each component
68 */
69 void mct_decode(int *c0, int *c1, int *c2, int n);
70 /**
71 Get norm of the basis function used for the reversible multi-component transform
72 @param compno Number of the component (0->Y, 1->U, 2->V)
73 @return
74 */
75 double mct_getnorm(int compno);
76
77 /**
78 Apply an irreversible multi-component transform to an image
79 @param c0 Samples for red component
80 @param c1 Samples for green component
81 @param c2 Samples blue component
82 @param n Number of samples for each component
83 */
84 void mct_encode_real(int *c0, int *c1, int *c2, int n);
85 /**
86 Apply an irreversible multi-component inverse transform to an image
87 @param c0 Samples for luminance component
88 @param c1 Samples for red chrominance component
89 @param c2 Samples for blue chrominance component
90 @param n Number of samples for each component
91 */
92 void mct_decode_real(float* c0, float* c1, float* c2, int n);
93 /**
94 Get norm of the basis function used for the irreversible multi-component transform
95 @param compno Number of the component (0->Y, 1->U, 2->V)
96 @return
97 */
98 double mct_getnorm_real(int compno);
99 /* ----------------------------------------------------------------------- */
100 /*@}*/
101
102 /*@}*/
103
104 #endif /* __MCT_H */