X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmopenjpeg%2Flibopenjpeg%2Fmct.c;h=b6e3c96eb2f4ee80e6e07aabaf4403d87368bb0c;hb=24394a63b18810c791af1c913e1a6fc712d3d3a0;hp=185c1b66dc351a6fadba150bd1a14e679e8df667;hpb=7452f3039ff4dd2574fcbf3343b530a2f20f9623;p=gdcm.git diff --git a/src/gdcmopenjpeg/libopenjpeg/mct.c b/src/gdcmopenjpeg/libopenjpeg/mct.c index 185c1b66..b6e3c96e 100644 --- a/src/gdcmopenjpeg/libopenjpeg/mct.c +++ b/src/gdcmopenjpeg/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" /* */ /* This table contains the norms of the basis function of the reversible MCT. */ /* */ -double mct_norms[3] = { 1.732, .8292, .8292 }; +static const double mct_norms[3] = { 1.732, .8292, .8292 }; /* */ /* This table contains the norms of the basis function of the irreversible MCT. */ /* */ -double mct_norms_real[3] = { 1.732, 1.805, 1.573 }; +static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 }; /* */ /* Foward reversible MCT. */ /* */ -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) /* */ /* Inverse reversible MCT. */ /* */ -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) /* */ /* Get norm of basis function of reversible MCT. */ /* */ -double mct_getnorm(int compno) -{ +double mct_getnorm(int compno) { return mct_norms[compno]; } /* */ /* Foward irreversible MCT. */ /* */ -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) /* */ /* Inverse irreversible MCT. */ /* */ -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) /* */ /* Get norm of basis function of irreversible MCT. */ /* */ -double mct_getnorm_real(int compno) -{ +double mct_getnorm_real(int compno) { return mct_norms_real[compno]; }