diff options
| author | Antonin Descampe <antonin@gmail.com> | 2011-07-10 18:36:17 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2011-07-10 18:36:17 +0000 |
| commit | c85e1a10cf00f77f0cf1f48d4336ab57a253679f (patch) | |
| tree | 7101c088fc2217958e118f196931bca27e623f1c | |
| parent | 0358177c3fc8872a38a46c2a55c84536daeae888 (diff) | |
opj-v1-branch createdopj-v1-branch
| -rw-r--r-- | CHANGES | 5 | ||||
| -rw-r--r-- | libopenjpeg/t1.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -5,6 +5,11 @@ What's New for OpenJPEG ! : changed + : added +_______ R812 : OPJ-V1-BRANCH created ______________________________ + +July 10, 2011 +! [antonin] improved encoding speed in t1_encode_cblks (credit to Giuseppe Baruffa) + July 3, 2011 * [antonin] fixed bmptoimage (see http://groups.google.com/group/openjpeg/browse_thread/thread/33a24c5896bf6391) * [antonin] fixed handling of "jp2->meth" value (Restricted ICC profile handling currently not implemented) diff --git a/libopenjpeg/t1.c b/libopenjpeg/t1.c index 1794ac22..002a82d4 100644 --- a/libopenjpeg/t1.c +++ b/libopenjpeg/t1.c @@ -1413,6 +1413,7 @@ void t1_encode_cblks( for (bandno = 0; bandno < res->numbands; ++bandno) { opj_tcd_band_t* restrict band = &res->bands[bandno]; + int bandconst = 8192 * 8192 / ((int) floor(band->stepsize * 8192)); for (precno = 0; precno < res->pw * res->ph; ++precno) { opj_tcd_precinct_t *prc = &band->precincts[precno]; @@ -1463,7 +1464,7 @@ void t1_encode_cblks( datap[(j * cblk_w) + i] = fix_mul( tmp, - 8192 * 8192 / ((int) floor(band->stepsize * 8192))) >> (11 - T1_NMSEDEC_FRACBITS); + bandconst) >> (11 - T1_NMSEDEC_FRACBITS); } } } |
