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