removed obsolete testing directory and *.nix files

This commit is contained in:
Antonin Descampe 2011-08-16 09:28:37 +00:00
parent 4091882dfb
commit d1d662768d
22 changed files with 1 additions and 1593 deletions

View File

@ -6,6 +6,7 @@ What's New for OpenJPEG
+ : added
August 16, 2011
- [antonin] removed obsolete testing directory and *.nix files
* [antonin] fixed cmake support for openjpip
August 15, 2011

View File

@ -1,183 +0,0 @@
#top Makefile.nix
include config.nix
TARGET = openjpeg
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC
INCLUDE = -I. -Ilibopenjpeg
LIBRARIES = -lstdc++
SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c \
./libopenjpeg/event.c ./libopenjpeg/image.c ./libopenjpeg/j2k.c \
./libopenjpeg/j2k_lib.c ./libopenjpeg/jp2.c ./libopenjpeg/jpt.c \
./libopenjpeg/mct.c ./libopenjpeg/mqc.c ./libopenjpeg/openjpeg.c \
./libopenjpeg/pi.c ./libopenjpeg/raw.c ./libopenjpeg/t1.c \
./libopenjpeg/t2.c ./libopenjpeg/tcd.c ./libopenjpeg/tgt.c \
INCLS = ./libopenjpeg/bio.h ./libopenjpeg/cio.h ./libopenjpeg/dwt.h \
./libopenjpeg/event.h ./libopenjpeg/fix.h ./libopenjpeg/image.h \
./libopenjpeg/int.h ./libopenjpeg/j2k.h ./libopenjpeg/j2k_lib.h \
./libopenjpeg/jp2.h ./libopenjpeg/jpt.h ./libopenjpeg/mct.h \
./libopenjpeg/mqc.h ./libopenjpeg/openjpeg.h ./libopenjpeg/pi.h \
./libopenjpeg/raw.h ./libopenjpeg/t1.h ./libopenjpeg/t2.h \
./libopenjpeg/tcd.h ./libopenjpeg/tgt.h ./libopenjpeg/opj_malloc.h \
./libopenjpeg/opj_includes.h
INSTALL_LIBDIR = $(prefix)/lib
headerdir = openjpeg-$(MAJOR).$(MINOR)
INSTALL_INCLUDE = $(prefix)/include/$(headerdir)
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
MODULES = $(SRCS:.c=.o)
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBNAME = lib$(TARGET)
ifeq ($(ENABLE_SHARED),yes)
SHAREDLIB = $(LIBNAME).so.$(MAJOR).$(MINOR).$(BUILD)
else
STATICLIB = $(LIBNAME).a
endif
default: all
all: OpenJPEG
make -C codec -f Makefile.nix all
make -C mj2 -f Makefile.nix all
ifeq ($(WITH_JPWL),yes)
make -C jpwl -f Makefile.nix all
endif
ifeq ($(WITH_JP3D),yes)
make -C jp3d -f Makefile.nix all
endif
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
install -d bin
ifeq ($(ENABLE_SHARED),yes)
install -m 755 $(SHAREDLIB) bin
(cd bin && ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR))
(cd bin && ln -sf $(SHAREDLIB) $(LIBNAME).so)
else
install -m 644 $(STATICLIB) bin
endif
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
ifeq ($(ENABLE_SHARED),yes)
$(SHAREDLIB): $(MODULES)
$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
else
$(STATICLIB): $(MODULES)
rm -f $(STATICLIB)
$(AR) r $@ $(MODULES)
endif
install: OpenJPEG
install -d $(DESTDIR)$(INSTALL_LIBDIR)
ifeq ($(ENABLE_SHARED),yes)
install -m 755 -o root -g root $(SHAREDLIB) $(DESTDIR)$(INSTALL_LIBDIR)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR) )
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
ln -sf $(SHAREDLIB) $(LIBNAME).so )
else
install -m 644 -o root -g root $(STATICLIB) $(DESTDIR)$(INSTALL_LIBDIR)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB) )
endif
install -d $(DESTDIR)$(INSTALL_INCLUDE)
install -m 644 -o root -g root libopenjpeg/openjpeg.h \
$(DESTDIR)$(INSTALL_INCLUDE)
(cd $(DESTDIR)$(prefix)/include && \
ln -sf $(headerdir)/openjpeg.h openjpeg.h)
make -C codec -f Makefile.nix install
make -C mj2 -f Makefile.nix install
ifeq ($(WITH_JPWL),yes)
make -C jpwl -f Makefile.nix install
endif
ifeq ($(WITH_JP3D),yes)
make -C jp3d -f Makefile.nix install
endif
$(LDCONFIG)
make -C doc -f Makefile.nix install
ifeq ($(WITH_JPWL),yes)
jpwl-all:
make -C jpwl -f Makefile.nix all
jpwl-install: jpwl-all
make -C jpwl -f Makefile.nix install
$(LDCONFIG)
jpwl-clean:
make -C jpwl -f Makefile.nix clean
jpwl-uninstall:
make -C jpwl -f Makefile.nix uninstall
endif
ifeq ($(WITH_JP3D),yes)
jp3d-all:
make -C jp3d -f Makefile.nix all
jp3d-install: jp3d-all
make -C jp3d -f Makefile.nix install
$(LDCONFIG)
jp3d-clean:
make -C jp3d -f Makefile.nix clean
jp3d-uninstall:
make -C jp3d -f Makefile.nix uninstall
endif
doc-all:
make -C doc -f Makefile.nix all
doc-install: doc-all
make -C doc -f Makefile.nix install
clean:
rm -rf bin
rm -f core u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB)
make -C codec -f Makefile.nix clean
make -C mj2 -f Makefile.nix clean
make -C doc -f Makefile.nix clean
ifeq ($(WITH_JPWL),yes)
make -C jpwl -f Makefile.nix clean
endif
ifeq ($(WITH_JP3D),yes)
make -C jp3d -f Makefile.nix clean
endif
doc-clean:
make -C doc -f Makefile.nix clean
uninstall:
ifeq ($(ENABLE_SHARED),yes)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
rm -f $(LIBNAME).so $(LIBNAME).so.$(MAJOR).$(MINOR) $(SHAREDLIB) )
else
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
endif
$(LDCONFIG)
rm -f $(DESTDIR)$(prefix)/include/openjpeg.h
rm -rf $(DESTDIR)$(INSTALL_INCLUDE)
make -C codec -f Makefile.nix uninstall
make -C mj2 -f Makefile.nix uninstall
make -C doc -f Makefile.nix uninstall
ifeq ($(WITH_JPWL),yes)
make -C jpwl -f Makefile.nix uninstall
endif
ifeq ($(WITH_JP3D),yes)
make -C jp3d -f Makefile.nix uninstall
endif
distclean: clean
rm -rf bin

View File

@ -1,68 +0,0 @@
#codec Makefile
include ../config.nix
CFLAGS = -Wall
INSTALL_BIN = $(prefix)/bin
INCLUDE = -I.. -I. -I../libopenjpeg -I../common
USERLIBS = -lm
ifeq ($(WITH_TIFF),yes)
INCLUDE += $(TIFF_INCLUDE)
USERLIBS += $(TIFF_LIB)
endif
ifeq ($(WITH_PNG),yes)
INCLUDE += $(PNG_INCLUDE)
USERLIBS += $(PNG_LIB)
endif
ifeq ($(WITH_LCMS2),yes)
INCLUDE += $(LCMS2_INCLUDE)
USERLIBS += $(LCMS2_LIB)
endif
ifeq ($(WITH_LCMS1),yes)
INCLUDE += $(LCMS1_INCLUDE)
USERLIBS += $(LCMS1_LIB)
endif
CFLAGS += $(INCLUDE) -lstdc++ # -g -p -pg
all: j2k_to_image image_to_j2k j2k_dump
install -d ../bin
install j2k_to_image image_to_j2k j2k_dump ../bin
ifeq ($(ENABLE_SHARED),yes)
ELIB = ../libopenjpeg.so.$(MAJOR).$(MINOR).$(BUILD)
else
ELIB = ../libopenjpeg.a
endif
j2k_to_image: j2k_to_image.c $(ELIB)
$(CC) $(CFLAGS) ../common/getopt.c index.c convert.c \
../common/color.c j2k_to_image.c \
-o j2k_to_image $(ELIB) $(USERLIBS)
image_to_j2k: image_to_j2k.c $(ELIB)
$(CC) $(CFLAGS) ../common/getopt.c index.c convert.c image_to_j2k.c \
-o image_to_j2k $(ELIB) $(USERLIBS)
j2k_dump: j2k_dump.c $(ELIB)
$(CC) $(CFLAGS) ../common/getopt.c index.c j2k_dump.c \
-o j2k_dump $(ELIB) $(USERLIBS)
clean:
rm -f j2k_to_image image_to_j2k j2k_dump
install: all
install -d $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root j2k_to_image $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root image_to_j2k $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root j2k_dump $(DESTDIR)$(INSTALL_BIN)
uninstall:
rm -f $(DESTDIR)$(INSTALL_BIN)/j2k_to_image
rm -f $(DESTDIR)$(INSTALL_BIN)/image_to_j2k
rm -f $(DESTDIR)$(INSTALL_BIN)/j2k_dump

