X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fopenjp2%2Fmct.c;h=8a5c4afc9961acb644c735cf39a9e93ae06a3b05;hb=cdea5c8eefde8a7837a9245ac3f9a3dc8b18aa27;hp=75066c9ff99b59b13facfe242cb5bf6ac35fdeaa;hpb=6a84a1788b0df2c412b64647510720d0a4a1a046;p=openjpeg.git diff --git a/src/lib/openjp2/mct.c b/src/lib/openjp2/mct.c index 75066c9f..8a5c4afc 100644 --- a/src/lib/openjp2/mct.c +++ b/src/lib/openjp2/mct.c @@ -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