[trunk] remove some warnings from -Wall -Wextra -pedantic
[openjpeg.git] / src / lib / openjp2 / mct.c
index 75066c9ff99b59b13facfe242cb5bf6ac35fdeaa..8a5c4afc9961acb644c735cf39a9e93ae06a3b05 100644 (file)
@@ -122,9 +122,9 @@ void opj_mct_encode_real(
                OPJ_INT32 r = c0[i];
                OPJ_INT32 g = c1[i];
                OPJ_INT32 b = c2[i];
-               OPJ_INT32 y =  fix_mul(r, 2449) + fix_mul(g, 4809) + fix_mul(b, 934);
-               OPJ_INT32 u = -fix_mul(r, 1382) - fix_mul(g, 2714) + fix_mul(b, 4096);
-               OPJ_INT32 v =  fix_mul(r, 4096) - fix_mul(g, 3430) - fix_mul(b, 666);
+               OPJ_INT32 y =  opj_int_fix_mul(r, 2449) + opj_int_fix_mul(g, 4809) + opj_int_fix_mul(b, 934);
+               OPJ_INT32 u = -opj_int_fix_mul(r, 1382) - opj_int_fix_mul(g, 2714) + opj_int_fix_mul(b, 4096);
+               OPJ_INT32 v =  opj_int_fix_mul(r, 4096) - opj_int_fix_mul(g, 3430) - opj_int_fix_mul(b, 666);
                c0[i] = y;
                c1[i] = u;
                c2[i] = v;
@@ -218,6 +218,8 @@ opj_bool opj_mct_encode_custom(
        OPJ_UINT32 lMultiplicator = 1 << 13;
        OPJ_INT32 * lMctPtr;
 
+    OPJ_ARG_NOT_USED(isSigned);
+
        lCurrentData = (OPJ_INT32 *) opj_malloc((pNbComp + lNbMatCoeff) * sizeof(OPJ_INT32));
        if (! lCurrentData) {
                return OPJ_FALSE;
@@ -238,7 +240,7 @@ opj_bool opj_mct_encode_custom(
                for (j=0;j<pNbComp;++j) {
                        *(lData[j]) = 0;
                        for (k=0;k<pNbComp;++k) {
-                               *(lData[j]) += fix_mul(*lMctPtr, lCurrentData[k]);
+                               *(lData[j]) += opj_int_fix_mul(*lMctPtr, lCurrentData[k]);
                                ++lMctPtr;
                        }
 
@@ -267,6 +269,8 @@ opj_bool opj_mct_decode_custom(
        OPJ_FLOAT32 * lCurrentResult = 00;
        OPJ_FLOAT32 ** lData = (OPJ_FLOAT32 **) pData;
 
+    OPJ_ARG_NOT_USED(isSigned);
+
        lCurrentData = (OPJ_FLOAT32 *) opj_malloc (2 * pNbComp * sizeof(OPJ_FLOAT32));
        if (! lCurrentData) {
                return OPJ_FALSE;