View File

@ -1,64 +0,0 @@
#mj2 Makefile.nix
include ../config.nix
CFLAGS = -Wall
INSTALL_BIN = $(prefix)/bin
USERLIBS = -lm
INCLUDE = -I.. -I. -I../libopenjpeg -I../common
ifeq ($(WITH_LCMS2),yes)
INCLUDE += $(LCMS2_INCLUDE)
USERLIBS += $(LCMS2_LIB)
endif
ifeq ($(WITH_LCMS1),yes)
INCLUDE += $(LCMS1_INCLUDE)
USERLIBS += $(LCMS1_LIB)
endif
CFLAGS += $(INCLUDE) -lstdc++ # -g -p -pg
ifeq ($(ENABLE_SHARED),yes)
ELIB = ../libopenjpeg.so.$(MAJOR).$(MINOR).$(BUILD)
else
ELIB = ../libopenjpeg.a
endif
all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
install -d ../bin
install frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 \
wrap_j2k_in_mj2 ../bin
frames_to_mj2: frames_to_mj2.c $(ELIB)
$(CC) $(CFLAGS) ../common/getopt.c mj2_convert.c mj2.c frames_to_mj2.c \
-o frames_to_mj2 $(ELIB) $(USERLIBS)
mj2_to_frames: mj2_to_frames.c $(ELIB)
$(CC) $(CFLAGS) ../common/getopt.c mj2_convert.c mj2.c \
../common/color.c mj2_to_frames.c \
-o mj2_to_frames $(ELIB) $(USERLIBS)
extract_j2k_from_mj2: extract_j2k_from_mj2.c $(ELIB)
$(CC) $(CFLAGS) mj2.c extract_j2k_from_mj2.c \
-o extract_j2k_from_mj2 $(ELIB) $(USERLIBS)
wrap_j2k_in_mj2: wrap_j2k_in_mj2.c $(ELIB)
$(CC) $(CFLAGS) mj2.c wrap_j2k_in_mj2.c \
-o wrap_j2k_in_mj2 $(ELIB) $(USERLIBS)
clean:
rm -f frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
install: all
install -d $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root frames_to_mj2 $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root mj2_to_frames $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root extract_j2k_from_mj2 $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root wrap_j2k_in_mj2 $(DESTDIR)$(INSTALL_BIN)
uninstall:
rm -f $(DESTDIR)$(INSTALL_BIN)/frames_to_mj2
rm -f $(DESTDIR)$(INSTALL_BIN)/mj2_to_frames
rm -f $(DESTDIR)$(INSTALL_BIN)/extract_j2k_from_mj2
rm -f $(DESTDIR)$(INSTALL_BIN)/wrap_j2k_in_mj2

View File

@ -1,43 +0,0 @@
MAJOR = 1
MINOR = 4
BUILD = 0
prefix=/usr/local
CC = gcc
AR = ar
#
#Set this to no if you do no want to compile/install shared libs.
ENABLE_SHARED = yes
#
#Set to yes if you BOTH have the library AND the header
#Set to no if a file is missing or you hate it.
#Either lcms or lcms2 : not both
#==== HAVE YOU CREATED opj_config.h FROM opj_config.h.in.user ? ====
#==== SHOULD BE IN SYNC WITH opj_config.h ====
WITH_LCMS1 = no
WITH_LCMS2 = no
WITH_PNG = no
WITH_TIFF = no
#
# Set to yes if you want compile/install
# jpwl libraries/binaries
WITH_JPWL = no
#
#Set to yes if you have doxygen installed
#Set to no if doxygen is missing.
HAS_DOXYGEN = no
#Check whether these paths are correct; change them appropiatly.
LCMS1_INCLUDE = -I/usr/include
LCMS2_INCLUDE = -I/usr/include
PNG_INCLUDE = -I/usr/include
TIFF_INCLUDE = -I/usr/include
LCMS1_LIB = -L/usr/lib -llcms
LCMS2_LIB = -L/usr/lib -llcms2
PNG_LIB = -L/usr/lib -lpng -lz
#tiff with jpeg/jbig support?
JBIG_LIB = -ljbig
JBIG85_LIB = -ljbig85
JPEG_LIB = -ljpeg
TIFF_LIB = -L/usr/lib -ltiff $(JPEG_LIB) $(JBIG_LIB) $(JBIG85_LIB)

View File

