OpenJPEG version 1.1
This commit is contained in:
parent
e45e87cfb7
commit
95bc884365
|
@ -0,0 +1,8 @@
|
||||||
|
What's New for OpenJPEG
|
||||||
|
|
||||||
|
* : fixed
|
||||||
|
- : removed
|
||||||
|
! : changed
|
||||||
|
+ : added
|
||||||
|
|
||||||
|
December 5, 2005 - 1.0.0
|
|
@ -0,0 +1,266 @@
|
||||||
|
# Microsoft Developer Studio Project File - Name="LibOpenJPEG" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
|
CFG=LibOpenJPEG - 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 "LibOpenJPEG.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 "LibOpenJPEG.mak" CFG="LibOpenJPEG - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "LibOpenJPEG - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE "LibOpenJPEG - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "LibOpenJPEG - 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 "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||||
|
# SUBTRACT CPP /YX
|
||||||
|
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo
|
||||||
|
# Begin Special Build Tool
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Cmds=copy Release\LibOpenJPEG.lib dist copy libopenjpeg\openjpeg.h dist
|
||||||
|
# End Special Build Tool
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "LibOpenJPEG - 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 "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||||
|
# SUBTRACT CPP /YX
|
||||||
|
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo
|
||||||
|
# Begin Special Build Tool
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Cmds=copy Debug\LibOpenJPEG.lib dist copy libopenjpeg\openjpeg.h dist
|
||||||
|
# End Special Build Tool
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "LibOpenJPEG - Win32 Release"
|
||||||
|
# Name "LibOpenJPEG - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\bio.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\cio.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\dwt.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\event.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\fix.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\image.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\int.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\j2k.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\j2k_lib.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\jp2.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\jpt.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\mct.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\mqc.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\openjpeg.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\pi.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\raw.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\t1.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\t2.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\tcd.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\tgt.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\bio.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\cio.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\dwt.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\event.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\fix.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\image.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\int.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\j2k.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\j2k_lib.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\jp2.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\jpt.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\mct.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\mqc.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\openjpeg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\opj_includes.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\pi.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\raw.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\t1.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\t2.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\tcd.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=libopenjpeg\tgt.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
|
@ -0,0 +1,29 @@
|
||||||
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "LibOpenJPEG"=.\LibOpenJPEG.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Global:
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<3>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Linux makefile for OpenJPEG
|
||||||
|
|
||||||
|
VER_MAJOR = 1
|
||||||
|
VER_MINOR = 0.0
|
||||||
|
|
||||||
|
SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c ./libopenjpeg/event.c ./libopenjpeg/fix.c ./libopenjpeg/image.c ./libopenjpeg/int.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_includes.h
|
||||||
|
INCLUDE = -Ilibopenjpeg
|
||||||
|
|
||||||
|
# General configuration variables:
|
||||||
|
CC = gcc
|
||||||
|
AR = ar
|
||||||
|
|
||||||
|
INSTALLDIR = /usr/lib
|
||||||
|
|
||||||
|
# Converts cr/lf to just lf
|
||||||
|
DOS2UNIX = dos2unix
|
||||||
|
|
||||||
|
COMPILERFLAGS = -O3
|
||||||
|
LIBRARIES = -lstdc++
|
||||||
|
|
||||||
|
MODULES = $(SRCS:.c=.o)
|
||||||
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
|
||||||
|
|
||||||
|
TARGET = openjpeg
|
||||||
|
STATICLIB = lib$(TARGET).a
|
||||||
|
SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
|
||||||
|
LIBNAME = lib$(TARGET).so.$(VER_MAJOR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
|
||||||
|
dist: OpenJPEG
|
||||||
|
cp *.a dist
|
||||||
|
cp *.so dist
|
||||||
|
cp libopenjpeg/openjpeg.h dist
|
||||||
|
|
||||||
|
dos2unix:
|
||||||
|
@$(DOS2UNIX) $(SRCS) $(INCLS)
|
||||||
|
|
||||||
|
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(STATICLIB): $(MODULES)
|
||||||
|
$(AR) r $@ $(MODULES)
|
||||||
|
|
||||||
|
$(SHAREDLIB): $(MODULES)
|
||||||
|
$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||||
|
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||||
|
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
||||||
|
|
||||||
|
osx:
|
||||||
|
make -f Makefile.osx
|
||||||
|
|
||||||
|
osxinstall:
|
||||||
|
make -f Makefile.osx install
|
|
@ -0,0 +1,57 @@
|
||||||
|
# Mac OSX makefile for OpenJPEG
|
||||||
|
|
||||||
|
VER_MAJOR = 1
|
||||||
|
VER_MINOR = 0.0
|
||||||
|
|
||||||
|
SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c ./libopenjpeg/event.c ./libopenjpeg/fix.c ./libopenjpeg/image.c ./libopenjpeg/int.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_includes.h
|
||||||
|
INCLUDE = -Ilibopenjpeg
|
||||||
|
|
||||||
|
# General configuration variables:
|
||||||
|
CC = gcc
|
||||||
|
LIBTOOL = libtool
|
||||||
|
|
||||||
|
INSTALLDIR = /usr/lib
|
||||||
|
|
||||||
|
COMPILERFLAGS = -O3
|
||||||
|
LIBRARIES = -lc -lgcc -lstdc++
|
||||||
|
|
||||||
|
MODULES = $(SRCS:.c=.o)
|
||||||
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
|
||||||
|
|
||||||
|
TARGET = openjpeg
|
||||||
|
STATICLIB = lib$(TARGET).a
|
||||||
|
SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
|
||||||
|
LIBNAME = lib$(TARGET).dylib.$(VER_MAJOR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
|
||||||
|
dist: OpenJPEG
|
||||||
|
cp *.a dist
|
||||||
|
cp *.dylib dist
|
||||||
|
cp libopenjpeg/openjpeg.h dist
|
||||||
|
|
||||||
|
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(STATICLIB): $(MODULES)
|
||||||
|
$(LIBTOOL) -o $@ $(MODULES)
|
||||||
|
|
||||||
|
$(SHAREDLIB): $(MODULES)
|
||||||
|
$(LIBTOOL) -dynamic $(LIBRARIES) -o $@ $(MODULES)
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -m 644 -o root -g wheel $(STATICLIB) $(INSTALLDIR)
|
||||||
|
install -m 755 -o root -g wheel $(SHAREDLIB) $(INSTALLDIR)
|
||||||
|
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
Release Notes
|
||||||
|
--------------
|
||||||
|
This version of the library has been tested under the following OS:
|
||||||
|
- RedHat Linux 9.0
|
||||||
|
|
||||||
|
You should be able to link progams with the -lopenjpeg option after the library is compiled and installed.
|
||||||
|
You can also statically link with libopenjpeg.a.
|
||||||
|
If you use a really old version of gcc and it chokes on the CRs in the file, you can type 'make dos2unix'
|
||||||
|
to run all of the files through dos2unix which converts CRLF to LF. This no longer appears to be required
|
||||||
|
for RedHat 7.3 or 9.
|
||||||
|
|
||||||
|
Please let us know how this works for you under other Linux distributions or any other *nix.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
Note: You will need to have root privileges in order to install the library in the /usr/lib directory.
|
||||||
|
The installation process is as simple as this :
|
||||||
|
1) Enter the OpenJPEG directory
|
||||||
|
2) Build the distribution :
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
3) Clean all files produced during the build process
|
||||||
|
make clean
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
Release Notes
|
||||||
|
--------------
|
||||||
|
This version of the library has been tested under OSX 10.2 using gcc 3.3.
|
||||||
|
|
||||||
|
While the makefiles will make a .dylib and a .a, it is recommended to simply staticly link with the .a file.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
Note: You will need to have root privileges in order to install the library in the /usr/lib directory.
|
||||||
|
The installation process is as simple as this :
|
||||||
|
1) Enter the OpenJPEG directory
|
||||||
|
2) Build the distribution :
|
||||||
|
make osx
|
||||||
|
make osxinstall
|
||||||
|
3) Clean all files produced during the build process
|
||||||
|
make clean
|
|
@ -0,0 +1,24 @@
|
||||||
|
rd Release /s /q
|
||||||
|
rd Debug /s /q
|
||||||
|
rd codec\Debug /s /q
|
||||||
|
rd codec\Release /s /q
|
||||||
|
del *.pch /s /q
|
||||||
|
del *.ncb /s /q
|
||||||
|
del *.opt /s /q
|
||||||
|
del *.plg /s /q
|
||||||
|
del *.obj /s /q
|
||||||
|
del *.dll /s /q
|
||||||
|
del *.exe /s /q
|
||||||
|
del *.bsc /s /q
|
||||||
|
del *.bak /s /q
|
||||||
|
del *.pdb /s /q
|
||||||
|
del *.sql /s /q
|
||||||
|
del *.mdb /s /q
|
||||||
|
del *.lib /s /q
|
||||||
|
del *.exp /s /q
|
||||||
|
del *.ilk /s /q
|
||||||
|
del *.idb /s /q
|
||||||
|
del *.aps /s /q
|
||||||
|
del *.suo /s /q /a:h
|
||||||
|
del *.o /s /q
|
||||||
|
|
|
@ -0,0 +1,232 @@
|
||||||
|
# Doxyfile 1.4.2
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
PROJECT_NAME = OpenJPEG
|
||||||
|
PROJECT_NUMBER =
|
||||||
|
OUTPUT_DIRECTORY = ../
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = YES
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
STRIP_FROM_PATH = C://
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = YES
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
DETAILS_AT_TOP = YES
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = YES
|
||||||
|
EXTRACT_STATIC = YES
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = NO
|
||||||
|
FILE_VERSION_FILTER =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = ../libopenjpeg
|
||||||
|
FILE_PATTERNS = *.h \
|
||||||
|
*.c
|
||||||
|
RECURSIVE = NO
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS =
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = NO
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = ./html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = NO
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = NO
|
||||||
|
USE_PDFLATEX = NO
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = NO
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE =
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,9 +28,43 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup BIO BIO - Individual bit input-output stream */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Write a bit
|
||||||
|
@param bio BIO handle
|
||||||
|
@param b Bit to write (0 or 1)
|
||||||
|
*/
|
||||||
|
static void bio_putbit(opj_bio_t *bio, int b);
|
||||||
|
/**
|
||||||
|
Read a bit
|
||||||
|
@param bio BIO handle
|
||||||
|
@return Returns the read bit
|
||||||
|
*/
|
||||||
|
static int bio_getbit(opj_bio_t *bio);
|
||||||
|
/**
|
||||||
|
Write a byte
|
||||||
|
@param bio BIO handle
|
||||||
|
@return Returns 0 if successful, returns 1 otherwise
|
||||||
|
*/
|
||||||
|
static int bio_byteout(opj_bio_t *bio);
|
||||||
|
/**
|
||||||
|
Read a byte
|
||||||
|
@param bio BIO handle
|
||||||
|
@return Returns 0 if successful, returns 1 otherwise
|
||||||
|
*/
|
||||||
|
static int bio_bytein(opj_bio_t *bio);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
local functions
|
local functions
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __BIO_H
|
#ifndef __BIO_H
|
||||||
#define __BIO_H
|
#define __BIO_H
|
||||||
/**
|
/**
|
||||||
|
@ -57,36 +56,6 @@ typedef struct opj_bio {
|
||||||
int ct;
|
int ct;
|
||||||
} opj_bio_t;
|
} opj_bio_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Write a bit
|
|
||||||
@param bio BIO handle
|
|
||||||
@param b Bit to write (0 or 1)
|
|
||||||
*/
|
|
||||||
static void bio_putbit(opj_bio_t *bio, int b);
|
|
||||||
/**
|
|
||||||
Read a bit
|
|
||||||
@param bio BIO handle
|
|
||||||
@return Returns the read bit
|
|
||||||
*/
|
|
||||||
static int bio_getbit(opj_bio_t *bio);
|
|
||||||
/**
|
|
||||||
Write a byte
|
|
||||||
@param bio BIO handle
|
|
||||||
@return Returns 0 if successful, returns 1 otherwise
|
|
||||||
*/
|
|
||||||
static int bio_byteout(opj_bio_t *bio);
|
|
||||||
/**
|
|
||||||
Read a byte
|
|
||||||
@param bio BIO handle
|
|
||||||
@return Returns 0 if successful, returns 1 otherwise
|
|
||||||
*/
|
|
||||||
static int bio_bytein(opj_bio_t *bio);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
@ -127,7 +126,7 @@ unsigned char *cio_getbp(opj_cio_t *cio) {
|
||||||
*/
|
*/
|
||||||
bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
||||||
if (cio->bp >= cio->end) {
|
if (cio->bp >= cio->end) {
|
||||||
opg_event_msg(cio->cinfo, EVT_ERROR, "write error\n");
|
opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*cio->bp++ = v;
|
*cio->bp++ = v;
|
||||||
|
@ -139,7 +138,7 @@ bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
||||||
*/
|
*/
|
||||||
unsigned char cio_bytein(opj_cio_t *cio) {
|
unsigned char cio_bytein(opj_cio_t *cio) {
|
||||||
if (cio->bp >= cio->end) {
|
if (cio->bp >= cio->end) {
|
||||||
opg_event_msg(cio->cinfo, EVT_ERROR, "read error\n");
|
opj_event_msg(cio->cinfo, EVT_ERROR, "read error\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return *cio->bp++;
|
return *cio->bp++;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CIO_H
|
#ifndef __CIO_H
|
||||||
#define __CIO_H
|
#define __CIO_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -50,9 +50,55 @@
|
||||||
* mail: ive@lilysoft.com
|
* mail: ive@lilysoft.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Forward lazy transform (horizontal)
|
||||||
|
*/
|
||||||
|
static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
Forward lazy transform (vertical)
|
||||||
|
*/
|
||||||
|
static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas);
|
||||||
|
/**
|
||||||
|
Inverse lazy transform (horizontal)
|
||||||
|
*/
|
||||||
|
static void dwt_interleave_h(int *a, int *b, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
Inverse lazy transform (vertical)
|
||||||
|
*/
|
||||||
|
static void dwt_interleave_v(int *a, int *b, int dn, int sn, int x, int cas);
|
||||||
|
/**
|
||||||
|
Forward 5-3 wavelet tranform in 1-D
|
||||||
|
*/
|
||||||
|
static void dwt_encode_1(int *a, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
Inverse 5-3 wavelet tranform in 1-D
|
||||||
|
*/
|
||||||
|
static void dwt_decode_1(int *a, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
Forward 9-7 wavelet transform in 1-D
|
||||||
|
*/
|
||||||
|
static void dwt_encode_1_real(int *a, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
Inverse 9-7 wavelet transform in 1-D
|
||||||
|
*/
|
||||||
|
static void dwt_decode_1_real(int *a, int dn, int sn, int cas);
|
||||||
|
/**
|
||||||
|
FIXME : comment ???
|
||||||
|
*/
|
||||||
|
static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
#define S(i) a[(i)*2]
|
#define S(i) a[(i)*2]
|
||||||
#define D(i) a[(1+(i)*2)]
|
#define D(i) a[(1+(i)*2)]
|
||||||
#define S_(i) ((i)<0?S(0):((i)>=sn?S(sn-1):S(i)))
|
#define S_(i) ((i)<0?S(0):((i)>=sn?S(sn-1):S(i)))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -42,47 +42,6 @@ DWT.C are used by some function in TCD.C.
|
||||||
/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
|
/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Forward lazy transform (horizontal)
|
|
||||||
*/
|
|
||||||
static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
Forward lazy transform (vertical)
|
|
||||||
*/
|
|
||||||
static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas);
|
|
||||||
/**
|
|
||||||
Inverse lazy transform (horizontal)
|
|
||||||
*/
|
|
||||||
static void dwt_interleave_h(int *a, int *b, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
Inverse lazy transform (vertical)
|
|
||||||
*/
|
|
||||||
static void dwt_interleave_v(int *a, int *b, int dn, int sn, int x, int cas);
|
|
||||||
/**
|
|
||||||
Forward 5-3 wavelet tranform in 1-D
|
|
||||||
*/
|
|
||||||
static void dwt_encode_1(int *a, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
Inverse 5-3 wavelet tranform in 1-D
|
|
||||||
*/
|
|
||||||
static void dwt_decode_1(int *a, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
Forward 9-7 wavelet transform in 1-D
|
|
||||||
*/
|
|
||||||
static void dwt_encode_1_real(int *a, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
Inverse 9-7 wavelet transform in 1-D
|
|
||||||
*/
|
|
||||||
static void dwt_decode_1_real(int *a, int dn, int sn, int cas);
|
|
||||||
/**
|
|
||||||
FIXME : comment ???
|
|
||||||
*/
|
|
||||||
static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -25,9 +24,43 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
// ==========================================================
|
||||||
|
// Utility functions
|
||||||
|
// ==========================================================
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
static char*
|
||||||
|
i2a(unsigned i, char *a, unsigned r) {
|
||||||
|
if (i/r > 0) a = i2a(i/r,a,r);
|
||||||
|
*a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i%r];
|
||||||
|
return a+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Transforms integer i into an ascii string and stores the result in a;
|
||||||
|
string is encoded in the base indicated by r.
|
||||||
|
@param i Number to be converted
|
||||||
|
@param a String result
|
||||||
|
@param r Base of value; must be in the range 2 - 36
|
||||||
|
@return Returns a
|
||||||
|
*/
|
||||||
|
static char *
|
||||||
|
_itoa(int i, char *a, int r) {
|
||||||
|
r = ((r < 2) || (r > 36)) ? 10 : r;
|
||||||
|
if(i < 0) {
|
||||||
|
*a = '-';
|
||||||
|
*i2a(-i, a+1, r) = 0;
|
||||||
|
}
|
||||||
|
else *i2a(i, a, r) = 0;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !WIN32
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
opj_event_mgr_t* opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) {
|
opj_event_mgr_t* opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) {
|
||||||
if(cinfo) {
|
if(cinfo) {
|
||||||
opj_event_mgr_t *previous = cinfo->event_mgr;
|
opj_event_mgr_t *previous = cinfo->event_mgr;
|
||||||
|
@ -39,7 +72,7 @@ opj_event_mgr_t* opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opg_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
||||||
#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
|
#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
|
||||||
opj_msg_callback msg_handler = NULL;
|
opj_msg_callback msg_handler = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -24,8 +23,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __EVENT_H
|
#ifndef __EVENT_H
|
||||||
#define __EVENT_H
|
#define __EVENT_H
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +49,7 @@ Write formatted data to a string and send the string to a user callback.
|
||||||
@param fmt Format-control string (plus optionnal arguments)
|
@param fmt Format-control string (plus optionnal arguments)
|
||||||
@return Returns true if successful, returns false otherwise
|
@return Returns true if successful, returns false otherwise
|
||||||
*/
|
*/
|
||||||
bool opg_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...);
|
bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...);
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,8 +27,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FIX_H
|
#ifndef __FIX_H
|
||||||
#define __FIX_H
|
#define __FIX_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
opj_image_t* opj_image_create0() {
|
opj_image_t* opj_image_create0() {
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __IMAGE_H
|
#ifndef __IMAGE_H
|
||||||
#define __IMAGE_H
|
#define __IMAGE_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __INT_H
|
#ifndef __INT_H
|
||||||
#define __INT_H
|
#define __INT_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,202 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Write the SOC marker (Start Of Codestream)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_soc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the SOC marker (Start of Codestream)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_soc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the SIZ marker (image and tile size)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_siz(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the SIZ marker (image and tile size)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_siz(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the COM marker (comment)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_com(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the COM marker (comment)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_com(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the value concerning the specified component in the marker COD and COC
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information written
|
||||||
|
*/
|
||||||
|
static void j2k_write_cox(opj_j2k_t *j2k, int compno);
|
||||||
|
/**
|
||||||
|
Read the value concerning the specified component in the marker COD and COC
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information read
|
||||||
|
*/
|
||||||
|
static void j2k_read_cox(opj_j2k_t *j2k, int compno);
|
||||||
|
/**
|
||||||
|
Write the COD marker (coding style default)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_cod(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the COD marker (coding style default)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_cod(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the COC marker (coding style component)
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information written
|
||||||
|
*/
|
||||||
|
static void j2k_write_coc(opj_j2k_t *j2k, int compno);
|
||||||
|
/**
|
||||||
|
Read the COC marker (coding style component)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_coc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the value concerning the specified component in the marker QCD and QCC
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information written
|
||||||
|
*/
|
||||||
|
static void j2k_write_qcx(opj_j2k_t *j2k, int compno);
|
||||||
|
/**
|
||||||
|
Read the value concerning the specified component in the marker QCD and QCC
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concern by the information read
|
||||||
|
@param len Length of the information in the QCX part of the marker QCD/QCC
|
||||||
|
*/
|
||||||
|
static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len);
|
||||||
|
/**
|
||||||
|
Write the QCD marker (quantization default)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_qcd(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the QCD marker (quantization default)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_qcd(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the QCC marker (quantization component)
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information written
|
||||||
|
*/
|
||||||
|
static void j2k_write_qcc(opj_j2k_t *j2k, int compno);
|
||||||
|
/**
|
||||||
|
Read the QCC marker (quantization component)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_qcc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the POC marker (progression order change)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_poc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the POC marker (progression order change)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_poc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the CRG marker (component registration)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_crg(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the TLM marker (tile-part lengths)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_tlm(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the PLM marker (packet length, main header)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_plm(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the PLT marker (packet length, tile-part header)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_plt(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the PPM marker (packet packet headers, main header)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_ppm(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the PPT marker (packet packet headers, tile-part header)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_ppt(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the SOT marker (start of tile-part)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_sot(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the SOT marker (start of tile-part)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_sot(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the SOD marker (start of data)
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param tile_coder Pointer to a TCD handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder);
|
||||||
|
/**
|
||||||
|
Read the SOD marker (start of data)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_sod(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the RGN marker (region-of-interest)
|
||||||
|
@param j2k J2K handle
|
||||||
|
@param compno Number of the component concerned by the information written
|
||||||
|
@param tileno Number of the tile concerned by the information written
|
||||||
|
*/
|
||||||
|
static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno);
|
||||||
|
/**
|
||||||
|
Read the RGN marker (region-of-interest)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_rgn(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Write the EOC marker (end of codestream)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_write_eoc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read the EOC marker (end of codestream)
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_eoc(opj_j2k_t *j2k);
|
||||||
|
/**
|
||||||
|
Read an unknown marker
|
||||||
|
@param j2k J2K handle
|
||||||
|
*/
|
||||||
|
static void j2k_read_unk(opj_j2k_t *j2k);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
void j2k_dump_image(FILE *fd, opj_image_t * img) {
|
void j2k_dump_image(FILE *fd, opj_image_t * img) {
|
||||||
|
@ -713,7 +909,6 @@ static void j2k_write_sot(opj_j2k_t *j2k) {
|
||||||
static void j2k_read_sot(opj_j2k_t *j2k) {
|
static void j2k_read_sot(opj_j2k_t *j2k) {
|
||||||
int len, tileno, totlen, partno, numparts, i;
|
int len, tileno, totlen, partno, numparts, i;
|
||||||
opj_tcp_t *tcp = NULL;
|
opj_tcp_t *tcp = NULL;
|
||||||
opj_tccp_t *tmp = NULL;
|
|
||||||
char status = 0;
|
char status = 0;
|
||||||
|
|
||||||
opj_cp_t *cp = j2k->cp;
|
opj_cp_t *cp = j2k->cp;
|
||||||
|
@ -870,7 +1065,7 @@ static void j2k_read_rgn(opj_j2k_t *j2k) {
|
||||||
|
|
||||||
static void j2k_write_eoc(opj_j2k_t *j2k) {
|
static void j2k_write_eoc(opj_j2k_t *j2k) {
|
||||||
opj_cio_t *cio = j2k->cio;
|
opj_cio_t *cio = j2k->cio;
|
||||||
/* opg_event_msg(j2k->cinfo, "%.8x: EOC\n", cio_tell(cio) + j2k->pos_correction); */
|
/* opj_event_msg(j2k->cinfo, "%.8x: EOC\n", cio_tell(cio) + j2k->pos_correction); */
|
||||||
cio_write(cio, J2K_MS_EOC, 2);
|
cio_write(cio, J2K_MS_EOC, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -900,7 +1095,7 @@ static void j2k_read_eoc(opj_j2k_t *j2k) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void j2k_read_unk(opj_j2k_t *j2k) {
|
static void j2k_read_unk(opj_j2k_t *j2k) {
|
||||||
opg_event_msg(j2k->cinfo, EVT_WARNING, "Unknown marker\n");
|
opj_event_msg(j2k->cinfo, EVT_WARNING, "Unknown marker\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct opj_dec_mstabent {
|
typedef struct opj_dec_mstabent {
|
||||||
|
@ -1044,13 +1239,13 @@ opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
int id = cio_read(cio, 2);
|
int id = cio_read(cio, 2);
|
||||||
if (id >> 8 != 0xff) {
|
if (id >> 8 != 0xff) {
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id);
|
opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e = j2k_dec_mstab_lookup(id);
|
e = j2k_dec_mstab_lookup(id);
|
||||||
if (!(j2k->state & e->states)) {
|
if (!(j2k->state & e->states)) {
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id);
|
opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (e->handler) {
|
if (e->handler) {
|
||||||
|
@ -1068,7 +1263,7 @@ opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j2k->state != J2K_STATE_MT) {
|
if (j2k->state != J2K_STATE_MT) {
|
||||||
opg_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n");
|
opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
@ -1100,7 +1295,7 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
position = cio_tell(cio);
|
position = cio_tell(cio);
|
||||||
if (header.Class_Id != 6) { /* 6 : Main header data-bin message */
|
if (header.Class_Id != 6) { /* 6 : Main header data-bin message */
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Main header first [class_Id %d] !\n", header.Class_Id);
|
opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Main header first [class_Id %d] !\n", header.Class_Id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1118,7 +1313,7 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
position = cio_tell(cio);
|
position = cio_tell(cio);
|
||||||
if (header.Class_Id != 4) { /* 4 : Tile data-bin message */
|
if (header.Class_Id != 4) { /* 4 : Tile data-bin message */
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Tile info !\n");
|
opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Tile info !\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1126,13 +1321,13 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
id = cio_read(cio, 2);
|
id = cio_read(cio, 2);
|
||||||
if (id >> 8 != 0xff) {
|
if (id >> 8 != 0xff) {
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id);
|
opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e = j2k_dec_mstab_lookup(id);
|
e = j2k_dec_mstab_lookup(id);
|
||||||
if (!(j2k->state & e->states)) {
|
if (!(j2k->state & e->states)) {
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id);
|
opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (e->handler) {
|
if (e->handler) {
|
||||||
|
@ -1150,7 +1345,7 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j2k->state != J2K_STATE_MT) {
|
if (j2k->state != J2K_STATE_MT) {
|
||||||
opg_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n");
|
opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
@ -1389,7 +1584,7 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
|
|
||||||
stream = fopen(index, "w");
|
stream = fopen(index, "w");
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
opg_event_msg(j2k->cinfo, EVT_ERROR, "failed to open %s for writing\n", index);
|
opj_event_msg(j2k->cinfo, EVT_ERROR, "failed to open %s for writing\n", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1655,7 +1850,7 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *index)
|
||||||
/* encode each tile */
|
/* encode each tile */
|
||||||
|
|
||||||
for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
|
for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
|
||||||
opg_event_msg(j2k->cinfo, EVT_INFO, "tile number %d / %d\n", tileno + 1, cp->tw * cp->th);
|
opj_event_msg(j2k->cinfo, EVT_INFO, "tile number %d / %d\n", tileno + 1, cp->tw * cp->th);
|
||||||
|
|
||||||
j2k->curtileno = tileno;
|
j2k->curtileno = tileno;
|
||||||
|
|
||||||
|
@ -1719,7 +1914,7 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *index)
|
||||||
/* Creation of the index file */
|
/* Creation of the index file */
|
||||||
if(image_info && image_info->index_on) {
|
if(image_info && image_info->index_on) {
|
||||||
if(!j2k_create_index(j2k, cio, image_info, index)) {
|
if(!j2k_create_index(j2k, cio, image_info, index)) {
|
||||||
opg_event_msg(j2k->cinfo, EVT_ERROR, "failed to create index file %s\n", index);
|
opj_event_msg(j2k->cinfo, EVT_ERROR, "failed to create index file %s\n", index);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -358,197 +358,6 @@ typedef struct opj_j2k {
|
||||||
opj_cio_t *cio;
|
opj_cio_t *cio;
|
||||||
} opj_j2k_t;
|
} opj_j2k_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Write the SOC marker (Start Of Codestream)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_soc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the SOC marker (Start of Codestream)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_soc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the SIZ marker (image and tile size)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_siz(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the SIZ marker (image and tile size)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_siz(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the COM marker (comment)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_com(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the COM marker (comment)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_com(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the value concerning the specified component in the marker COD and COC
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information written
|
|
||||||
*/
|
|
||||||
static void j2k_write_cox(opj_j2k_t *j2k, int compno);
|
|
||||||
/**
|
|
||||||
Read the value concerning the specified component in the marker COD and COC
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information read
|
|
||||||
*/
|
|
||||||
static void j2k_read_cox(opj_j2k_t *j2k, int compno);
|
|
||||||
/**
|
|
||||||
Write the COD marker (coding style default)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_cod(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the COD marker (coding style default)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_cod(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the COC marker (coding style component)
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information written
|
|
||||||
*/
|
|
||||||
static void j2k_write_coc(opj_j2k_t *j2k, int compno);
|
|
||||||
/**
|
|
||||||
Read the COC marker (coding style component)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_coc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the value concerning the specified component in the marker QCD and QCC
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information written
|
|
||||||
*/
|
|
||||||
static void j2k_write_qcx(opj_j2k_t *j2k, int compno);
|
|
||||||
/**
|
|
||||||
Read the value concerning the specified component in the marker QCD and QCC
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concern by the information read
|
|
||||||
@param len Length of the information in the QCX part of the marker QCD/QCC
|
|
||||||
*/
|
|
||||||
static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len);
|
|
||||||
/**
|
|
||||||
Write the QCD marker (quantization default)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_qcd(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the QCD marker (quantization default)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_qcd(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the QCC marker (quantization component)
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information written
|
|
||||||
*/
|
|
||||||
static void j2k_write_qcc(opj_j2k_t *j2k, int compno);
|
|
||||||
/**
|
|
||||||
Read the QCC marker (quantization component)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_qcc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the POC marker (progression order change)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_poc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the POC marker (progression order change)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_poc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the CRG marker (component registration)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_crg(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the TLM marker (tile-part lengths)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_tlm(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the PLM marker (packet length, main header)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_plm(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the PLT marker (packet length, tile-part header)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_plt(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the PPM marker (packet packet headers, main header)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_ppm(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the PPT marker (packet packet headers, tile-part header)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_ppt(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the SOT marker (start of tile-part)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_sot(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the SOT marker (start of tile-part)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_sot(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the SOD marker (start of data)
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param tile_coder Pointer to a TCD handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder);
|
|
||||||
/**
|
|
||||||
Read the SOD marker (start of data)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_sod(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the RGN marker (region-of-interest)
|
|
||||||
@param j2k J2K handle
|
|
||||||
@param compno Number of the component concerned by the information written
|
|
||||||
@param tileno Number of the tile concerned by the information written
|
|
||||||
*/
|
|
||||||
static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno);
|
|
||||||
/**
|
|
||||||
Read the RGN marker (region-of-interest)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_rgn(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Write the EOC marker (end of codestream)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_write_eoc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read the EOC marker (end of codestream)
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_eoc(opj_j2k_t *j2k);
|
|
||||||
/**
|
|
||||||
Read an unknown marker
|
|
||||||
@param j2k J2K handle
|
|
||||||
*/
|
|
||||||
static void j2k_read_unk(opj_j2k_t *j2k);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __J2K_LIB_H
|
#ifndef __J2K_LIB_H
|
||||||
#define __J2K_LIB_H
|
#define __J2K_LIB_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Yannick Verschueren
|
* Copyright (c) 2004, Yannick Verschueren
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,6 +28,80 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read box headers
|
||||||
|
@param cinfo Codec context info
|
||||||
|
@param cio Input stream
|
||||||
|
@param box
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box);
|
||||||
|
static void jp2_write_url(opj_cio_t *cio, char *Idx_file);
|
||||||
|
/**
|
||||||
|
Read the IHDR box - Image Header box
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Input buffer stream
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Write the JP2H box - JP2 Header box
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Output buffer stream
|
||||||
|
*/
|
||||||
|
static void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Read the JP2H box - JP2 Header box
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Input buffer stream
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Write the FTYP box - File type box
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Output buffer stream
|
||||||
|
*/
|
||||||
|
static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Read the FTYP box - File type box
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Input buffer stream
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, char *index);
|
||||||
|
static bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset);
|
||||||
|
static void jp2_write_jp(opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Read the JP box - JPEG 2000 signature
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Input buffer stream
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
/**
|
||||||
|
Decode the structure of a JP2 file
|
||||||
|
@param jp2 JP2 handle
|
||||||
|
@param cio Input buffer stream
|
||||||
|
@return Returns true if successful, returns false otherwise
|
||||||
|
*/
|
||||||
|
static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -37,7 +111,7 @@ static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t
|
||||||
box->type = cio_read(cio, 4);
|
box->type = cio_read(cio, 4);
|
||||||
if (box->length == 1) {
|
if (box->length == 1) {
|
||||||
if (cio_read(cio, 4) != 0) {
|
if (cio_read(cio, 4) != 0) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
box->length = cio_read(cio, 4);
|
box->length = cio_read(cio, 4);
|
||||||
|
@ -80,7 +154,7 @@ static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
|
|
||||||
jp2_read_boxhdr(cinfo, cio, &box);
|
jp2_read_boxhdr(cinfo, cio, &box);
|
||||||
if (JP2_IHDR != box.type) {
|
if (JP2_IHDR != box.type) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Expected IHDR Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Expected IHDR Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +169,7 @@ static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
jp2->IPR = cio_read(cio, 1); /* IPR */
|
jp2->IPR = cio_read(cio, 1); /* IPR */
|
||||||
|
|
||||||
if (cio_tell(cio) - box.init_pos != box.length) {
|
if (cio_tell(cio) - box.init_pos != box.length) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with IHDR Box\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with IHDR Box\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +226,7 @@ static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
|
|
||||||
jp2_read_boxhdr(cinfo, cio, &box);
|
jp2_read_boxhdr(cinfo, cio, &box);
|
||||||
if (JP2_BPCC != box.type) {
|
if (JP2_BPCC != box.type) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Expected BPCC Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Expected BPCC Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +235,7 @@ static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cio_tell(cio) - box.init_pos != box.length) {
|
if (cio_tell(cio) - box.init_pos != box.length) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,14 +289,14 @@ static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
/* skip PROFILE */
|
/* skip PROFILE */
|
||||||
skip_len = box.init_pos + box.length - cio_tell(cio);
|
skip_len = box.init_pos + box.length - cio_tell(cio);
|
||||||
if (skip_len < 0) {
|
if (skip_len < 0) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with JP2H box size\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with JP2H box size\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cio_skip(cio, box.init_pos + box.length - cio_tell(cio));
|
cio_skip(cio, box.init_pos + box.length - cio_tell(cio));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cio_tell(cio) - box.init_pos != box.length) {
|
if (cio_tell(cio) - box.init_pos != box.length) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -258,7 +332,7 @@ static bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
do {
|
do {
|
||||||
if (JP2_JP2H != box.type) {
|
if (JP2_JP2H != box.type) {
|
||||||
if (box.type == JP2_JP2C) {
|
if (box.type == JP2_JP2C) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Expected JP2H Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Expected JP2H Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cio_skip(cio, box.length - 8);
|
cio_skip(cio, box.length - 8);
|
||||||
|
@ -278,7 +352,7 @@ static bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
|
|
||||||
skip_len = box.init_pos + box.length - cio_tell(cio);
|
skip_len = box.init_pos + box.length - cio_tell(cio);
|
||||||
if (skip_len < 0) {
|
if (skip_len < 0) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with JP2H Box\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with JP2H Box\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cio_skip(cio, box.init_pos + box.length - cio_tell(cio));
|
cio_skip(cio, box.init_pos + box.length - cio_tell(cio));
|
||||||
|
@ -316,7 +390,7 @@ static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
jp2_read_boxhdr(cinfo, cio, &box);
|
jp2_read_boxhdr(cinfo, cio, &box);
|
||||||
|
|
||||||
if (JP2_FTYP != box.type) {
|
if (JP2_FTYP != box.type) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Expected FTYP Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Expected FTYP Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +404,7 @@ static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cio_tell(cio) - box.init_pos != box.length) {
|
if (cio_tell(cio) - box.init_pos != box.length) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with FTYP Box\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with FTYP Box\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +425,7 @@ static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, char *index) {
|
||||||
/* J2K encoding */
|
/* J2K encoding */
|
||||||
j2k_codestream_offset = cio_tell(cio);
|
j2k_codestream_offset = cio_tell(cio);
|
||||||
if(!j2k_encode(j2k, cio, image, index)) {
|
if(!j2k_encode(j2k, cio, image, index)) {
|
||||||
opg_event_msg(j2k->cinfo, EVT_ERROR, "Failed to encode image\n");
|
opj_event_msg(j2k->cinfo, EVT_ERROR, "Failed to encode image\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
j2k_codestream_length = cio_tell(cio) - j2k_codestream_offset;
|
j2k_codestream_length = cio_tell(cio) - j2k_codestream_offset;
|
||||||
|
@ -407,15 +481,15 @@ static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
|
|
||||||
jp2_read_boxhdr(cinfo, cio, &box);
|
jp2_read_boxhdr(cinfo, cio, &box);
|
||||||
if (JP2_JP != box.type) {
|
if (JP2_JP != box.type) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Expected JP Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Expected JP Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (0x0d0a870a != cio_read(cio, 4)) {
|
if (0x0d0a870a != cio_read(cio, 4)) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with JP Marker\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with JP Marker\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (cio_tell(cio) - box.init_pos != box.length) {
|
if (cio_tell(cio) - box.init_pos != box.length) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Error with JP Box size\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Error with JP Box size\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,14 +561,14 @@ opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
|
|
||||||
/* JP2 decoding */
|
/* JP2 decoding */
|
||||||
if(!jp2_read_struct(jp2, cio)) {
|
if(!jp2_read_struct(jp2, cio)) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Failed to decode jp2 structure\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Failed to decode jp2 structure\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* J2K decoding */
|
/* J2K decoding */
|
||||||
image = j2k_decode(jp2->j2k, cio);
|
image = j2k_decode(jp2->j2k, cio);
|
||||||
if(!image) {
|
if(!image) {
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
@ -620,7 +694,7 @@ bool jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, char *index)
|
||||||
/* J2K encoding */
|
/* J2K encoding */
|
||||||
|
|
||||||
if(!jp2_write_jp2c(jp2, cio, index)) {
|
if(!jp2_write_jp2c(jp2, cio, index)) {
|
||||||
opg_event_msg(jp2->cinfo, EVT_ERROR, "Failed to encode image\n");
|
opj_event_msg(jp2->cinfo, EVT_ERROR, "Failed to encode image\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Yannick Verschueren
|
* Copyright (c) 2004, Yannick Verschueren
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -98,76 +98,6 @@ typedef struct opj_jp2_box {
|
||||||
int init_pos;
|
int init_pos;
|
||||||
} opj_jp2_box_t;
|
} opj_jp2_box_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Read box headers
|
|
||||||
@param cinfo Codec context info
|
|
||||||
@param cio Input stream
|
|
||||||
@param box
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box);
|
|
||||||
static void jp2_write_url(opj_cio_t *cio, char *Idx_file);
|
|
||||||
/**
|
|
||||||
Read the IHDR box - Image Header box
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Input buffer stream
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Write the JP2H box - JP2 Header box
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Output buffer stream
|
|
||||||
*/
|
|
||||||
static void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Read the JP2H box - JP2 Header box
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Input buffer stream
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Write the FTYP box - File type box
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Output buffer stream
|
|
||||||
*/
|
|
||||||
static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Read the FTYP box - File type box
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Input buffer stream
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, char *index);
|
|
||||||
static bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset);
|
|
||||||
static void jp2_write_jp(opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Read the JP box - JPEG 2000 signature
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Input buffer stream
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/**
|
|
||||||
Decode the structure of a JP2 file
|
|
||||||
@param jp2 JP2 handle
|
|
||||||
@param cio Input buffer stream
|
|
||||||
@return Returns true if successful, returns false otherwise
|
|
||||||
*/
|
|
||||||
static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Yannick Verschueren
|
* Copyright (c) 2004, Yannick Verschueren
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -92,7 +91,7 @@ void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_heade
|
||||||
/* See for Class and CSn */
|
/* See for Class and CSn */
|
||||||
switch ((elmt >> 5) & 0x03) {
|
switch ((elmt >> 5) & 0x03) {
|
||||||
case 0:
|
case 0:
|
||||||
opg_event_msg(cinfo, EVT_ERROR, "Forbidden value encounter in message header !!\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Forbidden value encounter in message header !!\n");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Class = 0;
|
Class = 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Yannick Verschueren
|
* Copyright (c) 2004, Yannick Verschueren
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __MCT_H
|
#ifndef __MCT_H
|
||||||
#define __MCT_H
|
#define __MCT_H
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,65 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup MQC MQC - Implementation of an MQ-Coder */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Output a byte, doing bit-stuffing if necessary.
|
||||||
|
After a 0xff byte, the next byte must be smaller than 0x90.
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_byteout(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Renormalize mqc->a and mqc->c while encoding, so that mqc->a stays between 0x8000 and 0x10000
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_renorme(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Encode the most probable symbol
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_codemps(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Encode the most least symbol
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_codelps(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Fill mqc->c with 1's for flushing
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_setbits(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
FIXME: documentation ???
|
||||||
|
@param mqc MQC handle
|
||||||
|
@return
|
||||||
|
*/
|
||||||
|
static int mqc_mpsexchange(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
FIXME: documentation ???
|
||||||
|
@param mqc MQC handle
|
||||||
|
@return
|
||||||
|
*/
|
||||||
|
static int mqc_lpsexchange(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Input a byte
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_bytein(opj_mqc_t *mqc);
|
||||||
|
/**
|
||||||
|
Renormalize mqc->a and mqc->c while decoding
|
||||||
|
@param mqc MQC handle
|
||||||
|
*/
|
||||||
|
static void mqc_renormd(opj_mqc_t *mqc);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* This array defines all the possible states for a context. */
|
/* This array defines all the possible states for a context. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -71,60 +71,6 @@ typedef struct opj_mqc {
|
||||||
opj_mqc_state_t **curctx;
|
opj_mqc_state_t **curctx;
|
||||||
} opj_mqc_t;
|
} opj_mqc_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Output a byte, doing bit-stuffing if necessary.
|
|
||||||
After a 0xff byte, the next byte must be smaller than 0x90.
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_byteout(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Renormalize mqc->a and mqc->c while encoding, so that mqc->a stays between 0x8000 and 0x10000
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_renorme(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Encode the most probable symbol
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_codemps(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Encode the most least symbol
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_codelps(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Fill mqc->c with 1's for flushing
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_setbits(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
FIXME: documentation ???
|
|
||||||
@param mqc MQC handle
|
|
||||||
@return
|
|
||||||
*/
|
|
||||||
static int mqc_mpsexchange(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
FIXME: documentation ???
|
|
||||||
@param mqc MQC handle
|
|
||||||
@return
|
|
||||||
*/
|
|
||||||
static int mqc_lpsexchange(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Input a byte
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_bytein(opj_mqc_t *mqc);
|
|
||||||
/**
|
|
||||||
Renormalize mqc->a and mqc->c while decoding
|
|
||||||
@param mqc MQC handle
|
|
||||||
*/
|
|
||||||
static void mqc_renormd(opj_mqc_t *mqc);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
const char * opj_version() {
|
||||||
|
return OPENJPEG_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
opj_dinfo_t* opj_create_decompress(OPJ_CODEC_FORMAT format) {
|
opj_dinfo_t* opj_create_decompress(OPJ_CODEC_FORMAT format) {
|
||||||
opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_malloc(sizeof(opj_dinfo_t));
|
opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_malloc(sizeof(opj_dinfo_t));
|
||||||
if(!dinfo) return NULL;
|
if(!dinfo) return NULL;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,11 +27,11 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENJPEG_H
|
#ifndef OPENJPEG_H
|
||||||
#define OPENJPEG_H
|
#define OPENJPEG_H
|
||||||
|
|
||||||
|
#define OPENJPEG_VERSION "1.0.0"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
Compiler directives
|
Compiler directives
|
||||||
|
@ -439,6 +439,15 @@ typedef struct opj_image_comptparm {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==========================================================
|
||||||
|
openjpeg version
|
||||||
|
==========================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char * opj_version();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
image functions definitions
|
image functions definitions
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPJ_INCLUDES_H
|
#ifndef OPJ_INCLUDES_H
|
||||||
#define OPJ_INCLUDES_H
|
#define OPJ_INCLUDES_H
|
||||||
|
|
||||||
|
@ -33,7 +31,6 @@
|
||||||
Standard includes used by the library
|
Standard includes used by the library
|
||||||
==========================================================
|
==========================================================
|
||||||
*/
|
*/
|
||||||
#include <setjmp.h>
|
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -42,6 +39,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,47 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup PI PI - Implementation of a packet iterator */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get next packet in layer-resolution-component-precinct order.
|
||||||
|
@param pi packet iterator to modify
|
||||||
|
@return returns false if pi pointed to the last packet or else returns true
|
||||||
|
*/
|
||||||
|
static bool pi_next_lrcp(opj_pi_iterator_t * pi);
|
||||||
|
/**
|
||||||
|
Get next packet in resolution-layer-component-precinct order.
|
||||||
|
@param pi packet iterator to modify
|
||||||
|
@return returns false if pi pointed to the last packet or else returns true
|
||||||
|
*/
|
||||||
|
static bool pi_next_rlcp(opj_pi_iterator_t * pi);
|
||||||
|
/**
|
||||||
|
Get next packet in resolution-precinct-component-layer order.
|
||||||
|
@param pi packet iterator to modify
|
||||||
|
@return returns false if pi pointed to the last packet or else returns true
|
||||||
|
*/
|
||||||
|
static bool pi_next_rpcl(opj_pi_iterator_t * pi);
|
||||||
|
/**
|
||||||
|
Get next packet in precinct-component-resolution-layer order.
|
||||||
|
@param pi packet iterator to modify
|
||||||
|
@return returns false if pi pointed to the last packet or else returns true
|
||||||
|
*/
|
||||||
|
static bool pi_next_pcrl(opj_pi_iterator_t * pi);
|
||||||
|
/**
|
||||||
|
Get next packet in component-precinct-resolution-layer order.
|
||||||
|
@param pi packet iterator to modify
|
||||||
|
@return returns false if pi pointed to the last packet or else returns true
|
||||||
|
*/
|
||||||
|
static bool pi_next_cprl(opj_pi_iterator_t * pi);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
local functions
|
local functions
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -94,42 +94,6 @@ typedef struct opj_pi_iterator {
|
||||||
int x, y, dx, dy;
|
int x, y, dx, dy;
|
||||||
} opj_pi_iterator_t;
|
} opj_pi_iterator_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/**
|
|
||||||
Get next packet in layer-resolution-component-precinct order.
|
|
||||||
@param pi packet iterator to modify
|
|
||||||
@return returns false if pi pointed to the last packet or else returns true
|
|
||||||
*/
|
|
||||||
static bool pi_next_lrcp(opj_pi_iterator_t * pi);
|
|
||||||
/**
|
|
||||||
Get next packet in resolution-layer-component-precinct order.
|
|
||||||
@param pi packet iterator to modify
|
|
||||||
@return returns false if pi pointed to the last packet or else returns true
|
|
||||||
*/
|
|
||||||
static bool pi_next_rlcp(opj_pi_iterator_t * pi);
|
|
||||||
/**
|
|
||||||
Get next packet in resolution-precinct-component-layer order.
|
|
||||||
@param pi packet iterator to modify
|
|
||||||
@return returns false if pi pointed to the last packet or else returns true
|
|
||||||
*/
|
|
||||||
static bool pi_next_rpcl(opj_pi_iterator_t * pi);
|
|
||||||
/**
|
|
||||||
Get next packet in precinct-component-resolution-layer order.
|
|
||||||
@param pi packet iterator to modify
|
|
||||||
@return returns false if pi pointed to the last packet or else returns true
|
|
||||||
*/
|
|
||||||
static bool pi_next_pcrl(opj_pi_iterator_t * pi);
|
|
||||||
/**
|
|
||||||
Get next packet in component-precinct-resolution-layer order.
|
|
||||||
@param pi packet iterator to modify
|
|
||||||
@return returns false if pi pointed to the last packet or else returns true
|
|
||||||
*/
|
|
||||||
static bool pi_next_cprl(opj_pi_iterator_t * pi);
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
109
libopenjpeg/t1.c
109
libopenjpeg/t1.c
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,105 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup T1 T1 - Implementation of the tier-1 coding */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
static int t1_getctxno_zc(opj_t1_t *t1, int f, int orient);
|
||||||
|
static int t1_getctxno_sc(opj_t1_t *t1, int f);
|
||||||
|
static int t1_getctxno_mag(opj_t1_t *t1, int f);
|
||||||
|
static int t1_getspb(opj_t1_t *t1, int f);
|
||||||
|
static int t1_getnmsedec_sig(opj_t1_t *t1, int x, int bitpos);
|
||||||
|
static int t1_getnmsedec_ref(opj_t1_t *t1, int x, int bitpos);
|
||||||
|
static void t1_updateflags(int *fp, int s);
|
||||||
|
/**
|
||||||
|
Encode significant pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_sigpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int bpno, int one, int *nmsedec, char type, int vsc);
|
||||||
|
/**
|
||||||
|
Decode significant pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_sigpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int oneplushalf, char type, int vsc);
|
||||||
|
/**
|
||||||
|
Encode significant pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_sigpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int *nmsedec, char type, int cblksty);
|
||||||
|
/**
|
||||||
|
Decode significant pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_sigpass(opj_t1_t *t1, int w, int h, int bpno, int orient, char type, int cblksty);
|
||||||
|
/**
|
||||||
|
Encode refinement pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_refpass_step(opj_t1_t *t1, int *fp, int *dp, int bpno, int one, int *nmsedec, char type, int vsc);
|
||||||
|
/**
|
||||||
|
Decode refinement pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_refpass_step(opj_t1_t *t1, int *fp, int *dp, int poshalf, int neghalf, char type, int vsc);
|
||||||
|
/**
|
||||||
|
Encode refinement pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_refpass(opj_t1_t *t1, int w, int h, int bpno, int *nmsedec, char type, int cblksty);
|
||||||
|
/**
|
||||||
|
Decode refinement pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_refpass(opj_t1_t *t1, int w, int h, int bpno, char type, int cblksty);
|
||||||
|
/**
|
||||||
|
Encode clean-up pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_clnpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int bpno, int one, int *nmsedec, int partial, int vsc);
|
||||||
|
/**
|
||||||
|
Decode clean-up pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_clnpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int oneplushalf, int partial, int vsc);
|
||||||
|
/**
|
||||||
|
Encode clean-up pass
|
||||||
|
*/
|
||||||
|
static void t1_enc_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int *nmsedec, int cblksty);
|
||||||
|
/**
|
||||||
|
Decode clean-up pass
|
||||||
|
*/
|
||||||
|
static void t1_dec_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int cblksty);
|
||||||
|
static double t1_getwmsedec(int nmsedec, int compno, int level, int orient, int bpno, int qmfbid, double stepsize, int numcomps);
|
||||||
|
/**
|
||||||
|
Encode 1 code-block
|
||||||
|
@param t1 T1 handle
|
||||||
|
@param cblk Code-block coding parameters
|
||||||
|
@param orient
|
||||||
|
@param compno Component number
|
||||||
|
@param level
|
||||||
|
@param qmfbid
|
||||||
|
@param stepsize
|
||||||
|
@param cblksty Code-block style
|
||||||
|
@param numcomps
|
||||||
|
@param tile
|
||||||
|
*/
|
||||||
|
static void t1_encode_cblk(opj_t1_t *t1, opj_tcd_cblk_t * cblk, int orient, int compno, int level, int qmfbid, double stepsize, int cblksty, int numcomps, opj_tcd_tile_t * tile);
|
||||||
|
/**
|
||||||
|
Decode 1 code-block
|
||||||
|
@param t1 T1 handle
|
||||||
|
@param cblk Code-block coding parameters
|
||||||
|
@param orient
|
||||||
|
@param roishift Region of interest shifting value
|
||||||
|
@param cblksty Code-block style
|
||||||
|
*/
|
||||||
|
static void t1_decode_cblk(opj_t1_t *t1, opj_tcd_cblk_t * cblk, int orient, int roishift, int cblksty);
|
||||||
|
static int t1_init_ctxno_zc(int f, int orient);
|
||||||
|
static int t1_init_ctxno_sc(int f);
|
||||||
|
static int t1_init_ctxno_mag(int f);
|
||||||
|
static int t1_init_spb(int f);
|
||||||
|
/**
|
||||||
|
Initialize the look-up tables of the Tier-1 coder/decoder
|
||||||
|
@param t1 T1 handle
|
||||||
|
*/
|
||||||
|
static void t1_init_luts(opj_t1_t *t1);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
static int t1_getctxno_zc(opj_t1_t *t1, int f, int orient) {
|
static int t1_getctxno_zc(opj_t1_t *t1, int f, int orient) {
|
||||||
|
@ -395,7 +494,7 @@ static void t1_dec_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int
|
||||||
v = (v << 1) | mqc_decode(mqc);
|
v = (v << 1) | mqc_decode(mqc);
|
||||||
/*
|
/*
|
||||||
if (v!=0xa) {
|
if (v!=0xa) {
|
||||||
opg_event_msg(t1->cinfo, EVT_WARNING, "Bad segmentation symbol %x\n", v);
|
opj_event_msg(t1->cinfo, EVT_WARNING, "Bad segmentation symbol %x\n", v);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -403,7 +502,7 @@ static void t1_dec_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int
|
||||||
|
|
||||||
|
|
||||||
/** mod fixed_quality */
|
/** mod fixed_quality */
|
||||||
static double t1_getwmsedec(opj_t1_t *t1, int nmsedec, int compno, int level, int orient, int bpno, int qmfbid, double stepsize, int numcomps) {
|
static double t1_getwmsedec(int nmsedec, int compno, int level, int orient, int bpno, int qmfbid, double stepsize, int numcomps) {
|
||||||
double w1, w2, wmsedec;
|
double w1, w2, wmsedec;
|
||||||
if (qmfbid == 1) {
|
if (qmfbid == 1) {
|
||||||
w1 = (numcomps > 1) ? mct_getnorm(compno) : 1;
|
w1 = (numcomps > 1) ? mct_getnorm(compno) : 1;
|
||||||
|
@ -480,8 +579,8 @@ static void t1_encode_cblk(opj_t1_t *t1, opj_tcd_cblk_t * cblk, int orient, int
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed_quality */
|
/* fixed_quality */
|
||||||
cumwmsedec += t1_getwmsedec(t1, nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
cumwmsedec += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
||||||
tile->distotile += t1_getwmsedec(t1, nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
tile->distotile += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
||||||
|
|
||||||
/* 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))) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __T1_H
|
#ifndef __T1_H
|
||||||
#define __T1_H
|
#define __T1_H
|
||||||
/**
|
/**
|
||||||
|
@ -114,101 +113,6 @@ typedef struct opj_t1 {
|
||||||
|
|
||||||
} opj_t1_t;
|
} opj_t1_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
static int t1_getctxno_zc(opj_t1_t *t1, int f, int orient);
|
|
||||||
static int t1_getctxno_sc(opj_t1_t *t1, int f);
|
|
||||||
static int t1_getctxno_mag(opj_t1_t *t1, int f);
|
|
||||||
static int t1_getspb(opj_t1_t *t1, int f);
|
|
||||||
static int t1_getnmsedec_sig(opj_t1_t *t1, int x, int bitpos);
|
|
||||||
static int t1_getnmsedec_ref(opj_t1_t *t1, int x, int bitpos);
|
|
||||||
static void t1_updateflags(int *fp, int s);
|
|
||||||
/**
|
|
||||||
Encode significant pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_sigpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int bpno, int one, int *nmsedec, char type, int vsc);
|
|
||||||
/**
|
|
||||||
Decode significant pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_sigpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int oneplushalf, char type, int vsc);
|
|
||||||
/**
|
|
||||||
Encode significant pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_sigpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int *nmsedec, char type, int cblksty);
|
|
||||||
/**
|
|
||||||
Decode significant pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_sigpass(opj_t1_t *t1, int w, int h, int bpno, int orient, char type, int cblksty);
|
|
||||||
/**
|
|
||||||
Encode refinement pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_refpass_step(opj_t1_t *t1, int *fp, int *dp, int bpno, int one, int *nmsedec, char type, int vsc);
|
|
||||||
/**
|
|
||||||
Decode refinement pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_refpass_step(opj_t1_t *t1, int *fp, int *dp, int poshalf, int neghalf, char type, int vsc);
|
|
||||||
/**
|
|
||||||
Encode refinement pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_refpass(opj_t1_t *t1, int w, int h, int bpno, int *nmsedec, char type, int cblksty);
|
|
||||||
/**
|
|
||||||
Decode refinement pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_refpass(opj_t1_t *t1, int w, int h, int bpno, char type, int cblksty);
|
|
||||||
/**
|
|
||||||
Encode clean-up pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_clnpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int bpno, int one, int *nmsedec, int partial, int vsc);
|
|
||||||
/**
|
|
||||||
Decode clean-up pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_clnpass_step(opj_t1_t *t1, int *fp, int *dp, int orient, int oneplushalf, int partial, int vsc);
|
|
||||||
/**
|
|
||||||
Encode clean-up pass
|
|
||||||
*/
|
|
||||||
static void t1_enc_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int *nmsedec, int cblksty);
|
|
||||||
/**
|
|
||||||
Decode clean-up pass
|
|
||||||
*/
|
|
||||||
static void t1_dec_clnpass(opj_t1_t *t1, int w, int h, int bpno, int orient, int cblksty);
|
|
||||||
static double t1_getwmsedec(opj_t1_t *t1, int nmsedec, int compno, int level, int orient, int bpno, int qmfbid, double stepsize, int numcomps);
|
|
||||||
/**
|
|
||||||
Encode 1 code-block
|
|
||||||
@param t1 T1 handle
|
|
||||||
@param cblk Code-block coding parameters
|
|
||||||
@param orient
|
|
||||||
@param compno Component number
|
|
||||||
@param level
|
|
||||||
@param qmfbid
|
|
||||||
@param stepsize
|
|
||||||
@param cblksty Code-block style
|
|
||||||
@param numcomps
|
|
||||||
@param tile
|
|
||||||
*/
|
|
||||||
static void t1_encode_cblk(opj_t1_t *t1, opj_tcd_cblk_t * cblk, int orient, int compno, int level, int qmfbid, double stepsize, int cblksty, int numcomps, opj_tcd_tile_t * tile);
|
|
||||||
/**
|
|
||||||
Decode 1 code-block
|
|
||||||
@param t1 T1 handle
|
|
||||||
@param cblk Code-block coding parameters
|
|
||||||
@param orient
|
|
||||||
@param roishift Region of interest shifting value
|
|
||||||
@param cblksty Code-block style
|
|
||||||
*/
|
|
||||||
static void t1_decode_cblk(opj_t1_t *t1, opj_tcd_cblk_t * cblk, int orient, int roishift, int cblksty);
|
|
||||||
static int t1_init_ctxno_zc(int f, int orient);
|
|
||||||
static int t1_init_ctxno_sc(int f);
|
|
||||||
static int t1_init_ctxno_mag(int f);
|
|
||||||
static int t1_init_spb(int f);
|
|
||||||
/**
|
|
||||||
Initialize the look-up tables of the Tier-1 coder/decoder
|
|
||||||
@param t1 T1 handle
|
|
||||||
*/
|
|
||||||
static void t1_init_luts(opj_t1_t *t1);
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,56 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
|
/** @defgroup T2 T2 - Implementation of a tier-2 coding */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/** @name Local static functions */
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
static void t2_putcommacode(opj_bio_t *bio, int n);
|
||||||
|
static int t2_getcommacode(opj_bio_t *bio);
|
||||||
|
/**
|
||||||
|
Variable length code for signalling delta Zil (truncation point)
|
||||||
|
@param bio Bit Input/Output component
|
||||||
|
@param n delta Zil
|
||||||
|
*/
|
||||||
|
static void t2_putnumpasses(opj_bio_t *bio, int n);
|
||||||
|
static int t2_getnumpasses(opj_bio_t *bio);
|
||||||
|
/**
|
||||||
|
Encode a packet of a tile to a destination buffer
|
||||||
|
@param tile Tile for which to write the packets
|
||||||
|
@param tcp Tile coding parameters
|
||||||
|
@param pi Packet identity
|
||||||
|
@param dest Destination buffer
|
||||||
|
@param len Length of the destination buffer
|
||||||
|
@param image_info Structure to create an index file
|
||||||
|
@param tileno Number of the tile encoded
|
||||||
|
@return
|
||||||
|
*/
|
||||||
|
static int t2_encode_packet(opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_image_info_t *image_info, int tileno);
|
||||||
|
/**
|
||||||
|
@param seg
|
||||||
|
@param cblksty
|
||||||
|
@param first
|
||||||
|
*/
|
||||||
|
static void t2_init_seg(opj_tcd_seg_t *seg, int cblksty, int first);
|
||||||
|
/**
|
||||||
|
Decode a packet of a tile from a source buffer
|
||||||
|
@param t2 T2 handle
|
||||||
|
@param src Source buffer
|
||||||
|
@param len Length of the source buffer
|
||||||
|
@param tile Tile for which to write the packets
|
||||||
|
@param tcp Tile coding parameters
|
||||||
|
@param pi Packet identity
|
||||||
|
@return
|
||||||
|
*/
|
||||||
|
int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi);
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* #define RESTART 0x04 */
|
/* #define RESTART 0x04 */
|
||||||
|
|
||||||
|
@ -75,7 +125,7 @@ static int t2_getnumpasses(opj_bio_t *bio) {
|
||||||
return (37 + bio_read(bio, 7));
|
return (37 + bio_read(bio, 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int t2_encode_packet(opj_t2_t* t2, opj_tcd_tile_t * tile, opj_tcp_t * tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_image_info_t * image_info, int tileno) {
|
static int t2_encode_packet(opj_tcd_tile_t * tile, opj_tcp_t * tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_image_info_t * image_info, int tileno) {
|
||||||
int bandno, cblkno;
|
int bandno, cblkno;
|
||||||
unsigned char *sop = 0, *eph = 0;
|
unsigned char *sop = 0, *eph = 0;
|
||||||
unsigned char *c = dest;
|
unsigned char *c = dest;
|
||||||
|
@ -297,7 +347,7 @@ int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *
|
||||||
|
|
||||||
if (tcp->csty & J2K_CP_CSTY_SOP) {
|
if (tcp->csty & J2K_CP_CSTY_SOP) {
|
||||||
if ((*c) != 0xff || (*(c + 1) != 0x91)) {
|
if ((*c) != 0xff || (*(c + 1) != 0x91)) {
|
||||||
opg_event_msg(t2->cinfo, EVT_WARNING, "Expected SOP marker\n");
|
opj_event_msg(t2->cinfo, EVT_WARNING, "Expected SOP marker\n");
|
||||||
} else {
|
} else {
|
||||||
c += 6;
|
c += 6;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +476,7 @@ int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *
|
||||||
/* EPH markers */
|
/* EPH markers */
|
||||||
if (tcp->csty & J2K_CP_CSTY_EPH) {
|
if (tcp->csty & J2K_CP_CSTY_EPH) {
|
||||||
if ((*hd) != 0xff || (*(hd + 1) != 0x92)) {
|
if ((*hd) != 0xff || (*(hd + 1) != 0x92)) {
|
||||||
opg_event_msg(t2->cinfo, EVT_ERROR, "Expected EPH marker\n");
|
opj_event_msg(t2->cinfo, EVT_ERROR, "Expected EPH marker\n");
|
||||||
} else {
|
} else {
|
||||||
hd += 2;
|
hd += 2;
|
||||||
}
|
}
|
||||||
|
@ -511,7 +561,7 @@ int t2_encode_packets(opj_t2_t* t2, int tileno, opj_tcd_tile_t *tile, int maxlay
|
||||||
for (pino = 0; pino <= cp->tcps[tileno].numpocs; pino++) {
|
for (pino = 0; pino <= cp->tcps[tileno].numpocs; pino++) {
|
||||||
while (pi_next(&pi[pino])) {
|
while (pi_next(&pi[pino])) {
|
||||||
if (pi[pino].layno < maxlayers) {
|
if (pi[pino].layno < maxlayers) {
|
||||||
e = t2_encode_packet(t2, tile, &cp->tcps[tileno], &pi[pino], c, dest + len - c, image_info, tileno);
|
e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[pino], c, dest + len - c, image_info, tileno);
|
||||||
if (e == -999) {
|
if (e == -999) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __T2_H
|
#ifndef __T2_H
|
||||||
#define __T2_H
|
#define __T2_H
|
||||||
/**
|
/**
|
||||||
|
@ -52,53 +51,6 @@ typedef struct opj_t2 {
|
||||||
opj_cp_t *cp;
|
opj_cp_t *cp;
|
||||||
} opj_t2_t;
|
} opj_t2_t;
|
||||||
|
|
||||||
/** @name Local static functions */
|
|
||||||
/*@{*/
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
static void t2_putcommacode(opj_bio_t *bio, int n);
|
|
||||||
static int t2_getcommacode(opj_bio_t *bio);
|
|
||||||
/**
|
|
||||||
Variable length code for signalling delta Zil (truncation point)
|
|
||||||
@param bio Bit Input/Output component
|
|
||||||
@param n delta Zil
|
|
||||||
*/
|
|
||||||
static void t2_putnumpasses(opj_bio_t *bio, int n);
|
|
||||||
static int t2_getnumpasses(opj_bio_t *bio);
|
|
||||||
/**
|
|
||||||
Encode a packet of a tile to a destination buffer
|
|
||||||
@param t2 T2 handle
|
|
||||||
@param tile Tile for which to write the packets
|
|
||||||
@param tcp Tile coding parameters
|
|
||||||
@param pi Packet identity
|
|
||||||
@param dest Destination buffer
|
|
||||||
@param len Length of the destination buffer
|
|
||||||
@param image_info Structure to create an index file
|
|
||||||
@param tileno Number of the tile encoded
|
|
||||||
@return
|
|
||||||
*/
|
|
||||||
static int t2_encode_packet(opj_t2_t* t2, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_image_info_t *image_info, int tileno);
|
|
||||||
/**
|
|
||||||
@param seg
|
|
||||||
@param cblksty
|
|
||||||
@param first
|
|
||||||
*/
|
|
||||||
static void t2_init_seg(opj_tcd_seg_t *seg, int cblksty, int first);
|
|
||||||
/**
|
|
||||||
Decode a packet of a tile from a source buffer
|
|
||||||
@param t2 T2 handle
|
|
||||||
@param src Source buffer
|
|
||||||
@param len Length of the source buffer
|
|
||||||
@param tile Tile for which to write the packets
|
|
||||||
@param tcp Tile coding parameters
|
|
||||||
@param pi Packet identity
|
|
||||||
@return
|
|
||||||
*/
|
|
||||||
int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi);
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/** @name Exported functions */
|
/** @name Exported functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "opj_includes.h"
|
#include "opj_includes.h"
|
||||||
|
|
||||||
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img, int curtileno) {
|
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) {
|
||||||
int tileno, compno, resno, bandno, precno, cblkno;
|
int tileno, compno, resno, bandno, precno, cblkno;
|
||||||
|
|
||||||
fprintf(fd, "image {\n");
|
fprintf(fd, "image {\n");
|
||||||
|
@ -58,7 +58,7 @@ void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img, int curtileno) {
|
||||||
opj_tcd_band_t *band = &res->bands[bandno];
|
opj_tcd_band_t *band = &res->bands[bandno];
|
||||||
fprintf(fd, " band {\n");
|
fprintf(fd, " band {\n");
|
||||||
fprintf(fd,
|
fprintf(fd,
|
||||||
" x0=%d, y0=%d, x1=%d, y1=%d, stepsize=%d, numbps=%d\n",
|
" x0=%d, y0=%d, x1=%d, y1=%d, stepsize=%f, numbps=%d\n",
|
||||||
band->x0, band->y0, band->x1, band->y1, band->stepsize, band->numbps);
|
band->x0, band->y0, band->x1, band->y1, band->stepsize, band->numbps);
|
||||||
for (precno = 0; precno < res->pw * res->ph; precno++) {
|
for (precno = 0; precno < res->pw * res->ph; precno++) {
|
||||||
opj_tcd_precinct_t *prec = &band->precincts[precno];
|
opj_tcd_precinct_t *prec = &band->precincts[precno];
|
||||||
|
@ -340,7 +340,7 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tcd_dump(stdout, tcd, &tcd->tcd_image, curtileno); */
|
/* tcd_dump(stdout, tcd, &tcd->tcd_image); */
|
||||||
}
|
}
|
||||||
|
|
||||||
void tcd_free_encode(opj_tcd_t *tcd) {
|
void tcd_free_encode(opj_tcd_t *tcd) {
|
||||||
|
@ -607,7 +607,7 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int cur
|
||||||
} /* compno */
|
} /* compno */
|
||||||
} /* tileno */
|
} /* tileno */
|
||||||
|
|
||||||
/* tcd_dump(stdout, tcd, &tcd->tcd_image,0); */
|
/* tcd_dump(stdout, tcd, &tcd->tcd_image); */
|
||||||
}
|
}
|
||||||
|
|
||||||
void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp) {
|
void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp) {
|
||||||
|
@ -782,7 +782,7 @@ void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp) {
|
||||||
} /* compno */
|
} /* compno */
|
||||||
} /* i = 0..cp->tileno_size */
|
} /* i = 0..cp->tileno_size */
|
||||||
|
|
||||||
/* tcd_dump(stdout, tcd, &tcd->tcd_image, 0); */
|
/* tcd_dump(stdout, tcd, &tcd->tcd_image); */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Allocate place to store the decoded data = final image
|
Allocate place to store the decoded data = final image
|
||||||
|
@ -986,8 +986,6 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
|
||||||
const double K = 1; /* 1.1; // fixed_quality */
|
const double K = 1; /* 1.1; // fixed_quality */
|
||||||
double maxSE = 0;
|
double maxSE = 0;
|
||||||
|
|
||||||
opj_t2_t *t2 = NULL; /* T2 component */
|
|
||||||
|
|
||||||
opj_cp_t *cp = tcd->cp;
|
opj_cp_t *cp = tcd->cp;
|
||||||
opj_tcd_tile_t *tcd_tile = tcd->tcd_tile;
|
opj_tcd_tile_t *tcd_tile = tcd->tcd_tile;
|
||||||
opj_tcp_t *tcd_tcp = tcd->tcp;
|
opj_tcp_t *tcd_tcp = tcd->tcp;
|
||||||
|
@ -1085,7 +1083,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
|
||||||
lo = thresh;
|
lo = thresh;
|
||||||
} else {
|
} else {
|
||||||
l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info);
|
l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info);
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen);
|
||||||
if (l == -999) {
|
if (l == -999) {
|
||||||
lo = thresh;
|
lo = thresh;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1252,7 +1250,7 @@ int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, op
|
||||||
/*---------------CLEAN-------------------*/
|
/*---------------CLEAN-------------------*/
|
||||||
|
|
||||||
encoding_time = opj_clock() - encoding_time;
|
encoding_time = opj_clock() - encoding_time;
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "- tile encoded in %f s\n", encoding_time);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "- tile encoded in %f s\n", encoding_time);
|
||||||
|
|
||||||
/* cleaning memory */
|
/* cleaning memory */
|
||||||
for (compno = 0; compno < tile->numcomps; compno++) {
|
for (compno = 0; compno < tile->numcomps; compno++) {
|
||||||
|
@ -1279,7 +1277,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
|
||||||
tile = tcd->tcd_tile;
|
tile = tcd->tcd_tile;
|
||||||
|
|
||||||
tile_time = opj_clock(); /* time needed to decode a tile */
|
tile_time = opj_clock(); /* time needed to decode a tile */
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "tile %d of %d\n", tileno + 1, tcd->cp->tw * tcd->cp->th);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "tile %d of %d\n", tileno + 1, tcd->cp->tw * tcd->cp->th);
|
||||||
|
|
||||||
/*--------------TIER2------------------*/
|
/*--------------TIER2------------------*/
|
||||||
|
|
||||||
|
@ -1289,7 +1287,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
|
||||||
|
|
||||||
if (l == -999) {
|
if (l == -999) {
|
||||||
eof = 1;
|
eof = 1;
|
||||||
opg_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n");
|
opj_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------TIER1-----------------*/
|
/*------------------TIER1-----------------*/
|
||||||
|
@ -1299,7 +1297,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
|
||||||
t1_decode_cblks(t1, tile, tcd->tcp);
|
t1_decode_cblks(t1, tile, tcd->tcp);
|
||||||
t1_destroy(t1);
|
t1_destroy(t1);
|
||||||
t1_time = opj_clock() - t1_time;
|
t1_time = opj_clock() - t1_time;
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "- tiers-1 took %f s\n", t1_time);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "- tiers-1 took %f s\n", t1_time);
|
||||||
|
|
||||||
/*----------------DWT---------------------*/
|
/*----------------DWT---------------------*/
|
||||||
|
|
||||||
|
@ -1322,7 +1320,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dwt_time = opj_clock() - dwt_time;
|
dwt_time = opj_clock() - dwt_time;
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "- dwt took %f s\n", dwt_time);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "- dwt took %f s\n", dwt_time);
|
||||||
|
|
||||||
/*----------------MCT-------------------*/
|
/*----------------MCT-------------------*/
|
||||||
|
|
||||||
|
@ -1373,7 +1371,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tile_time = opj_clock() - tile_time; /* time needed to decode a tile */
|
tile_time = opj_clock() - tile_time; /* time needed to decode a tile */
|
||||||
opg_event_msg(tcd->cinfo, EVT_INFO, "- tile decoded in %f s\n", tile_time);
|
opj_event_msg(tcd->cinfo, EVT_INFO, "- tile decoded in %f s\n", tile_time);
|
||||||
|
|
||||||
for (compno = 0; compno < tile->numcomps; compno++) {
|
for (compno = 0; compno < tile->numcomps; compno++) {
|
||||||
opj_free(tcd->tcd_image->tiles[tileno].comps[compno].data);
|
opj_free(tcd->tcd_image->tiles[tileno].comps[compno].data);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TCD_H
|
#ifndef __TCD_H
|
||||||
#define __TCD_H
|
#define __TCD_H
|
||||||
/**
|
/**
|
||||||
|
@ -191,7 +190,7 @@ typedef struct opj_tcd {
|
||||||
/**
|
/**
|
||||||
Dump the content of a tcd structure
|
Dump the content of a tcd structure
|
||||||
*/
|
*/
|
||||||
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img, int curtileno);
|
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img);
|
||||||
/**
|
/**
|
||||||
Create a new TCD handle
|
Create a new TCD handle
|
||||||
@param cinfo Codec context info
|
@param cinfo Codec context info
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2001-2003, David Janssens
|
* Copyright (c) 2001-2003, David Janssens
|
||||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||||
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
|
||||||
* Copyright (c) 2005, HervŽ Drolon, FreeImage Team
|
* Copyright (c) 2005, Hervé Drolon, FreeImage Team
|
||||||
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue