In t1.c, small change to avoid calling twice t1_getwmsedec()
Patch from Callum Lewick. Basic gcc optimization flags in cmake and makefile match.
This commit is contained in:
parent
b93c12564d
commit
c38de0728d
|
@ -116,3 +116,7 @@ FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
|
||||||
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
|
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
SET(CMAKE_WARN_FLAGS "-Wall")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_WARN_FLAGS} -ffast-math -std=c99 ${CMAKE_C_FLAGS}")
|
||||||
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
|
|
@ -5,6 +5,10 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
November 8, 2007
|
||||||
|
! [FOD] In t1.c, small change to avoid calling twice t1_getwmsedec()
|
||||||
|
Patch from Callum Lewick. Basic gcc optimization flags in cmake and makefile match.
|
||||||
|
|
||||||
November 5, 2007
|
November 5, 2007
|
||||||
*+ [GB] Fixed a bug which prevented JPWL from working on multi-tiled images; added some more fields in the interface info structures (keep a list of markers, save start packet number for each tile)
|
*+ [GB] Fixed a bug which prevented JPWL from working on multi-tiled images; added some more fields in the interface info structures (keep a list of markers, save start packet number for each tile)
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -18,7 +18,7 @@ INSTALL_INCLUDE = $(PREFIX)/include
|
||||||
# Converts cr/lf to just lf
|
# Converts cr/lf to just lf
|
||||||
DOS2UNIX = dos2unix
|
DOS2UNIX = dos2unix
|
||||||
|
|
||||||
COMPILERFLAGS = -O3 -fPIC
|
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC
|
||||||
LIBRARIES = -lstdc++
|
LIBRARIES = -lstdc++
|
||||||
|
|
||||||
MODULES = $(SRCS:.c=.o)
|
MODULES = $(SRCS:.c=.o)
|
||||||
|
|
|
@ -809,6 +809,7 @@ static void t1_encode_cblk(
|
||||||
int nmsedec = 0;
|
int nmsedec = 0;
|
||||||
double cumwmsedec = 0.0;
|
double cumwmsedec = 0.0;
|
||||||
char type = T1_TYPE_MQ;
|
char type = T1_TYPE_MQ;
|
||||||
|
double tempwmsedec;
|
||||||
|
|
||||||
opj_mqc_t *mqc = t1->mqc; /* MQC component */
|
opj_mqc_t *mqc = t1->mqc; /* MQC component */
|
||||||
|
|
||||||
|
@ -851,8 +852,9 @@ static void t1_encode_cblk(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed_quality */
|
/* fixed_quality */
|
||||||
cumwmsedec += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
||||||
tile->distotile += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
cumwmsedec += tempwmsedec;
|
||||||
|
tile->distotile += tempwmsedec;
|
||||||
|
|
||||||
/* Code switch "RESTART" (i.e. TERMALL) */
|
/* Code switch "RESTART" (i.e. TERMALL) */
|
||||||
if ((cblksty & J2K_CCP_CBLKSTY_TERMALL) && !((passtype == 2) && (bpno - 1 < 0))) {
|
if ((cblksty & J2K_CCP_CBLKSTY_TERMALL) && !((passtype == 2) && (bpno - 1 < 0))) {
|
||||||
|
|
Loading…
Reference in New Issue