@ -1,47 +0,0 @@
#doc Makefile.nix
include ../config.nix
doc_dir = $(prefix)/share/doc/openjpeg-$(MAJOR).$(MINOR)
man_dir = $(prefix)/share/man
ifeq ($(HAS_DOXYGEN),yes)
docs:
doxygen Doxyfile.dox
endif
clean:
rm -rf html
install:
cp man/man1/* .
cp man/man3/* .
install -d $(doc_dir)
install -d $(man_dir)/man1 $(man_dir)/man3
ifeq ($(WITH_JPWL),yes)
(cd $(man_dir)/man1 && rm -f JPWL_image_to_j2k* JPWL_j2k_to_image* )
(cd $(man_dir)/man3 && rm -f JPWL_libopenjpeg* )
endif
(cd $(man_dir)/man1 && rm -f image_to_j2k* j2k_to_image* j2k_dump* )
(cd $(man_dir)/man3 && rm -f libopenjpeg* )
gzip -f image_to_j2k.1 j2k_to_image.1 j2k_dump.1 libopenjpeg.3
cp -f image_to_j2k.1.gz j2k_to_image.1.gz j2k_dump.1.gz $(man_dir)/man1
cp -f libopenjpeg.3.gz $(man_dir)/man3
rm -f *\.gz
ifeq ($(WITH_JPWL),yes)
(cd $(man_dir)/man1 && \
ln -sf image_to_j2k.1.gz JPWL_image_to_j2k.1.gz && \
ln -sf j2k_to_image.1.gz JPWL_j2k_to_image.1.gz)
(cd $(man_dir)/man3 && ln -sf libopenjpeg.3.gz JPWL_libopenjpeg.3.gz)
endif
cp ../LICENSE ../CHANGES $(doc_dir)
uninstall:
rm -rf $(doc_dir)
ifeq ($(WITH_JPWL),yes)
(cd $(man_dir)/man1 && rm -f JPWL_image_to_j2k* JPWL_j2k_to_image* )
(cd $(man_dir)/man3 && rm -f JPWL_libopenjpeg* )
endif
(cd $(man_dir)/man1 && rm -f image_to_j2k* j2k_to_image* j2k_dump* )
(cd $(man_dir)/man3 && rm -f libopenjpeg* )

View File

@ -1,152 +0,0 @@
#jpwl Makefile
include ../config.nix
TARGET = openjpeg_JPWL
COMPILERFLAGS = -Wall -ffast-math -std=c99 -fPIC
USERLIBS =
JPWL_SRCS = ./crc.c ./jpwl.c ./jpwl_lib.c ./rs.c
SRCS = ../libopenjpeg/bio.c ../libopenjpeg/cio.c ../libopenjpeg/dwt.c \
../libopenjpeg/event.c ../libopenjpeg/image.c ../libopenjpeg/j2k.c \
../libopenjpeg/j2k_lib.c ../libopenjpeg/jp2.c ../libopenjpeg/jpt.c \
../libopenjpeg/mct.c ../libopenjpeg/mqc.c ../libopenjpeg/openjpeg.c \
../libopenjpeg/pi.c ../libopenjpeg/raw.c ../libopenjpeg/t1.c \
../libopenjpeg/t2.c ../libopenjpeg/tcd.c ../libopenjpeg/tgt.c \
$(JPWL_SRCS)
INCLS = ../libopenjpeg/bio.h ../libopenjpeg/cio.h ../libopenjpeg/dwt.h \
../libopenjpeg/event.h ../libopenjpeg/fix.h ../libopenjpeg/image.h \
../libopenjpeg/int.h ../libopenjpeg/j2k.h ../libopenjpeg/j2k_lib.h \
../libopenjpeg/jp2.h ../libopenjpeg/jpt.h ../libopenjpeg/mct.h \
../libopenjpeg/mqc.h ../libopenjpeg/openjpeg.h ../libopenjpeg/pi.h \
../libopenjpeg/raw.h ../libopenjpeg/t1.h ../libopenjpeg/t2.h \
../libopenjpeg/tcd.h ../libopenjpeg/tgt.h ../libopenjpeg/opj_malloc.h \
../libopenjpeg/opj_includes.h
INCLUDE = -I.. -I. -I../libopenjpeg -I../common
INSTALL_LIBDIR = $(prefix)/lib
INSTALL_BIN = $(prefix)/bin
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
LIBRARIES = -lstdc++
ifeq ($(WITH_TIFF),yes)
INCLUDE += $(TIFF_INCLUDE)
USERLIBS += $(TIFF_LIB)
endif
ifeq ($(WITH_PNG),yes)
INCLUDE += $(PNG_INCLUDE)
USERLIBS += $(PNG_LIB)
endif
ifeq ($(WITH_LCMS2),yes)
INCLUDE += $(LCMS2_INCLUDE)
USERLIBS += $(LCMS2_LIB)
endif
ifeq ($(WITH_LCMS1),yes)
INCLUDE += $(LCMS1_INCLUDE)
USERLIBS += $(LCMS1_LIB)
endif
USERLIBS += -lm
MODULES = $(SRCS:.c=.o)
CFLAGS = $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
LIBNAME = lib$(TARGET)
ifeq ($(ENABLE_SHARED),yes)
SHAREDLIB = $(LIBNAME).so.$(MAJOR).$(MINOR).$(BUILD)
else
STATICLIB = $(LIBNAME).a
endif
default: all
all: OpenJPEG_JPWL JPWL_image_to_j2k JPWL_j2k_to_image
install -d ../bin
ifeq ($(ENABLE_SHARED),yes)
install -m 755 $(SHAREDLIB) ../bin
(cd ../bin && ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR))
(cd ../bin && ln -sf $(LIBNAME).so.$(MAJOR).$(MINOR) $(LIBNAME).so)
else
install -m 644 $(STATICLIB) ../bin
endif
install JPWL_image_to_j2k JPWL_j2k_to_image ../bin
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
OpenJPEG_JPWL: $(STATICLIB) $(SHAREDLIB)
JPWL_codec: JPWL_j2k_to_image JPWL_image_to_j2k $(STATICLIB)
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
ifeq ($(ENABLE_SHARED),yes)
$(SHAREDLIB): $(MODULES)
$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
else
$(STATICLIB): $(MODULES)
$(AR) r $@ $(MODULES)
endif
ifeq ($(ENABLE_SHARED),yes)
ELIB = $(SHAREDLIB)
else
ELIB = $(STATICLIB)
endif
JPWL_j2k_to_image: ../codec/j2k_to_image.c
$(CC) $(CFLAGS) ../common/getopt.c ../codec/index.c \
../codec/convert.c ../common/color.c ../codec/j2k_to_image.c \
-o JPWL_j2k_to_image $(ELIB) $(USERLIBS)
JPWL_image_to_j2k: ../codec/image_to_j2k.c
$(CC) $(CFLAGS) ../common/getopt.c ../codec/index.c \
../codec/convert.c ../codec/image_to_j2k.c \
-o JPWL_image_to_j2k $(ELIB) $(USERLIBS)
install: OpenJPEG_JPWL
install -d $(DESTDIR)$(INSTALL_LIBDIR)
ifeq ($(ENABLE_SHARED),yes)
install -m 755 -o root -g root $(SHAREDLIB) $(DESTDIR)$(INSTALL_LIBDIR)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR) )
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
ln -sf $(LIBNAME).so.$(MAJOR).$(MINOR) $(LIBNAME).so )
else
install -m 644 -o root -g root $(STATICLIB) $(DESTDIR)$(INSTALL_LIBDIR)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB))
endif
install -d $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root JPWL_j2k_to_image $(DESTDIR)$(INSTALL_BIN)
install -m 755 -o root -g root JPWL_image_to_j2k $(DESTDIR)$(INSTALL_BIN)
cleanlib:
rm -f core u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB)
cleancodec:
rm -f JPWL_j2k_to_image JPWL_image_to_j2k JPWL_j2k_to_image.o \
JPWL_image_to_j2k.o
clean: cleanlib cleancodec
uninstall:
ifeq ($(ENABLE_SHARED),yes)
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
rm -f $(LIBNAME).so $(LIBNAME).so.$(MAJOR).$(MINOR) $(SHAREDLIB))
else
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
endif
rm -f $(DESTDIR)$(INSTALL_BIN)/JPWL_j2k_to_image
rm -f $(DESTDIR)$(INSTALL_BIN)/JPWL_image_to_j2k

View File

@ -1,41 +0,0 @@
/* If you want to build the library manually without using
* 'configure' or 'CMake'
* then copy this file
* 'opj_config.h.in.user'
* to
* 'opj_config.h'
*
* Open 'opj_config.h' and change the file contents
* if you want to define something because you know you have
* BOTH installed the library AND the header file(s).
* Then e.g. write
#define HAVE_LIBPNG 1
*
*
* The file 'opj_config.h' will be included in some source files.
* ==== YOU CAN NOT COMPILE WITHOUT IT. ====
* === DO NOT FOREGET TO CHANGE 'config.nix' APPROPRIATELY. ====
*/
/* DO NOT DEFINE BOTH VERSIONS OF LCMS */
/* define to 1 if you have both liblcms and lcms.h installed */
#undef HAVE_LIBLCMS1
/* #define HAVE_LIBLCMS1 1 */
/* define to 1 if you have both liblcms2 and lcms2.h installed */
#undef HAVE_LIBLCMS2
/* #define HAVE_LIBLCMS2 1 */
/* define to 1 if you have both libpng and png.h installed */
#undef HAVE_LIBPNG
/* #define HAVE_LIBPNG 1 */
/* define to 1 if you have both libtiff and tiff.h installed */
#undef HAVE_LIBTIFF
/* #define HAVE_LIBTIFF 1 */
/*---------------- DO NOT CHANGE BELOW THIS LINE ----------------*/
#define PACKAGE_URL "http://www.openjpeg.org/"
#define PACKAGE_BUGREPORT "http://code.google.com/p/openjpeg/"
#define PACKAGE_VERSION "1.4.0"

View File

@ -1,2 +0,0 @@
OPJ_Validate_Makee: OPJ_Validate.c md5.c
gcc -o OPJ_Validate OPJ_Validate.c md5.c -I.

View File

@ -1,100 +0,0 @@
#Version 0.1 - February 9th 2007
#Usage: OPJ_Validate OpenJPEG_command_line
#Example: OPJ_Validate image_to_j2k.exe -i original/Bretagne1.ppm -o original/Bretagne1.j2k -r 200, 50, 10
#Attention: don't forget the *.exe extension for the executable file, and check the paths
image_to_j2k.exe -i original/Bretagne1.ppm -o temp/Bretagne1_0.j2k -r 200,50,10
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.ppm
image_to_j2k.exe -i original/Bretagne2.ppm -o temp/Bretagne2_0.j2k -c [128,128],[128,128],[128,128] -r 100,20,2 -t 640,480 -b 32,32
j2k_to_image.exe -i original/Bretagne2.j2k -o temp/Bretagne2.ppm -r 2
image_to_j2k.exe -i original/Cevennes1.bmp -o temp/Cevennes1.j2k -r 10
j2k_to_image.exe -i original/Cevennes1.j2k -o temp/Cevennes1.bmp -l 2
image_to_j2k.exe -i original/Cevennes2.ppm -o temp/Cevennes2.jp2 -r 50
j2k_to_image.exe -i original/Cevennes2.jp2 -o temp/Cevennes2.ppm
image_to_j2k.exe -i original/Rome.bmp -o temp/Rome.jp2 -q 30,35,50 -p LRCP -n 3
j2k_to_image.exe -i original/Rome.jp2 -o temp/Rome.ppm
image_to_j2k.exe -i original/Bretagne1.ppm -o temp/Bretagne1_1.j2k -q 30,35,40 -n 2
image_to_j2k.exe -i original/Bretagne1.ppm -o temp/Bretagne1_2.j2k -q 30,35,40 -b 16,16 -c [101,101]
image_to_j2k.exe -i original/Bretagne2.ppm -o temp/Bretagne2_1.j2k -t 127,127 -p PCRL
image_to_j2k.exe -i original/X_4_2K_24_185_CBR_WB_000.tif -o temp/X_4_2K_24_185_CBR_WB_000.j2k -cinema2K 24
image_to_j2k.exe -i original/X_5_2K_24_235_CBR_STEM24_000.tif -o temp/X_5_2K_24_235_CBR_STEM24_000.j2k -cinema2K 48
image_to_j2k.exe -i original/X_6_2K_24_FULL_CBR_CIRCLE_000.tif -o temp/X_6_2K_24_FULL_CBR_CIRCLE_000.j2k -cinema2K 24
#à remettre
#image_to_j2k.exe -i original/X_16_4K_24_185_CBR_WB_000.tif -o temp/X_16_4K_24_185_CBR_WB_000.j2k -cinema4K
j2k_to_image.exe -i original/A_4_2K_24_185_CBR_WB_000.j2k -o temp/A_4_2K_24_185_CBR_WB_000.tif
j2k_to_image.exe -i original/B_5_2K_24_235_CBR_STEM24_000.j2k -o temp/B_5_2K_24_235_CBR_STEM24_000.tif
j2k_to_image.exe -i original/C_6_2K_24_FULL_CBR_CIRCLE_000.j2k -o temp/C_6_2K_24_FULL_CBR_CIRCLE_000.tif
#à remettre
#j2k_to_image.exe -i original/C_18_4K_24_FULL_CBR_CIRCLE_000.j2k -o temp/C_18_4K_24_FULL_CBR_CIRCLE_000.tif
j2k_to_image.exe -i original/p0_01.j2k -o temp/p0_01.tif
j2k_to_image.exe -i original/p0_02.j2k -o temp/p0_02.tif
j2k_to_image.exe -i original/p0_03.j2k -o temp/p0_03.tif
j2k_to_image.exe -i original/p0_04.j2k -o temp/p0_04.tif
#à remettre
#j2k_to_image.exe -i original/p0_07.j2k -o temp/p0_07.tif
j2k_to_image.exe -i original/p0_08.j2k -o temp/p0_08.tif
j2k_to_image.exe -i original/p0_09.j2k -o temp/p0_09.tif
j2k_to_image.exe -i original/p0_10.j2k -o temp/p0_10.tif
j2k_to_image.exe -i original/p0_11.j2k -o temp/p0_11.tif
j2k_to_image.exe -i original/p0_12.j2k -o temp/p0_12.tif
j2k_to_image.exe -i original/p0_14.j2k -o temp/p0_14.tif
j2k_to_image.exe -i original/p0_15.j2k -o temp/p0_15.tif
j2k_to_image.exe -i original/p0_16.j2k -o temp/p0_16.tif
j2k_to_image.exe -i original/p1_01.j2k -o temp/p1_01.tif
j2k_to_image.exe -i original/p1_02.j2k -o temp/p1_02.tif
j2k_to_image.exe -i original/p1_04.j2k -o temp/p1_04.tif
j2k_to_image.exe -i original/p1_05.j2k -o temp/p1_05.tif
j2k_to_image.exe -i original/p1_06.j2k -o temp/p1_06.tif
image_to_j2k.exe -i original/c0p0_01.pgx -o temp/c0p0_01.j2k
image_to_j2k.exe -i original/c0p0_02.pgx -o temp/c0p0_02.j2k
image_to_j2k.exe -i original/c0p0_03r0.pgx -o temp/c0p0_03r0.j2k
image_to_j2k.exe -i original/c0p0_03r1.pgx -o temp/c0p0_03r1.j2k
image_to_j2k.exe -i original/c0p0_04.pgx -o temp/c00_p04.j2k
image_to_j2k.exe -i original/c0p0_05.pgx -o temp/c0p0_05.j2k
image_to_j2k.exe -i original/c0p0_06.pgx -o temp/c0p0_06.j2k
image_to_j2k.exe -i original/c0p0_07.pgx -o temp/c0p0_07.j2k
image_to_j2k.exe -i original/c0p0_08.pgx -o temp/c0p0_08.j2k
image_to_j2k.exe -i original/c0p0_09.pgx -o temp/c0p0_09.j2k
image_to_j2k.exe -i original/c0p0_10.pgx -o temp/c0p0_10.j2k
image_to_j2k.exe -i original/c0p0_11.pgx -o temp/c0p0_11.j2k
image_to_j2k.exe -i original/c0p0_12.pgx -o temp/c0p0_12.j2k
image_to_j2k.exe -i original/c0p0_13.pgx -o temp/c0p0_13.j2k
image_to_j2k.exe -i original/c0p0_14.pgx -o temp/c0p0_14.j2k
image_to_j2k.exe -i original/c0p0_15r0.pgx -o temp/c0p0_15r0.j2k
image_to_j2k.exe -i original/c0p0_15r1.pgx -o temp/c0p0_15r1.j2k
image_to_j2k.exe -i original/c0p0_16.pgx -o temp/c0p0_16.j2k
image_to_j2k.exe -i original/c0p1_04r0.pgx -o temp/c0p1_04r0.j2k
image_to_j2k.exe -i original/c0p1_05.pgx -o temp/c0p1_05.j2k
image_to_j2k.exe -i original/c1p0_01_0.pgx -o temp/c1p0_01_0.j2k
image_to_j2k.exe -i original/c1p0_02_0.pgx -o temp/c1p0_02_0.j2k
image_to_j2k.exe -i original/c1p0_03_0.pgx -o temp/c1p0_03_0.j2k
image_to_j2k.exe -i original/c1p0_04_0.pgx -o temp/c1p0_04_0.j2k
image_to_j2k.exe -i original/c1p0_05_0.pgx -o temp/c1p0_05_0.j2k
image_to_j2k.exe -i original/c1p0_06_0.pgx -o temp/c1p0_06_0.j2k
image_to_j2k.exe -i original/c1p0_07_0.pgx -o temp/c1p0_07_0.j2k
image_to_j2k.exe -i original/c1p0_08_0.pgx -o temp/c1p0_08_0.j2k
image_to_j2k.exe -i original/c1p0_09_0.pgx -o temp/c1p0_09_0.j2k
image_to_j2k.exe -i original/c1p0_10_0.pgx -o temp/c1p0_10_0.j2k
image_to_j2k.exe -i original/c1p0_11_0.pgx -o temp/c1p0_11_0.j2k
image_to_j2k.exe -i original/c1p0_12_0.pgx -o temp/c1p0_12_0.j2k
image_to_j2k.exe -i original/c1p0_13_0.pgx -o temp/c1p0_13_0.j2k
image_to_j2k.exe -i original/c1p0_14_0.pgx -o temp/c1p0_14_0.j2k
image_to_j2k.exe -i original/c1p0_15_0.pgx -o temp/c1p0_15_0.j2k
image_to_j2k.exe -i original/c1p0_16_0.pgx -o temp/c1p0_16_0.j2k
image_to_j2k.exe -i original/c1p1_02_0.pgx -o temp/c1p1_02_0.j2k
image_to_j2k.exe -i original/c1p1_05_0.pgx -o temp/c1p1_05_0.j2k
image_to_j2k.exe -i original/Bretagne2.ppm -o temp/Bretagne2_2.j2k -s 2,2 -SOP
image_to_j2k.exe -i original/Bretagne2.ppm -o temp/Bretagne2_3.j2k -EPH -M 38
image_to_j2k.exe -i original/Bretagne2.ppm -o temp/Bretagne2_4.j2k -d 150,300 -r 800
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.bmp
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.bmp -r 2
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.tga
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.tga -r 2
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.pnm
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.pnm -r 2
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.ppm -r 2
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.raw
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.raw -r 2
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1.tif
j2k_to_image.exe -i original/Bretagne1.j2k -o temp/Bretagne1r2.tif -r 2
j2k_to_image.exe -i original/p0_03.j2k -o p0_03.pgx

