removed old readme and Makefile
This commit is contained in:
parent
2dc3ca544d
commit
e45e87cfb7
|
@ -1,94 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# makefile for OpenJPEG codec
|
||||
|
||||
OPENJPEG_DIR = ../libopenjpeg
|
||||
|
||||
ifndef DEBUG
|
||||
LDFLAGS = -s -lm
|
||||
else
|
||||
LDFLAGS = -lm
|
||||
endif
|
||||
|
||||
CFLAGS = -Wall -O3 -fno-strength-reduce -fomit-frame-pointer -I$(OPENJPEG_DIR)
|
||||
|
||||
OBJ_DIR_W32 = obj.w32
|
||||
BIN_DIR_W32 = bin.w32
|
||||
LIB_DIR_W32 = $(OPENJPEG_DIR)/lib.w32
|
||||
|
||||
ifdef MINGW32
|
||||
CC = i386-mingw32-gcc
|
||||
CFLAGS += -DDONT_HAVE_GETOPT
|
||||
OBJ_DIR = $(OBJ_DIR_W32)
|
||||
BIN_DIR = $(BIN_DIR_W32)
|
||||
LIB_DIR = lib.w32
|
||||
all: $(BIN_DIR) $(OBJ_DIR) $(LIB_DIR) \
|
||||
$(addprefix $(BIN_DIR)/,j2k_to_image.exe image_to_j2k.exe)
|
||||
else
|
||||
CC = gcc
|
||||
OBJ_DIR = obj
|
||||
BIN_DIR = bin
|
||||
LIB_DIR = lib
|
||||
all: $(BIN_DIR) $(OBJ_DIR) $(LIB_DIR) \
|
||||
$(addprefix $(BIN_DIR)/,j2k_to_image image_to_j2k)
|
||||
endif
|
||||
|
||||
ifdef DYNAMIC
|
||||
ifdef MINGW32
|
||||
LIB_OPENJPEG = $(LIB_DIR)/libopenjpeg.dll
|
||||
LDFLAGS += -L$(LIB_DIR) -lopenjpeg
|
||||
else
|
||||
LIB_OPENJPEG = $(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.so
|
||||
LDFLAGS += -L$(OPENJPEG_DIR)/$(LIB_DIR) -lopenjpeg
|
||||
endif
|
||||
else
|
||||
LIB_OPENJPEG = $(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.a
|
||||
LDFLAGS += $(LIB_OPENJPEG)
|
||||
endif
|
||||
|
||||
$(BIN_DIR):
|
||||
mkdir $(BIN_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir $(OBJ_DIR)
|
||||
|
||||
$(LIB_DIR):
|
||||
mkdir $(LIB_DIR)
|
||||
|
||||
$(LIB_DIR)/libopenjpeg.dll: $(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.dll
|
||||
ln -sf ../$< $@
|
||||
$(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.dll:
|
||||
cd $(OPENJPEG_DIR) && \
|
||||
$(MAKE) $(OBJ_DIR) $(LIB_DIR) $(LIB_DIR)/libopenjpeg.dll
|
||||
$(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.a:
|
||||
cd $(OPENJPEG_DIR) && \
|
||||
$(MAKE) $(OBJ_DIR) $(LIB_DIR) $(LIB_DIR)/libopenjpeg.a
|
||||
$(OPENJPEG_DIR)/$(LIB_DIR)/libopenjpeg.so:
|
||||
cd $(OPENJPEG_DIR) && \
|
||||
$(MAKE) $(LIB_DIR) $(LIB_DIR)/libopenjpeg.so
|
||||
|
||||
$(OBJ_DIR)/%.o:
|
||||
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
|
||||
|
||||
$(OBJ_DIR)/getopt.o: compat/getopt.c
|
||||
$(OBJ_DIR)/convert.o: convert.c
|
||||
$(OBJ_DIR)/j2k_to_image.o: j2k_to_image.c
|
||||
$(OBJ_DIR)/image_to_j2k.o: image_to_j2k.c convert.h
|
||||
|
||||
J2I_OBJS = $(addprefix $(OBJ_DIR)/,j2k_to_image.o)
|
||||
I2J_OBJS = $(addprefix $(OBJ_DIR)/,image_to_j2k.o convert.o)
|
||||
|
||||
$(BIN_DIR)/j2k_to_image: $(J2I_OBJS) $(LIB_OPENJPEG)
|
||||
${CC} -o $@ $(J2I_OBJS) ${LDFLAGS}
|
||||
|
||||
$(BIN_DIR)/image_to_j2k: $(I2J_OBJS) $(LIB_OPENJPEG)
|
||||
${CC} -o $@ $(I2J_OBJS) ${LDFLAGS}
|
||||
|
||||
$(BIN_DIR)/j2k_to_image.exe: $(J2I_OBJS) $(LIB_OPENJPEG)
|
||||
${CC} -o $@ $(J2I_OBJS) ${LDFLAGS}
|
||||
|
||||
$(BIN_DIR)/image_to_j2k.exe: $(I2J_OBJS) $(LIB_OPENJPEG) $(OBJ_DIR)/getopt.o
|
||||
${CC} -o $@ $(I2J_OBJS) ${LDFLAGS} $(OBJ_DIR)/getopt.o
|
||||
|
||||
clean:
|
||||
rm -f $(BIN_DIR_W32)/* $(BIN_DIR)/* $(OBJ_DIR_W32)/* $(OBJ_DIR)/*
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) 2001-2003, David Janssens
|
||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||
* 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
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -27,7 +27,6 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -112,7 +111,7 @@ opj_image_t* bmptoimage(char *filename, opj_cparameters_t *parameters) {
|
|||
BITMAPINFOHEADER_t Info_h;
|
||||
unsigned char *RGB;
|
||||
unsigned char *table_R, *table_G, *table_B;
|
||||
unsigned int j, PAD, type = 0;
|
||||
unsigned int j, PAD = 0;
|
||||
|
||||
int x, y, index;
|
||||
int gray_scale = 1, not_end_file = 1;
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __J2K_CONVERT_H
|
||||
#define __J2K_CONVERT_H
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) 2001-2003, David Janssens
|
||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||
* 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
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -27,8 +27,6 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -37,6 +35,13 @@
|
|||
#include "compat/getopt.h"
|
||||
#include "convert.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
#endif
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
#define J2K_CFMT 0
|
||||
#define JP2_CFMT 1
|
||||
#define JPT_CFMT 2
|
||||
|
|
|
@ -39,9 +39,11 @@ RSC=rc.exe
|
|||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../libopenjpeg" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../libopenjpeg" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -64,7 +66,8 @@ LINK32=link.exe
|
|||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
|
|
@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "LibOpenJPEG"=..\libopenjpeg\LibOpenJPEG.dsp - Package Owner=<4>
|
||||
Project: "LibOpenJPEG"=..\LibOpenJPEG.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
|
|
|
@ -35,6 +35,13 @@
|
|||
#include "compat/getopt.h"
|
||||
#include "convert.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
#endif
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
#define J2K_CFMT 0
|
||||
#define JP2_CFMT 1
|
||||
#define JPT_CFMT 2
|
||||
|
|
|
@ -42,7 +42,8 @@ RSC=rc.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../libopenjpeg" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../libopenjpeg" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
|
|
@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "LibOpenJPEG"=..\libopenjpeg\LibOpenJPEG.dsp - Package Owner=<4>
|
||||
Project: "LibOpenJPEG"=..\LibOpenJPEG.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
|
|
105
codec/readme.txt
105
codec/readme.txt
|
@ -1,105 +0,0 @@
|
|||
List of parameters for the coder JPEG 2000 :
|
||||
|
||||
Date : June the 25th, 2003
|
||||
Author : Yannick Verschueren
|
||||
Contact : verschueren@tele.ucl.ac.be
|
||||
|
||||
- the option -help displays the readme.txt file on screen
|
||||
|
||||
- The markers COD and QCD are writed both of two in the main_header and never appear in the tile_header. The markers in the main header are : SOC SIZ COD QCD COM.
|
||||
|
||||
- This coder can encode mega image, a test was made on a 24000x24000 pixels color image. You need enough disk space memory (twice the original) to encode the image. (i.e. for a 1.5 Gb image you need a minimum of 3Gb of disk memory)
|
||||
|
||||
REMARKS :
|
||||
---------
|
||||
|
||||
* the value of rate enter in the code line is the compression factor !
|
||||
exemple :
|
||||
|
||||
-r 20,10,1 means quality 1 : compress 20x, quality 2 : compress 10x and quality 3 : compress 1x = lossless
|
||||
|
||||
* The number of resolution can be modified by the program in view to respect profile-0 conditions (Taubman, Marcelin (2002), "JPEG2000, image compression fundamentals, standards and practice", p700)
|
||||
|
||||
By default :
|
||||
------------
|
||||
|
||||
* lossless
|
||||
* 1 tile
|
||||
* size of precinct 2^15 x 2^15 (means 1 precinct)
|
||||
* size of code-block 64 x 64
|
||||
* Number of resolution : 6
|
||||
* No SOP marker in the codestream
|
||||
* No EPH marker in the codestream
|
||||
* No sub-sampling in x and y direction
|
||||
* No mode switch activated
|
||||
* progression order : LRCP
|
||||
* No index file
|
||||
* No ROI upshifted
|
||||
* No offset of the origin of the image
|
||||
* No offset of the origin of the tiles
|
||||
* Reversible DWT 5-3
|
||||
|
||||
Parameters :
|
||||
------------
|
||||
|
||||
-i : source file (-i source.pnm also *.pgm, *.ppm) "required"
|
||||
|
||||
-o : destination file (-o dest.j2k) "required"
|
||||
|
||||
-r : different rates (-r 20,10,5) "optional"
|
||||
|
||||
-n : Number of resolution (-n 3) "optional"
|
||||
|
||||
-b : size of code block (-b 32,32) "optional"
|
||||
|
||||
-c : size of precinct (-c 128,128) "optional"
|
||||
|
||||
-t : size of tile (-t 512,512) "optional"
|
||||
|
||||
-p : progression order (-p LRCP) [LRCP, RLCP, RPCL, PCRL, CPRL] "optional"
|
||||
|
||||
-s : subsampling factor (-s 2,2) [-s X,Y] "optional"
|
||||
|
||||
-SOP : write SOP marker before each packet "optional"
|
||||
|
||||
-EPH : write EPH marker after each header packet "optional"
|
||||
|
||||
-M : mode switch (-M 3) [1= BYPASS(LAZY) 2=RESET 4=RESTART(TERMALL) 8=VSC 16=ERTERM(SEGTERM) 32=SEGMARK(SEGSYM)] "optional"
|
||||
for several mode switch you have to add the value of each mode you want
|
||||
ex : RESTART(4) + RESET(2) + SEGMARK(32) = -M 38
|
||||
|
||||
-x : Create an index file *.Idx (-x index_name.Idx) "optional"
|
||||
|
||||
-ROI:c=%d,U=%d : quantization indices upshifted for component c=%d [%d = 0,1,2]
|
||||
with a value of U=%d [0 <= %d <= 37] (i.e. -ROI:c=0,U=25) "optional"
|
||||
|
||||
-d : offset of the origin of the image (-d 150,300) "optional"
|
||||
|
||||
-T : offset of the origin of the tiles (-T 100,75) "optional"
|
||||
|
||||
-I : Use the irreversible DWT 9-7 (-I) "optional"
|
||||
|
||||
IMPORTANT :
|
||||
-----------
|
||||
|
||||
* subsampling bigger than 2 can produce error
|
||||
|
||||
The index file respect the structure below :
|
||||
---------------------------------------------
|
||||
|
||||
Image_height Image_width
|
||||
progression order
|
||||
Tiles_size_X Tiles_size_Y
|
||||
Components_nb
|
||||
Layers_nb
|
||||
decomposition_levels
|
||||
Precincts_size_X Precincts_size_Y
|
||||
Main_header_end_position
|
||||
Codestream_size
|
||||
Tile0 start_pos end_Theader end_pos
|
||||
Tile1 " " "
|
||||
...
|
||||
TileN " " "
|
||||
Tpacket_0 Tile layer res. comp. prec. start_pos end_pos
|
||||
...
|
||||
Tpacket_M " " " " " " "
|
Loading…
Reference in New Issue