summaryrefslogtreecommitdiff
path: root/libopenjpeg/mct.c
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2005-12-02 13:34:15 +0000
committerAntonin Descampe <antonin@gmail.com>2005-12-02 13:34:15 +0000
commitf61cda9b7d83e0202cbaa15bac45d358e9b3652e (patch)
tree2acfa84c798e60d15107f2399a8856be4f5a3806 /libopenjpeg/mct.c
parent76016d509bf892b555840a1bfa3b62750c878051 (diff)
openjpeg version 1.0 (previous version still available with tag opj0-97)
Diffstat (limited to 'libopenjpeg/mct.c')
-rw-r--r--libopenjpeg/mct.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/libopenjpeg/mct.c b/libopenjpeg/mct.c
index 185c1b66..d015ae1f 100644
--- a/libopenjpeg/mct.c
+++ b/libopenjpeg/mct.c
@@ -1,5 +1,9 @@
/*
- * Copyright (c) 2001-2002, David Janssens
+ * Copyright (c) 2001-2003, David Janssens
+ * Copyright (c) 2002-2003, Yannick Verschueren
+ * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
+ * Copyright (c) 2005, HervŽ Drolon, FreeImage Team
+ * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,24 +28,22 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "mct.h"
-#include "fix.h"
+#include "opj_includes.h"
/* <summary> */
/* This table contains the norms of the basis function of the reversible MCT. */
/* </summary> */
-double mct_norms[3] = { 1.732, .8292, .8292 };
+static const double mct_norms[3] = { 1.732, .8292, .8292 };
/* <summary> */
/* This table contains the norms of the basis function of the irreversible MCT. */
/* </summary> */
-double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
+static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
/* <summary> */
/* Foward reversible MCT. */
/* </summary> */
-void mct_encode(int *c0, int *c1, int *c2, int n)
-{
+void mct_encode(int *c0, int *c1, int *c2, int n) {
int i;
for (i = 0; i < n; i++) {
int r, g, b, y, u, v;
@@ -60,8 +62,7 @@ void mct_encode(int *c0, int *c1, int *c2, int n)
/* <summary> */
/* Inverse reversible MCT. */
/* </summary> */
-void mct_decode(int *c0, int *c1, int *c2, int n)
-{
+void mct_decode(int *c0, int *c1, int *c2, int n) {
int i;
for (i = 0; i < n; i++) {
int y, u, v, r, g, b;
@@ -80,16 +81,14 @@ void mct_decode(int *c0, int *c1, int *c2, int n)
/* <summary> */
/* Get norm of basis function of reversible MCT. */
/* </summary> */
-double mct_getnorm(int compno)
-{
+double mct_getnorm(int compno) {
return mct_norms[compno];
}
/* <summary> */
/* Foward irreversible MCT. */
/* </summary> */
-void mct_encode_real(int *c0, int *c1, int *c2, int n)
-{
+void mct_encode_real(int *c0, int *c1, int *c2, int n) {
int i;
for (i = 0; i < n; i++) {
int r, g, b, y, u, v;
@@ -108,8 +107,7 @@ void mct_encode_real(int *c0, int *c1, int *c2, int n)
/* <summary> */
/* Inverse irreversible MCT. */
/* </summary> */
-void mct_decode_real(int *c0, int *c1, int *c2, int n)
-{
+void mct_decode_real(int *c0, int *c1, int *c2, int n) {
int i;
for (i = 0; i < n; i++) {
int y, u, v, r, g, b;
@@ -128,7 +126,6 @@ void mct_decode_real(int *c0, int *c1, int *c2, int n)
/* <summary> */
/* Get norm of basis function of irreversible MCT. */
/* </summary> */
-double mct_getnorm_real(int compno)
-{
+double mct_getnorm_real(int compno) {
return mct_norms_real[compno];
}