View File

@ -1,244 +0,0 @@
/*
* Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2007, Professor Benoit Macq
* Copyright (c) 2003-2007, Francois-Olivier Devaux
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include <windows.h>
#endif /* _WIN32 */
#include <stdio.h>
#include <string.h>
#include "md5.h"
#define OPJ_Bin_Dir "OPJ_Binaries"
int doprocess(char programme[4096],char command_line[4096]) {
#ifdef _WIN32
int exit=STILL_ACTIVE;
STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
siStartupInfo.cb = sizeof(siStartupInfo);
if(CreateProcess(programme, // Application name
command_line, // Application arguments
0,
0,
FALSE,
CREATE_DEFAULT_ERROR_MODE,
0,
0, // Working directory
&siStartupInfo,
&piProcessInfo) == FALSE)
return 1;
exit=STILL_ACTIVE;
while(exit==STILL_ACTIVE) {
Sleep(1000);
GetExitCodeProcess(piProcessInfo.hProcess,&exit);
}
return 0;
#else /* !_WIN32 */
printf("\n%s\n", command_line);
system(command_line);
return 0;
#endif /* _WIN32 */
}
char MD5_process(char *input_filename, char *md5_filename) {
MD5_CTX mdContext;
int bytes;
unsigned char data[1024];
FILE *input_file, *md5_file;
input_file = fopen(input_filename, "rb");
if (!input_file) {
printf("Error opening file %s\n", input_filename);
return 1;
}
md5_file = fopen(md5_filename, "wb");
if (!md5_file) {
printf("Error opening file %s\n", md5_filename);
return 1;
}
MD5Init (&mdContext);
while ((bytes = fread (data, 1, 1024, input_file)) != 0)
MD5Update (&mdContext, data, bytes);
MD5Final (&mdContext);
fwrite(mdContext.digest,16,1,md5_file);
fclose(input_file);
fclose(md5_file);
return 0;
}
char fcompare(char *input_filename, char *output_filename) {
FILE *input_file, *output_file;
unsigned char input_buffer[17], output_buffer[17];
char comparison;
input_file = fopen(input_filename, "rb");
if (!input_file) {
printf("Error opening file %s\n", input_filename);
return -1;
}
output_file = fopen(output_filename, "rb");
if (!output_file) {
printf("Error opening file %s\n", output_filename);
return -1;
}
fread(input_buffer,16,1,input_file);
fread(output_buffer,16,1,output_file);
fclose(input_file);
fclose(output_file);
input_buffer[16] = 0;
output_buffer[16] = 0;
comparison = strcmp(input_buffer, output_buffer);
if (comparison)
return 1;
return 0;
}
int main(int argc, char* argv[]) {
FILE *param_file, *md5_file;
FILE *report_file;
char line[4096];
char md5_filename[4096], tempmd5_filename[4096], temp[4096], report_filename[4096];
char output_filename[4096];
char input_cmdline[4096];
char command_line[4096], exefile[4096];
int task_counter = 0, word_counter;
char bin_dir[4096];
unsigned int word_pointer;
char ch[4096];
char comparison;
int num_failed = 0;
int num_inexistant = 0;
int num_passed = 0;
if (argc != 3) {
printf("Error with command line. \nExpected: OPJ_Validate parameter_filename bin_directory\n Example: OPJ_Validate parameters_01.txt version1.1.a\n\n");
return 1;
}
param_file = fopen(argv[1],"rb");
if (!param_file) {
printf("Error opening parameter file %s\n",argv[1]);
return 1;
}
sprintf(bin_dir,"%s/%s",OPJ_Bin_Dir,argv[2]);
sprintf(tempmd5_filename,"temp/tempmd5.txt");
sprintf(report_filename,"%s/report.txt",bin_dir);
report_file = fopen(report_filename, "wb");
if (!report_file) {
printf("Unable to open report file %s", report_filename);
return 1;
}
while (fgets(line, 4096, param_file) != NULL) {
if (line[0] != '#' && line[0] != 0x0d) { // If not a comment line
sscanf(line, "%s", temp);
word_pointer = 0;
sprintf(input_cmdline,"");
sscanf(line+word_pointer,"%s",ch);
sprintf(exefile,"%s/%s",bin_dir,ch);
word_counter = 0;
while (sscanf(line+word_pointer,"%s",ch) > 0) {
if (word_counter == 4)
strcpy(output_filename, ch);
word_pointer += strlen(ch)+1;
sprintf(input_cmdline,"%s%s ",input_cmdline, ch);
word_counter++;
}
sprintf(md5_filename,"%s.md5",output_filename);
task_counter++;
sprintf(command_line,"%s/%s",bin_dir,input_cmdline);
printf("Task %d\nMD5 file: %s\nCommand line: \"%s\"\n",task_counter, md5_filename,command_line);
fprintf(report_file,"Task %d\n MD5 file: %s\n Command line: \"%s\"\n",task_counter, md5_filename,command_line);
if (doprocess(exefile,command_line)) {
printf("Error executing: \"%s\" \n", command_line);
fprintf(report_file,"Task %d failed because command line is not valid.\n\n", task_counter);
}
else {
// Check if MD5 reference exists
md5_file = fopen(md5_filename,"rb");
if (md5_file) {
fclose(md5_file);
if (MD5_process(output_filename, tempmd5_filename))
return 1;
comparison = fcompare(tempmd5_filename, md5_filename);
if (comparison == -1)
return 1;
else if (comparison) {
printf("ERROR: %s and %s are different.\nThe codec seems to behave differently.\n\n", tempmd5_filename, md5_filename);
fprintf(report_file,"ERROR: %s and %s are different.\nThe codec seems to behave differently.\n\n", tempmd5_filename, md5_filename);
num_failed++;
}
else {
printf("%s and %s are the same.\nTask %d OK\n\n",tempmd5_filename, md5_filename, task_counter);
fprintf(report_file," %s and %s are the same.\nTask %d OK\n\n",tempmd5_filename, md5_filename, task_counter);
num_passed++;
}
remove(tempmd5_filename);
}
else {
if (MD5_process(output_filename, md5_filename))
return 1;
printf("... MD5 of %s was inexistant. It has been created\n\n", output_filename);
fprintf(report_file,"MD5 of %s was inexistant. It has been created\n\n", output_filename);
num_inexistant++;
}
}
}
}
printf("\nREPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);
fprintf(report_file,"\nREPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);
fclose(param_file);
fclose(report_file);
}

View File

@ -1,108 +0,0 @@
# Microsoft Developer Studio Project File - Name="OPJ_Validate" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=OPJ_Validate - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "OPJ_Validate.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "OPJ_Validate.mak" CFG="OPJ_Validate - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "OPJ_Validate - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "OPJ_Validate - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "OPJ_Validate - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x80c /d "NDEBUG"
# ADD RSC /l 0x80c /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "OPJ_Validate - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x80c /d "_DEBUG"
# ADD RSC /l 0x80c /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "OPJ_Validate - Win32 Release"
# Name "OPJ_Validate - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\md5.c
# End Source File
# Begin Source File
SOURCE=.\OPJ_Validate.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\md5.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "OPJ_Validate"=".\OPJ_Validate.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,8 +0,0 @@
cd temp
erase *.ppm
erase *.j2k
erase *.bmp
erase *.tif
erase *.jp2
cd ..
OPJ_Validate.exe OPJ_Param_File_v0_1.txt testv2

View File

@ -1,16 +0,0 @@
#!/bin/bash
cd temp
erase *.ppm
erase *.j2k
erase *.bmp
erase *.tif
erase *.jp2
cd ..
echo
echo "Type the name of the directory (inside OPJ_Binaries) "
echo "containing your executables to compared with reference, followed by [ENTER] (example: rev101):"
read compdir
./OPJ_Validate linux_OPJ_Param_File_v0_1.txt $compdir
echo

View File

@ -1,4 +0,0 @@
cd temp
erase *.md5
cd ..
OPJ_Validate.exe OPJ_Param_File_v0_1.txt rev490

View File

@ -1,13 +0,0 @@
#!/bin/bash
#Create Reference images and hash
echo
echo "Type the name of the directory (inside OPJ_Binaries) "
echo "containing your reference executables, followed by [ENTER] (example: rev100):"
read refdir
cd temp
rm *.md5
cd ..
./OPJ_Validate linux_OPJ_Param_File_v0_1.txt $refdir
echo

View File

@ -1,46 +0,0 @@
Initialization
--------------
Download the source images into the /original directory from http://www.openjpeg.org/OPJ_Validate_OriginalImages.7z
Usage
-----
Usage: OPJ_Validate batch_text_file bin_directory
Example: OPJ_Validate OPJ_Param_File_v0_1.txt v1.1.a
where OPJ_Param_File_v0_1.txt is a file containing a list of compression and decompression parameters
and v1.1.a is a directory inside the directory OPJ_Binaries containing the openjpeg executables (j2k_to_image.exe and image_to_j2k.exe)
Example with batch file: You consider revision 490 (/rev490) as stable, and would like to compare it a new version, revision 493 (rev493).
Batch mode
----------
1) Calculate the reference by running the "OPJ_Validate_Create_Ref rev490" file (.sh or .bat depending on your os)
2) Compare the candidate revision with ther reference by running the "OPJ_Validate_Candidate_vs_Ref rev493" file
3) The results of the comparison are given at the end of the processing. They are also available in the bin directory OPJ_Binaries/rev493/report.txt
Manual mode
-----------
1) Put the j2k_to_image.exe and image_to_j2k.exe binaries of both revisions in the OPJ_Binaries directory (OPJ_Binaries/rev490 and OPJ_Binaries/rev493)
2) Start by initializing the validation with revision 490.
a) Modify OPJ_Validate_init.bat and set the last line to "OPJ_Validate.exe OPJ_Param_File_v0_1.txt rev490"
b) Execute OPJ_Validate_init.bat
3) Compare the reference files generated in the previous step with files generated with revision 493
a) Modify OPJ_Validate_run.bat and set the last line to "OPJ_Validate.exe OPJ_Param_File_v0_1.txt rev493"
b) Execute OPJ_Validate_run.bat
4) Read the results in the binaries directory of revision 493 (OPJ_Binaries/rev493/report.txt)
Search for the word "ERROR:" in that file.
If this word is not present in the report, this means that both codecs of rev490 and rev493 gave the same results.
Otherwise, it means that for certain encoding/decoding parameters, the codecs behave differently.
Example of error
Task 17
MD5 file: temp/A_4_2K_24_185_CBR_WB_000.tif.md5
Command line: "OPJ_Binaries/rev473/j2k_to_image.exe -i original/A_4_2K_24_185_CBR_WB_000.j2k -o temp/A_4_2K_24_185_CBR_WB_000.tif "
ERROR: temp/tempmd5.txt and temp/A_4_2K_24_185_CBR_WB_000.tif.md5 are different.
The codec seems to behave differently.
This means that the rev490 and rev493 created two different versions of file A_4_2K_24_185_CBR_WB_000.tif with the command line given above.
An error might have been caused by switching to this new revision.
Warning: Do not take the last line of the report.txt file into account ( Cool. All files passed the tests !) as it is a bug. Search for the word "ERROR:" to detect potential errors.
5) If no error is detected, you can commit the changes to the OpenJPEG repository

