]> Creatis software - gdcm.git/blobdiff - src/gdcmopenjpeg/libopenjpeg/mct.c
(Try to) fix troubles with WIN32 vs _WIN32 at compile time
[gdcm.git] / src / gdcmopenjpeg / libopenjpeg / mct.c
index 185c1b66dc351a6fadba150bd1a14e679e8df667..b6e3c96eb2f4ee80e6e07aabaf4403d87368bb0c 100644 (file)
@@ -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
  * 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];
 }