[trunk] Move INLINE definition within openjpeg.h header since application may use it
[openjpeg.git] / src / lib / openjp2 / mct.c
index 8a5c4afc9961acb644c735cf39a9e93ae06a3b05..d2754dc2666e3ea4b95eebccbc55f99875eaeffa 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (c) 2002-2003, Yannick Verschueren
  * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
  * Copyright (c) 2005, Herve Drolon, FreeImage Team
+ * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France 
+ * Copyright (c) 2012, CS Systemes d'Information, France
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -200,7 +202,7 @@ OPJ_FLOAT64 opj_mct_getnorm_real(OPJ_UINT32 compno) {
 }
 
 
-opj_bool opj_mct_encode_custom(
+OPJ_BOOL opj_mct_encode_custom(
                                           OPJ_BYTE * pCodingdata,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** pData,
@@ -228,7 +230,7 @@ opj_bool opj_mct_encode_custom(
        lCurrentMatrix = lCurrentData + pNbComp;
 
        for (i =0;i<lNbMatCoeff;++i) {
-               lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * lMultiplicator);
+               lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * (OPJ_FLOAT32)lMultiplicator);
        }
 
        for (i = 0; i < n; ++i)  {
@@ -253,7 +255,7 @@ opj_bool opj_mct_encode_custom(
        return OPJ_TRUE;
 }
 
-opj_bool opj_mct_decode_custom(
+OPJ_BOOL opj_mct_decode_custom(
                                           OPJ_BYTE * pDecodingData,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** pData,