View File

@ -1,89 +0,0 @@
#OPJ Parameter file
#Version 0.1 - February 9th 2007
#Usage: OPJ_Validate OpenJPEG_command_line
#Example: OPJ_Validate image_to_j2k.exe -i original/Bretagne1.ppm -o original/Bretagne1.j2k -r 200, 50, 10
#Attention: don't forget the *.exe extension for the executable file, and check the paths
#
image_to_j2k -i original/Bretagne1.ppm -o temp/Bretagne1_0.j2k -r 200,50,10
j2k_to_image -i original/Bretagne1.j2k -o temp/Bretagne1.ppm
image_to_j2k -i original/Bretagne2.ppm -o temp/Bretagne2_0.j2k -c [128,128],[128,128],[128,128] -r 100,20,2 -t 640,480 -b 32,32
j2k_to_image -i original/Bretagne2.j2k -o temp/Bretagne2.ppm -r 2
image_to_j2k -i original/Cevennes1.bmp -o temp/Cevennes1.j2k -r 10
j2k_to_image -i original/Cevennes1.j2k -o temp/Cevennes1.bmp -l 2
image_to_j2k -i original/Cevennes2.ppm -o temp/Cevennes2.jp2 -r 50
j2k_to_image -i original/Cevennes2.jp2 -o temp/Cevennes2.ppm
image_to_j2k -i original/Rome.bmp -o temp/Rome.jp2 -q 30,35,50 -p LRCP -n 3
j2k_to_image -i original/Rome.jp2 -o temp/Rome.ppm
image_to_j2k -i original/Bretagne1.ppm -o temp/Bretagne1_1.j2k -q 30,35,40 -n 2
image_to_j2k -i original/Bretagne1.ppm -o temp/Bretagne1_2.j2k -q 30,35,40 -b 16,16 -c [101,101]
image_to_j2k -i original/Bretagne2.ppm -o temp/Bretagne2_1.j2k -t 127,127 -p PCRL
image_to_j2k -i original/X_4_2K_24_185_CBR_WB_000.tif -o temp/X_4_2K_24_185_CBR_WB_000.j2k -cinema2K 24
image_to_j2k -i original/X_5_2K_24_235_CBR_STEM24_000.tif -o temp/X_5_2K_24_235_CBR_STEM24_000.j2k -cinema2K 48
image_to_j2k -i original/X_6_2K_24_FULL_CBR_CIRCLE_000.tif -o temp/X_6_2K_24_FULL_CBR_CIRCLE_000.j2k -cinema2K 24
#à remettre
#image_to_j2k -i original/X_16_4K_24_185_CBR_WB_000.tif -o temp/X_16_4K_24_185_CBR_WB_000.j2k -cinema4K
j2k_to_image -i original/A_4_2K_24_185_CBR_WB_000.j2k -o temp/A_4_2K_24_185_CBR_WB_000.tif
j2k_to_image -i original/B_5_2K_24_235_CBR_STEM24_000.j2k -o temp/B_5_2K_24_235_CBR_STEM24_000.tif
j2k_to_image -i original/C_6_2K_24_FULL_CBR_CIRCLE_000.j2k -o temp/C_6_2K_24_FULL_CBR_CIRCLE_000.tif
#à remettre
#j2k_to_image -i original/C_18_4K_24_FULL_CBR_CIRCLE_000.j2k -o temp/C_18_4K_24_FULL_CBR_CIRCLE_000.tif
j2k_to_image -i original/p0_01.j2k -o temp/p0_01.tif
j2k_to_image -i original/p0_02.j2k -o temp/p0_02.tif
j2k_to_image -i original/p0_03.j2k -o temp/p0_03.tif
j2k_to_image -i original/p0_04.j2k -o temp/p0_04.tif
#a remettre
#j2k_to_image -i original/p0_07.j2k -o temp/p0_07.tif
j2k_to_image -i original/p0_08.j2k -o temp/p0_08.tif
j2k_to_image -i original/p0_09.j2k -o temp/p0_09.tif
j2k_to_image -i original/p0_10.j2k -o temp/p0_10.tif
j2k_to_image -i original/p0_11.j2k -o temp/p0_11.tif
j2k_to_image -i original/p0_12.j2k -o temp/p0_12.tif
j2k_to_image -i original/p0_14.j2k -o temp/p0_14.tif
j2k_to_image -i original/p0_15.j2k -o temp/p0_15.tif
j2k_to_image -i original/p0_16.j2k -o temp/p0_16.tif
j2k_to_image -i original/p1_01.j2k -o temp/p1_01.tif
j2k_to_image -i original/p1_02.j2k -o temp/p1_02.tif
j2k_to_image -i original/p1_04.j2k -o temp/p1_04.tif
j2k_to_image -i original/p1_05.j2k -o temp/p1_05.tif
j2k_to_image -i original/p1_06.j2k -o temp/p1_06.tif
image_to_j2k -i original/c0p0_01.pgx -o temp/c0p0_01.j2k
image_to_j2k -i original/c0p0_02.pgx -o temp/c0p0_02.j2k
image_to_j2k -i original/c0p0_03r0.pgx -o temp/c0p0_03r0.j2k
image_to_j2k -i original/c0p0_03r1.pgx -o temp/c0p0_03r1.j2k
image_to_j2k -i original/c0p0_04.pgx -o temp/c00_p04.j2k
image_to_j2k -i original/c0p0_05.pgx -o temp/c0p0_05.j2k
image_to_j2k -i original/c0p0_06.pgx -o temp/c0p0_06.j2k
image_to_j2k -i original/c0p0_07.pgx -o temp/c0p0_07.j2k
image_to_j2k -i original/c0p0_08.pgx -o temp/c0p0_08.j2k
image_to_j2k -i original/c0p0_09.pgx -o temp/c0p0_09.j2k
image_to_j2k -i original/c0p0_10.pgx -o temp/c0p0_10.j2k
image_to_j2k -i original/c0p0_11.pgx -o temp/c0p0_11.j2k
image_to_j2k -i original/c0p0_12.pgx -o temp/c0p0_12.j2k
image_to_j2k -i original/c0p0_13.pgx -o temp/c0p0_13.j2k
image_to_j2k -i original/c0p0_14.pgx -o temp/c0p0_14.j2k
image_to_j2k -i original/c0p0_15r0.pgx -o temp/c0p0_15r0.j2k
image_to_j2k -i original/c0p0_15r1.pgx -o temp/c0p0_15r1.j2k
image_to_j2k -i original/c0p0_16.pgx -o temp/c0p0_16.j2k
image_to_j2k -i original/c0p1_04r0.pgx -o temp/c0p1_04r0.j2k
image_to_j2k -i original/c0p1_05.pgx -o temp/c0p1_05.j2k
image_to_j2k -i original/c1p0_01_0.pgx -o temp/c1p0_01_0.j2k
image_to_j2k -i original/c1p0_02_0.pgx -o temp/c1p0_02_0.j2k
image_to_j2k -i original/c1p0_03_0.pgx -o temp/c1p0_03_0.j2k
image_to_j2k -i original/c1p0_04_0.pgx -o temp/c1p0_04_0.j2k
image_to_j2k -i original/c1p0_05_0.pgx -o temp/c1p0_05_0.j2k
image_to_j2k -i original/c1p0_06_0.pgx -o temp/c1p0_06_0.j2k
image_to_j2k -i original/c1p0_07_0.pgx -o temp/c1p0_07_0.j2k
image_to_j2k -i original/c1p0_08_0.pgx -o temp/c1p0_08_0.j2k
image_to_j2k -i original/c1p0_09_0.pgx -o temp/c1p0_09_0.j2k
image_to_j2k -i original/c1p0_10_0.pgx -o temp/c1p0_10_0.j2k
image_to_j2k -i original/c1p0_11_0.pgx -o temp/c1p0_11_0.j2k
image_to_j2k -i original/c1p0_12_0.pgx -o temp/c1p0_12_0.j2k
image_to_j2k -i original/c1p0_13_0.pgx -o temp/c1p0_13_0.j2k
image_to_j2k -i original/c1p0_14_0.pgx -o temp/c1p0_14_0.j2k
image_to_j2k -i original/c1p0_15_0.pgx -o temp/c1p0_15_0.j2k
image_to_j2k -i original/c1p0_16_0.pgx -o temp/c1p0_16_0.j2k
image_to_j2k -i original/c1p1_02_0.pgx -o temp/c1p1_02_0.j2k
image_to_j2k -i original/c1p1_05_0.pgx -o temp/c1p1_05_0.j2k
image_to_j2k -i original/Bretagne2.ppm -o temp/Bretagne2_2.j2k -s 2,2 -SOP
image_to_j2k -i original/Bretagne2.ppm -o temp/Bretagne2_3.j2k -EPH -M 38
image_to_j2k -i original/Bretagne2.ppm -o temp/Bretagne2_4.j2k -d 150,300 -r 800

View File

@ -1,276 +0,0 @@
/*
**********************************************************************
** md5.c **
** RSA Data Security, Inc. MD5 Message Digest Algorithm **
** Created: 2/17/90 RLR **
** Revised: 1/91 SRD,AJ,BSK,JT Reference C Version **
**********************************************************************
*/
/*
**********************************************************************
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
** **
** License to copy and use this software is granted provided that **
** it is identified as the "RSA Data Security, Inc. MD5 Message **
** Digest Algorithm" in all material mentioning or referencing this **
** software or this function. **
** **
** License is also granted to make and use derivative works **
** provided that such works are identified as "derived from the RSA **
** Data Security, Inc. MD5 Message Digest Algorithm" in all **
** material mentioning or referencing the derived work. **
** **
** RSA Data Security, Inc. makes no representations concerning **
** either the merchantability of this software or the suitability **
** of this software for any particular purpose. It is provided "as **
** is" without express or implied warranty of any kind. **
** **
** These notices must be retained in any copies of any part of this **
** documentation and/or software. **
**********************************************************************
*/
/* -- include the following line if the md5.h header file is separate -- */
#include "md5.h"
/* forward declaration */
static void Transform ();
static unsigned char PADDING[64] = {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* F, G and H are basic MD5 functions: selection, majority, parity */
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
/* ROTATE_LEFT rotates x left n bits */
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
/* Rotation is separate from addition to prevent recomputation */
#define FF(a, b, c, d, x, s, ac) \
{(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) \
{(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) \
{(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) \
{(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
void MD5Init (mdContext)
MD5_CTX *mdContext;
{
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
/* Load magic initialization constants.
*/
mdContext->buf[0] = (UINT4)0x67452301;
mdContext->buf[1] = (UINT4)0xefcdab89;
mdContext->buf[2] = (UINT4)0x98badcfe;
mdContext->buf[3] = (UINT4)0x10325476;
}
void MD5Update (mdContext, inBuf, inLen)
MD5_CTX *mdContext;
unsigned char *inBuf;
unsigned int inLen;
{
UINT4 in[16];
int mdi;
unsigned int i, ii;
/* compute number of bytes mod 64 */
mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
/* update number of bits */
if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])
mdContext->i[1]++;
mdContext->i[0] += ((UINT4)inLen << 3);
mdContext->i[1] += ((UINT4)inLen >> 29);
while (inLen--) {
/* add new character to buffer, increment mdi */
mdContext->in[mdi++] = *inBuf++;
/* transform if necessary */
if (mdi == 0x40) {
for (i = 0, ii = 0; i < 16; i++, ii += 4)
in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
(((UINT4)mdContext->in[ii+2]) << 16) |
(((UINT4)mdContext->in[ii+1]) << 8) |
((UINT4)mdContext->in[ii]);
Transform (mdContext->buf, in);
mdi = 0;
}
}
}
void MD5Final (mdContext)
MD5_CTX *mdContext;
{
UINT4 in[16];
int mdi;
unsigned int i, ii;
unsigned int padLen;
/* save number of bits */
in[14] = mdContext->i[0];
in[15] = mdContext->i[1];
/* compute number of bytes mod 64 */
mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
/* pad out to 56 mod 64 */
padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
MD5Update (mdContext, PADDING, padLen);
/* append length in bits and transform */
for (i = 0, ii = 0; i < 14; i++, ii += 4)
in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
(((UINT4)mdContext->in[ii+2]) << 16) |
(((UINT4)mdContext->in[ii+1]) << 8) |
((UINT4)mdContext->in[ii]);
Transform (mdContext->buf, in);
/* store buffer in digest */
for (i = 0, ii = 0; i < 4; i++, ii += 4) {
mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF);
mdContext->digest[ii+1] =
(unsigned char)((mdContext->buf[i] >> 8) & 0xFF);
mdContext->digest[ii+2] =
(unsigned char)((mdContext->buf[i] >> 16) & 0xFF);
mdContext->digest[ii+3] =
(unsigned char)((mdContext->buf[i] >> 24) & 0xFF);
}
}
/* Basic MD5 step. Transform buf based on in.
*/
static void Transform (buf, in)
UINT4 *buf;
UINT4 *in;
{
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
/* Round 1 */
#define S11 7
#define S12 12
#define S13 17
#define S14 22
FF ( a, b, c, d, in[ 0], S11, 3614090360); /* 1 */
FF ( d, a, b, c, in[ 1], S12, 3905402710); /* 2 */
FF ( c, d, a, b, in[ 2], S13, 606105819); /* 3 */
FF ( b, c, d, a, in[ 3], S14, 3250441966); /* 4 */
FF ( a, b, c, d, in[ 4], S11, 4118548399); /* 5 */
FF ( d, a, b, c, in[ 5], S12, 1200080426); /* 6 */
FF ( c, d, a, b, in[ 6], S13, 2821735955); /* 7 */
FF ( b, c, d, a, in[ 7], S14, 4249261313); /* 8 */
FF ( a, b, c, d, in[ 8], S11, 1770035416); /* 9 */
FF ( d, a, b, c, in[ 9], S12, 2336552879); /* 10 */
FF ( c, d, a, b, in[10], S13, 4294925233); /* 11 */
FF ( b, c, d, a, in[11], S14, 2304563134); /* 12 */
FF ( a, b, c, d, in[12], S11, 1804603682); /* 13 */
FF ( d, a, b, c, in[13], S12, 4254626195); /* 14 */
FF ( c, d, a, b, in[14], S13, 2792965006); /* 15 */
FF ( b, c, d, a, in[15], S14, 1236535329); /* 16 */
/* Round 2 */
#define S21 5
#define S22 9
#define S23 14
#define S24 20
GG ( a, b, c, d, in[ 1], S21, 4129170786); /* 17 */
GG ( d, a, b, c, in[ 6], S22, 3225465664); /* 18 */
GG ( c, d, a, b, in[11], S23, 643717713); /* 19 */
GG ( b, c, d, a, in[ 0], S24, 3921069994); /* 20 */
GG ( a, b, c, d, in[ 5], S21, 3593408605); /* 21 */
GG ( d, a, b, c, in[10], S22, 38016083); /* 22 */
GG ( c, d, a, b, in[15], S23, 3634488961); /* 23 */
GG ( b, c, d, a, in[ 4], S24, 3889429448); /* 24 */
GG ( a, b, c, d, in[ 9], S21, 568446438); /* 25 */
GG ( d, a, b, c, in[14], S22, 3275163606); /* 26 */
GG ( c, d, a, b, in[ 3], S23, 4107603335); /* 27 */
GG ( b, c, d, a, in[ 8], S24, 1163531501); /* 28 */
GG ( a, b, c, d, in[13], S21, 2850285829); /* 29 */
GG ( d, a, b, c, in[ 2], S22, 4243563512); /* 30 */
GG ( c, d, a, b, in[ 7], S23, 1735328473); /* 31 */
GG ( b, c, d, a, in[12], S24, 2368359562); /* 32 */
/* Round 3 */
#define S31 4
#define S32 11
#define S33 16
#define S34 23
HH ( a, b, c, d, in[ 5], S31, 4294588738); /* 33 */
HH ( d, a, b, c, in[ 8], S32, 2272392833); /* 34 */
HH ( c, d, a, b, in[11], S33, 1839030562); /* 35 */
HH ( b, c, d, a, in[14], S34, 4259657740); /* 36 */
HH ( a, b, c, d, in[ 1], S31, 2763975236); /* 37 */
HH ( d, a, b, c, in[ 4], S32, 1272893353); /* 38 */
HH ( c, d, a, b, in[ 7], S33, 4139469664); /* 39 */
HH ( b, c, d, a, in[10], S34, 3200236656); /* 40 */
HH ( a, b, c, d, in[13], S31, 681279174); /* 41 */
HH ( d, a, b, c, in[ 0], S32, 3936430074); /* 42 */
HH ( c, d, a, b, in[ 3], S33, 3572445317); /* 43 */
HH ( b, c, d, a, in[ 6], S34, 76029189); /* 44 */
HH ( a, b, c, d, in[ 9], S31, 3654602809); /* 45 */
HH ( d, a, b, c, in[12], S32, 3873151461); /* 46 */
HH ( c, d, a, b, in[15], S33, 530742520); /* 47 */
HH ( b, c, d, a, in[ 2], S34, 3299628645); /* 48 */
/* Round 4 */
#define S41 6
#define S42 10
#define S43 15
#define S44 21
II ( a, b, c, d, in[ 0], S41, 4096336452); /* 49 */
II ( d, a, b, c, in[ 7], S42, 1126891415); /* 50 */
II ( c, d, a, b, in[14], S43, 2878612391); /* 51 */
II ( b, c, d, a, in[ 5], S44, 4237533241); /* 52 */
II ( a, b, c, d, in[12], S41, 1700485571); /* 53 */
II ( d, a, b, c, in[ 3], S42, 2399980690); /* 54 */
II ( c, d, a, b, in[10], S43, 4293915773); /* 55 */
II ( b, c, d, a, in[ 1], S44, 2240044497); /* 56 */
II ( a, b, c, d, in[ 8], S41, 1873313359); /* 57 */
II ( d, a, b, c, in[15], S42, 4264355552); /* 58 */
II ( c, d, a, b, in[ 6], S43, 2734768916); /* 59 */
II ( b, c, d, a, in[13], S44, 1309151649); /* 60 */
II ( a, b, c, d, in[ 4], S41, 4149444226); /* 61 */
II ( d, a, b, c, in[11], S42, 3174756917); /* 62 */
II ( c, d, a, b, in[ 2], S43, 718787259); /* 63 */
II ( b, c, d, a, in[ 9], S44, 3951481745); /* 64 */
buf[0] += a;
buf[1] += b;
buf[2] += c;
buf[3] += d;
}
/*
**********************************************************************
** End of md5.c **
******************************* (cut) ********************************
*/

View File

@ -1,59 +0,0 @@
/*
**********************************************************************
** md5.h -- Header file for implementation of MD5 **
** RSA Data Security, Inc. MD5 Message Digest Algorithm **
** Created: 2/17/90 RLR **
** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
** Revised (for MD5): RLR 4/27/91 **
** -- G modified to have y&~z instead of y&z **
** -- FF, GG, HH modified to add in last register done **
** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
** -- distinct additive constant for each step **
** -- round 4 added, working mod 7 **
**********************************************************************
*/
/*
**********************************************************************
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
** **
** License to copy and use this software is granted provided that **
** it is identified as the "RSA Data Security, Inc. MD5 Message **
** Digest Algorithm" in all material mentioning or referencing this **
** software or this function. **
** **
** License is also granted to make and use derivative works **
** provided that such works are identified as "derived from the RSA **
** Data Security, Inc. MD5 Message Digest Algorithm" in all **
** material mentioning or referencing the derived work. **
** **
** RSA Data Security, Inc. makes no representations concerning **
** either the merchantability of this software or the suitability **
** of this software for any particular purpose. It is provided "as **
** is" without express or implied warranty of any kind. **
** **
** These notices must be retained in any copies of any part of this **
** documentation and/or software. **
**********************************************************************
*/
/* typedef a 32 bit type */
typedef unsigned long int UINT4;
/* Data structure for MD5 (Message Digest) computation */
typedef struct {
UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
UINT4 buf[4]; /* scratch buffer */
unsigned char in[64]; /* input buffer */
unsigned char digest[16]; /* actual digest after MD5Final call */
} MD5_CTX;
void MD5Init ();
void MD5Update ();
void MD5Final ();
/*
**********************************************************************
** End of md5.h **
******************************* (cut) ********************************
*/

View File

@ -1 +0,0 @@
Download the source images into this directory from http://www.openjpeg.org/OPJ_Validate_OriginalImages.7z