ABI
Tracker

(OpenJPEG)




Headers diff: 1.1 vs 1.2



 fix.h (1.1)   fix.h (1.2) 
skipping to change at line 57 skipping to change at line 57
/** @defgroup FIX FIX - Implementation of operations of specific multiplica tion */ /** @defgroup FIX FIX - Implementation of operations of specific multiplica tion */
/*@{*/ /*@{*/
/** /**
Multiply two fixed-precision rational numbers. Multiply two fixed-precision rational numbers.
@param a @param a
@param b @param b
@return Returns a * b @return Returns a * b
*/ */
static INLINE int fix_mul(int a, int b) { static INLINE int fix_mul(int a, int b) {
int64 temp = (int64) a * (int64) b >> 12; int64 temp = (int64) a * (int64) b ;
return (int) ((temp >> 1) + (temp & 1)) ; temp += temp & 4096;
return (int) (temp >> 13) ;
} }
/*@}*/ /*@}*/
#endif /* __FIX_H */ #endif /* __FIX_H */
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 j2k.h (1.1)   j2k.h (1.2) 
/* /*
* Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, U niversite catholique de Louvain (UCL), Belgium * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, U niversite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2007, Professor Benoit Macq * Copyright (c) 2002-2007, Professor Benoit Macq
* 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-2007, Francois-Olivier Devaux and Antonin Descampe * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team * Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2006-2007, Parvatha Elangovan
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
skipping to change at line 107 skipping to change at line 108
J2K_STATE_MH = 0x0004, /**< the decoding process is in the main header */ J2K_STATE_MH = 0x0004, /**< the decoding process is in the main header */
J2K_STATE_TPHSOT = 0x0008, /**< the decoding process is in a tile pa rt header and expects a SOT marker */ J2K_STATE_TPHSOT = 0x0008, /**< the decoding process is in a tile pa rt header and expects a SOT marker */
J2K_STATE_TPH = 0x0010, /**< the decoding process is in a tile pa rt header */ J2K_STATE_TPH = 0x0010, /**< the decoding process is in a tile pa rt header */
J2K_STATE_MT = 0x0020, /**< the EOC marker has just been read */ J2K_STATE_MT = 0x0020, /**< the EOC marker has just been read */
J2K_STATE_NEOC = 0x0040 /**< the decoding process must not expect a EOC marker because the codestream is truncated */ J2K_STATE_NEOC = 0x0040 /**< the decoding process must not expect a EOC marker because the codestream is truncated */
} J2K_STATUS; } J2K_STATUS;
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/** /**
T2 encoding mode
*/
typedef enum T2_MODE {
THRESH_CALC = 0, /** Function called in Rate allocation proce
ss*/
FINAL_PASS = 1 /** Function called in Tier 2 process*/
}J2K_T2_MODE;
/**
Quantization stepsize Quantization stepsize
*/ */
typedef struct opj_stepsize { typedef struct opj_stepsize {
/** exponent */ /** exponent */
int expn; int expn;
/** mantissa */ /** mantissa */
int mant; int mant;
} opj_stepsize_t; } opj_stepsize_t;
/** /**
skipping to change at line 190 skipping to change at line 199
/** add fixed_quality */ /** add fixed_quality */
float distoratio[100]; float distoratio[100];
/** tile-component coding parameters */ /** tile-component coding parameters */
opj_tccp_t *tccps; opj_tccp_t *tccps;
} opj_tcp_t; } opj_tcp_t;
/** /**
Coding parameters Coding parameters
*/ */
typedef struct opj_cp { typedef struct opj_cp {
/** Digital cinema profile*/
OPJ_CINEMA_MODE cinema;
/** Maximum rate for each component. If == 0, component size limitat
ion is not considered */
int max_comp_size;
/** Size of the image in bits*/
int img_size;
/** Rsiz*/
OPJ_RSIZ_CAPABILITIES rsiz;
/** Enabling Tile part generation*/
char tp_on;
/** Flag determining tile part generation*/
char tp_flag;
/** Position of tile part flag in progression order*/
int tp_pos;
/** allocation by rate/distortion */ /** allocation by rate/distortion */
int disto_alloc; int disto_alloc;
/** allocation by fixed layer */ /** allocation by fixed layer */
int fixed_alloc; int fixed_alloc;
/** add fixed_quality */ /** add fixed_quality */
int fixed_quality; int fixed_quality;
/** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */ /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */
int reduce; int reduce;
/** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */ /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */
int layer; int layer;
/** if == NO_LIMITATION, decode entire codestream; if == LIMIT_TO_MA
IN_HEADER then only decode the main header */
OPJ_LIMIT_DECODING limit_decoding;
/** 0 = no index || 1 = index */ /** 0 = no index || 1 = index */
int index_on; int index_on;
/** XTOsiz */ /** XTOsiz */
int tx0; int tx0;
/** YTOsiz */ /** YTOsiz */
int ty0; int ty0;
/** XTsiz */ /** XTsiz */
int tdx; int tdx;
/** YTsiz */ /** YTsiz */
int tdy; int tdy;
skipping to change at line 379 skipping to change at line 404
JPEG-2000 codestream reader/writer JPEG-2000 codestream reader/writer
*/ */
typedef struct opj_j2k { typedef struct opj_j2k {
/** codec context */ /** codec context */
opj_common_ptr cinfo; opj_common_ptr cinfo;
/** locate in which part of the codestream the decoder is (main head er, tile header, end) */ /** locate in which part of the codestream the decoder is (main head er, tile header, end) */
int state; int state;
/** number of the tile curently concern by coding/decoding */ /** number of the tile curently concern by coding/decoding */
int curtileno; int curtileno;
/** Tile part number*/
int tp_num;
/** Tilepart number currently coding*/
int cur_tp_num;
/** Total number of tileparts of the current tile*/
int *cur_totnum_tp;
/**
locate the start position of the TLM marker
after encoding the tilepart, a jump (in j2k_write_sod) is done to th
e TLM marker to store the value of its length.
*/
int tlm_start;
/** Total num of tile parts in whole image = num tiles* num tilepart
s in each tile*/
/** used in TLMmarker*/
int totnum_tp;
/** /**
locate the position of the end of the tile in the codestream, locate the position of the end of the tile in the codestream,
used to detect a truncated codestream (in j2k_read_sod) used to detect a truncated codestream (in j2k_read_sod)
*/ */
unsigned char *eot; unsigned char *eot;
/** /**
locate the start position of the SOT marker of the current coded til e: locate the start position of the SOT marker of the current coded til e:
after encoding the tile, a jump (in j2k_write_sod) is done to the SO T marker to store the value of its length. after encoding the tile, a jump (in j2k_write_sod) is done to the SO T marker to store the value of its length.
*/ */
int sot_start; int sot_start;
skipping to change at line 469 skipping to change at line 508
void j2k_destroy_compress(opj_j2k_t *j2k); void j2k_destroy_compress(opj_j2k_t *j2k);
/** /**
Setup the encoder parameters using the current image and using user paramet ers. Setup the encoder parameters using the current image and using user paramet ers.
Coding parameters are returned in j2k->cp. Coding parameters are returned in j2k->cp.
@param j2k J2K compressor handle @param j2k J2K compressor handle
@param parameters compression parameters @param parameters compression parameters
@param image input filled image @param image input filled image
*/ */
void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_i mage_t *image); void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_i mage_t *image);
/** /**
Converts an enum type progression order to string type
*/
char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order);
/**
Encode an image into a JPEG-2000 codestream Encode an image into a JPEG-2000 codestream
@param j2k J2K compressor handle @param j2k J2K compressor handle
@param cio Output buffer stream @param cio Output buffer stream
@param image Image to encode @param image Image to encode
@param index Name of the index file if required, NULL otherwise @param index Name of the index file if required, NULL otherwise
@return Returns true if successful, returns false otherwise @return Returns true if successful, returns false otherwise
*/ */
bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *i ndex); bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *i ndex);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/*@}*/ /*@}*/
 End of changes. 6 change blocks. 
0 lines changed or deleted 48 lines changed or added


 jp2.h (1.1)   jp2.h (1.2) 
skipping to change at line 105 skipping to change at line 105
typedef struct opj_jp2_box { typedef struct opj_jp2_box {
int length; int length;
int type; int type;
int init_pos; int init_pos;
} opj_jp2_box_t; } opj_jp2_box_t;
/** @name Exported functions */ /** @name Exported functions */
/*@{*/ /*@{*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/** /**
Write the JP2H box - JP2 Header box (used in MJ2)
@param jp2 JP2 handle
@param cio Output buffer stream
*/
void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
/**
Read the JP2H box - JP2 Header box (used in MJ2)
@param jp2 JP2 handle
@param cio Input buffer stream
@return Returns true if successful, returns false otherwise
*/
bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
/**
Creates a JP2 decompression structure Creates a JP2 decompression structure
@param cinfo Codec context info @param cinfo Codec context info
@return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise @return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise
*/ */
opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo); opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo);
/** /**
Destroy a JP2 decompressor handle Destroy a JP2 decompressor handle
@param jp2 JP2 decompressor handle to destroy @param jp2 JP2 decompressor handle to destroy
*/ */
void jp2_destroy_decompress(opj_jp2_t *jp2); void jp2_destroy_decompress(opj_jp2_t *jp2);
 End of changes. 1 change blocks. 
0 lines changed or deleted 13 lines changed or added


 openjpeg.h (1.1)   openjpeg.h (1.2) 
/* /*
* Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, U niversite catholique de Louvain (UCL), Belgium * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, U niversite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2007, Professor Benoit Macq * Copyright (c) 2002-2007, Professor Benoit Macq
* 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-2007, Francois-Olivier Devaux and Antonin Descampe * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team * Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2006-2007, Parvatha Elangovan
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
skipping to change at line 34 skipping to change at line 35
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T HE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T HE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef OPENJPEG_H #ifndef OPENJPEG_H
#define OPENJPEG_H #define OPENJPEG_H
#define OPENJPEG_VERSION "1.1.0" #define OPENJPEG_VERSION "1.2.0"
/* /*
========================================================== ==========================================================
Compiler directives Compiler directives
========================================================== ==========================================================
*/ */
#if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__)) #if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__))
#define OPJ_API #define OPJ_API
#define OPJ_CALLCONV #define OPJ_CALLCONV
skipping to change at line 99 skipping to change at line 100
Useful constant definitions Useful constant definitions
========================================================== ==========================================================
*/ */
#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */ #define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */
#define J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */ #define J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */
#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-b and linked to number of resolution level */ #define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-b and linked to number of resolution level */
/* UniPG>> */ /* UniPG>> */
#ifdef USE_JPWL
#define JPWL_MAX_NO_TILESPECS 16 /**< Maximum number of tile parts expecte d by JPWL: increase at your will */ #define JPWL_MAX_NO_TILESPECS 16 /**< Maximum number of tile parts expecte d by JPWL: increase at your will */
#define JPWL_MAX_NO_PACKSPECS 16 /**< Maximum number of packet parts expec ted by JPWL: increase at your will */ #define JPWL_MAX_NO_PACKSPECS 16 /**< Maximum number of packet parts expec ted by JPWL: increase at your will */
#define JPWL_MAX_NO_MARKERS 512 /**< Maximum number of JPWL markers: inc rease at your will */ #define JPWL_MAX_NO_MARKERS 512 /**< Maximum number of JPWL markers: inc rease at your will */
#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */ #define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */
#define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, s o you'll find better the first EPB */ #define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, s o you'll find better the first EPB */
#define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, t o avoid some crashes */ #define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, t o avoid some crashes */
#define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit error s in marker id's */ #define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit error s in marker id's */
#endif /* USE_JPWL */
/* <<UniPG */ /* <<UniPG */
/* /*
========================================================== ==========================================================
enum definitions enum definitions
========================================================== ==========================================================
*/ */
/**
Rsiz Capabilities
*/
typedef enum RSIZ_CAPABILITIES {
STD_RSIZ = 0, /** Standard JPEG2000 profile*/
CINEMA2K = 3, /** Profile name for a 2K image*/
CINEMA4K = 4 /** Profile name for a 4K image*/
} OPJ_RSIZ_CAPABILITIES;
/** Progression order */ /**
Digital cinema operation mode
*/
typedef enum CINEMA_MODE {
OFF = 0, /** Not Digital Cine
ma*/
CINEMA2K_24 = 1, /** 2K Digital Cinema at 24 fps*/
CINEMA2K_48 = 2, /** 2K Digital Cinema at 48 fps*/
CINEMA4K_24 = 3 /** 4K Digital Cinema at 24 fps*/
}OPJ_CINEMA_MODE;
/**
Progression order
*/
typedef enum PROG_ORDER { typedef enum PROG_ORDER {
PROG_UNKNOWN = -1, /**< place-holder */ PROG_UNKNOWN = -1, /**< place-holder */
LRCP = 0, /**< layer-resolution-component-precinct ord er */ LRCP = 0, /**< layer-resolution-component-precinct ord er */
RLCP = 1, /**< resolution-layer-component-precinct ord er */ RLCP = 1, /**< resolution-layer-component-precinct ord er */
RPCL = 2, /**< resolution-precinct-component-layer ord er */ RPCL = 2, /**< resolution-precinct-component-layer ord er */
PCRL = 3, /**< precinct-component-resolution-layer ord er */ PCRL = 3, /**< precinct-component-resolution-layer ord er */
CPRL = 4 /**< component-precinct-resolution-layer ord er */ CPRL = 4 /**< component-precinct-resolution-layer ord er */
} OPJ_PROG_ORDER; } OPJ_PROG_ORDER;
/** /**
skipping to change at line 146 skipping to change at line 165
/** /**
Supported codec Supported codec
*/ */
typedef enum CODEC_FORMAT { typedef enum CODEC_FORMAT {
CODEC_UNKNOWN = -1, /**< place-holder */ CODEC_UNKNOWN = -1, /**< place-holder */
CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */ CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */
CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read onl y */ CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read onl y */
CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */ CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */
} OPJ_CODEC_FORMAT; } OPJ_CODEC_FORMAT;
/**
Limit decoding to certain portions of the codestream.
*/
typedef enum LIMIT_DECODING {
NO_LIMITATION = 0, /**< No limitation
for the decoding. The entire codestream will de decoded */
LIMIT_TO_MAIN_HEADER = 1, /**< The decoding is limited
to the Main Header */
DECODE_ALL_BUT_PACKETS = 2 /**< Decode everything except the JP
EG 2000 packets */
} OPJ_LIMIT_DECODING;
/* /*
========================================================== ==========================================================
event manager typedef definitions event manager typedef definitions
========================================================== ==========================================================
*/ */
/** /**
Callback function prototype for events Callback function prototype for events
@param msg Event message @param msg Event message
@param client_data @param client_data
skipping to change at line 187 skipping to change at line 215
/* /*
========================================================== ==========================================================
codec typedef definitions codec typedef definitions
========================================================== ==========================================================
*/ */
/** /**
Progression order changes Progression order changes
*/ */
typedef struct opj_poc { typedef struct opj_poc {
int resno0, compno0; /** Resolution num start, Component num start, given by POC */
int layno1, resno1, compno1; int resno0, compno0;
OPJ_PROG_ORDER prg; /** Layer num end,Resolution num end, Component num end, given by PO
int tile; C */
char progorder[4]; int layno1, resno1, compno1;
/** Layer num start,Precinct num start, Precinct num end */
int layno0, precno0, precno1;
/** Progression order enum*/
OPJ_PROG_ORDER prg1,prg;
/** Progression order string*/
char progorder[5];
/** Tile number */
int tile;
/** Start and end values for Tile width and height*/
int tx0,tx1,ty0,ty1;
/** Start value, initialised in pi_initialise_encode*/
int layS, resS, compS, prcS;
/** End value, initialised in pi_initialise_encode */
int layE, resE, compE, prcE;
/** Start and end values of Tile width and height, initialised in pi
_initialise_encode*/
int txS,txE,tyS,tyE,dx,dy;
/** Temporary values for Tile parts, initialised in pi_create_encode
*/
int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t;
} opj_poc_t; } opj_poc_t;
/** /**
Compression parameters Compression parameters
*/ */
typedef struct opj_cparameters { typedef struct opj_cparameters {
/** size of tile: tile_size_on = false (not in argument) or = true ( in argument) */ /** size of tile: tile_size_on = false (not in argument) or = true ( in argument) */
bool tile_size_on; bool tile_size_on;
/** XTOsiz */ /** XTOsiz */
int cp_tx0; int cp_tx0;
skipping to change at line 271 skipping to change at line 316
/** index file name */ /** index file name */
char index[OPJ_PATH_LEN]; char index[OPJ_PATH_LEN];
/** subimage encoding: origin image offset in x direction */ /** subimage encoding: origin image offset in x direction */
int image_offset_x0; int image_offset_x0;
/** subimage encoding: origin image offset in y direction */ /** subimage encoding: origin image offset in y direction */
int image_offset_y0; int image_offset_y0;
/** subsampling value for dx */ /** subsampling value for dx */
int subsampling_dx; int subsampling_dx;
/** subsampling value for dy */ /** subsampling value for dy */
int subsampling_dy; int subsampling_dy;
/** input file format 0: PGX, 1: PxM, 2: BMP */ /** input file format 0: PGX, 1: PxM, 2: BMP 3:TIF*/
int decod_format; int decod_format;
/** output file format 0: J2K, 1: JP2, 2: JPT */ /** output file format 0: J2K, 1: JP2, 2: JPT */
int cod_format; int cod_format;
/*@}*/ /*@}*/
/* UniPG>> */ /* UniPG>> */
#ifdef USE_JPWL
/**@name JPWL encoding parameters */ /**@name JPWL encoding parameters */
/*@{*/ /*@{*/
/** enables writing of EPC in MH, thus activating JPWL */ /** enables writing of EPC in MH, thus activating JPWL */
bool jpwl_epc_on; bool jpwl_epc_on;
/** error protection method for MH (0,1,16,32,37-128) */ /** error protection method for MH (0,1,16,32,37-128) */
int jpwl_hprot_MH; int jpwl_hprot_MH;
/** tile number of header protection specification (>=0) */ /** tile number of header protection specification (>=0) */
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS];
/** error protection methods for TPHs (0,1,16,32,37-128) */ /** error protection methods for TPHs (0,1,16,32,37-128) */
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]; int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS];
skipping to change at line 308 skipping to change at line 352
int jpwl_sens_addr; int jpwl_sens_addr;
/** sensitivity range (0-3) */ /** sensitivity range (0-3) */
int jpwl_sens_range; int jpwl_sens_range;
/** sensitivity method for MH (-1=no,0-7) */ /** sensitivity method for MH (-1=no,0-7) */
int jpwl_sens_MH; int jpwl_sens_MH;
/** tile number of sensitivity specification (>=0) */ /** tile number of sensitivity specification (>=0) */
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS];
/** sensitivity methods for TPHs (-1=no,0-7) */ /** sensitivity methods for TPHs (-1=no,0-7) */
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS];
/*@}*/ /*@}*/
#endif /* USE_JPWL */
/* <<UniPG */ /* <<UniPG */
/** Digital Cinema compliance 0-not compliant, 1-compliant*/
OPJ_CINEMA_MODE cp_cinema;
/** Maximum rate for each component. If == 0, component size limitat
ion is not considered */
int max_comp_size;
/** Profile name*/
OPJ_RSIZ_CAPABILITIES cp_rsiz;
/** Tile part generation*/
char tp_on;
/** Flag for Tile part generation*/
char tp_flag;
/** MCT (multiple component transform) */
char tcp_mct;
} opj_cparameters_t; } opj_cparameters_t;
/** /**
Decompression parameters Decompression parameters
*/ */
typedef struct opj_dparameters { typedef struct opj_dparameters {
/** /**
Set the number of highest resolution levels to be discarded. Set the number of highest resolution levels to be discarded.
The image resolution is effectively divided by 2 to the power of the number of discarded levels. The image resolution is effectively divided by 2 to the power of the number of discarded levels.
The reduce factor is limited by the smallest total number of decompo sition levels among tiles. The reduce factor is limited by the smallest total number of decompo sition levels among tiles.
skipping to change at line 346 skipping to change at line 401
char infile[OPJ_PATH_LEN]; char infile[OPJ_PATH_LEN];
/** output file name */ /** output file name */
char outfile[OPJ_PATH_LEN]; char outfile[OPJ_PATH_LEN];
/** input file format 0: J2K, 1: JP2, 2: JPT */ /** input file format 0: J2K, 1: JP2, 2: JPT */
int decod_format; int decod_format;
/** output file format 0: PGX, 1: PxM, 2: BMP */ /** output file format 0: PGX, 1: PxM, 2: BMP */
int cod_format; int cod_format;
/*@}*/ /*@}*/
/* UniPG>> */ /* UniPG>> */
#ifdef USE_JPWL
/**@name JPWL decoding parameters */ /**@name JPWL decoding parameters */
/*@{*/ /*@{*/
/** activates the JPWL correction capabilities */ /** activates the JPWL correction capabilities */
bool jpwl_correct; bool jpwl_correct;
/** expected number of components */ /** expected number of components */
bool jpwl_exp_comps; int jpwl_exp_comps;
/** maximum number of tiles */ /** maximum number of tiles */
bool jpwl_max_tiles; int jpwl_max_tiles;
/*@}*/ /*@}*/
#endif /* USE_JPWL */
/* <<UniPG */ /* <<UniPG */
/**
Specify whether the decoding should be done on the entire codestream
, or be limited to the main header
Limiting the decoding to the main header makes it possible to extrac
t the characteristics of the codestream
if == NO_LIMITATION, the entire codestream is decoded;
if == LIMIT_TO_MAIN_HEADER, only the main header is decoded;
*/
OPJ_LIMIT_DECODING cp_limit_decoding;
} opj_dparameters_t; } opj_dparameters_t;
/** Common fields between JPEG-2000 compression and decompression master st ructs. */ /** Common fields between JPEG-2000 compression and decompression master st ructs. */
#define opj_common_fields \ #define opj_common_fields \
opj_event_mgr_t *event_mgr; /**< pointer to the event manager */ \ opj_event_mgr_t *event_mgr; /**< pointer to the event manager */ \
void * client_data; /**< Available for use by ap plication */\ void * client_data; /**< Available for use by ap plication */\
bool is_decompressor; /**< So common code can tell which i s which */\ bool is_decompressor; /**< So common code can tell which i s which */\
OPJ_CODEC_FORMAT codec_format; /**< selected codec */\ OPJ_CODEC_FORMAT codec_format; /**< selected codec */\
void *j2k_handle; /**< pointer to the J2K code c */\ void *j2k_handle; /**< pointer to the J2K code c */\
void *jp2_handle /**< pointer to the JP2 code void *jp2_handle; /**< pointer to the JP2 code
c */ c */\
void *mj2_handle /**< pointer to the MJ2 code
c */
/* Routines that are to be used by both halves of the library are declared /* Routines that are to be used by both halves of the library are declared
* to receive a pointer to this structure. There are no actual instances o f * to receive a pointer to this structure. There are no actual instances o f
* opj_common_struct_t, only of opj_cinfo_t and opj_dinfo_t. * opj_common_struct_t, only of opj_cinfo_t and opj_dinfo_t.
*/ */
typedef struct opj_common_struct { typedef struct opj_common_struct {
opj_common_fields; /* Fields common to both master struct types */ opj_common_fields; /* Fields common to both master struct types */
/* Additional fields follow in an actual opj_cinfo_t or /* Additional fields follow in an actual opj_cinfo_t or
* opj_dinfo_t. All three structs must agree on these * opj_dinfo_t. All three structs must agree on these
* initial fields! (This would be a lot cleaner in C++.) * initial fields! (This would be a lot cleaner in C++.)
 End of changes. 18 change blocks. 
18 lines changed or deleted 92 lines changed or added


 opj_includes.h (1.1)   opj_includes.h (1.2) 
skipping to change at line 87 skipping to change at line 87
#include "image.h" #include "image.h"
#include "j2k.h" #include "j2k.h"
#include "jp2.h" #include "jp2.h"
#include "jpt.h" #include "jpt.h"
#include "mqc.h" #include "mqc.h"
#include "raw.h" #include "raw.h"
#include "bio.h" #include "bio.h"
#include "tgt.h" #include "tgt.h"
#include "pi.h"
#include "tcd.h" #include "tcd.h"
#include "t1.h" #include "t1.h"
#include "dwt.h" #include "dwt.h"
#include "pi.h"
#include "t2.h" #include "t2.h"
#include "mct.h" #include "mct.h"
#include "int.h" #include "int.h"
#include "fix.h" #include "fix.h"
/* JPWL>> */ /* JPWL>> */
#ifdef USE_JPWL #ifdef USE_JPWL
#include "../jpwl/jpwl.h" #include "../jpwl/jpwl.h"
#endif /* USE_JPWL */ #endif /* USE_JPWL */
/* <<JPWL */ /* <<JPWL */
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 pi.h (1.1)   pi.h (1.2) 
skipping to change at line 68 skipping to change at line 68
int dx, dy; int dx, dy;
/** number of resolution levels */ /** number of resolution levels */
int numresolutions; int numresolutions;
opj_pi_resolution_t *resolutions; opj_pi_resolution_t *resolutions;
} opj_pi_comp_t; } opj_pi_comp_t;
/** /**
Packet iterator Packet iterator
*/ */
typedef struct opj_pi_iterator { typedef struct opj_pi_iterator {
/** Enabling Tile part generation*/
char tp_on;
/** precise if the packet has been already used (usefull for progres sion order change) */ /** precise if the packet has been already used (usefull for progres sion order change) */
short int *include; short int *include;
/** layer step used to localize the packet in the include vector */ /** layer step used to localize the packet in the include vector */
int step_l; int step_l;
/** resolution step used to localize the packet in the include vecto r */ /** resolution step used to localize the packet in the include vecto r */
int step_r; int step_r;
/** component step used to localize the packet in the include vector */ /** component step used to localize the packet in the include vector */
int step_c; int step_c;
/** precinct step used to localize the packet in the include vector */ /** precinct step used to localize the packet in the include vector */
int step_p; int step_p;
skipping to change at line 90 skipping to change at line 92
/** resolution that identify the packet */ /** resolution that identify the packet */
int resno; int resno;
/** precinct that identify the packet */ /** precinct that identify the packet */
int precno; int precno;
/** layer that identify the packet */ /** layer that identify the packet */
int layno; int layno;
/** 0 if the first packet */ /** 0 if the first packet */
int first; int first;
/** progression order change information */ /** progression order change information */
opj_poc_t poc; opj_poc_t poc;
/** */ /** number of components in the image */
int numcomps; int numcomps;
/** */ /** Components*/
opj_pi_comp_t *comps; opj_pi_comp_t *comps;
int tx0, ty0, tx1, ty1; int tx0, ty0, tx1, ty1;
int x, y, dx, dy; int x, y, dx, dy;
} opj_pi_iterator_t; } opj_pi_iterator_t;
/** @name Exported functions */ /** @name Exported functions */
/*@{*/ /*@{*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/** /**
Create a packet iterator Create a packet iterator for Encoder
@param image Raw image for which the packets will be listed @param image Raw image for which the packets will be listed
@param cp Coding parameters @param cp Coding parameters
@param tileno Number that identifies the tile for which to list the packets @param tileno Number that identifies the tile for which to list the packets
@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass
@return Returns a packet iterator that points to the first packet of the ti le @return Returns a packet iterator that points to the first packet of the ti le
@see pi_destroy @see pi_destroy
*/ */
opj_pi_iterator_t *pi_create(opj_image_t * image, opj_cp_t * cp, int tileno opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, i
); nt tileno,J2K_T2_MODE t2_mode);
/**
Modify the packet iterator for enabling tile part generation
@param pi Handle to the packet iterator generated in pi_initialise_encode
@param cp Coding parameters
@param tileno Number that identifies the tile for which to list the packets
@param tpnum Tile part number of the current tile
@param tppos The position of the tile part flag in the progression order
*/
void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int
pino,int tpnum, int tppos);
/**
Create a packet iterator for Decoder
@param image Raw image for which the packets will be listed
@param cp Coding parameters
@param tileno Number that identifies the tile for which to list the packets
@return Returns a packet iterator that points to the first packet of the ti
le
@see pi_destroy
*/
opj_pi_iterator_t *pi_create_decode(opj_image_t * image, opj_cp_t * cp, int
tileno);
/** /**
Destroy a packet iterator Destroy a packet iterator
@param pi Previously created packet iterator @param pi Previously created packet iterator
@param cp Coding parameters @param cp Coding parameters
@param tileno Number that identifies the tile for which the packets were li sted @param tileno Number that identifies the tile for which the packets were li sted
@see pi_create @see pi_create
*/ */
void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno); void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno);
 End of changes. 6 change blocks. 
5 lines changed or deleted 29 lines changed or added


 t1.h (1.1)   t1.h (1.2) 
skipping to change at line 47 skipping to change at line 47
The functions in T1.C have for goal to realize the tier-1 coding operation. The functions The functions in T1.C have for goal to realize the tier-1 coding operation. The functions
in T1.C are used by some function in TCD.C. in T1.C are used by some function in TCD.C.
*/ */
/** @defgroup T1 T1 - Implementation of the tier-1 coding */ /** @defgroup T1 T1 - Implementation of the tier-1 coding */
/*@{*/ /*@{*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
#define T1_NMSEDEC_BITS 7 #define T1_NMSEDEC_BITS 7
#define T1_MAXCBLKW 1024 /**< Maximum size of code-block (width) */
#define T1_MAXCBLKH 1024 /**< Maximum size of code-block (heigth) */
#define T1_SIG_NE 0x0001 /**< Context orientation : North-East direct ion */ #define T1_SIG_NE 0x0001 /**< Context orientation : North-East direct ion */
#define T1_SIG_SE 0x0002 /**< Context orientation : South-East direct ion */ #define T1_SIG_SE 0x0002 /**< Context orientation : South-East direct ion */
#define T1_SIG_SW 0x0004 /**< Context orientation : South-West direct ion */ #define T1_SIG_SW 0x0004 /**< Context orientation : South-West direct ion */
#define T1_SIG_NW 0x0008 /**< Context orientation : North-West direct ion */ #define T1_SIG_NW 0x0008 /**< Context orientation : North-West direct ion */
#define T1_SIG_N 0x0010 /**< Context orientation : North dir ection */ #define T1_SIG_N 0x0010 /**< Context orientation : North dir ection */
#define T1_SIG_E 0x0020 /**< Context orientation : East dire ction */ #define T1_SIG_E 0x0020 /**< Context orientation : East dire ction */
#define T1_SIG_S 0x0040 /**< Context orientation : South dir ection */ #define T1_SIG_S 0x0040 /**< Context orientation : South dir ection */
#define T1_SIG_W 0x0080 /**< Context orientation : West dire ction */ #define T1_SIG_W 0x0080 /**< Context orientation : West dire ction */
#define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_S W|T1_SIG_W|T1_SIG_NW) #define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_S W|T1_SIG_W|T1_SIG_NW)
#define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W) #define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W)
skipping to change at line 91 skipping to change at line 88
#define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG) #define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG)
#define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI) #define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI)
#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1) #define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1)
#define T1_TYPE_MQ 0 /**< Normal coding using entropy coder */ #define T1_TYPE_MQ 0 /**< Normal coding using entropy coder */
#define T1_TYPE_RAW 1 /**< No encoding the information is store under raw format in codestream (mode switch RAW)*/ #define T1_TYPE_RAW 1 /**< No encoding the information is store under raw format in codestream (mode switch RAW)*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
typedef short flag_t;
/** /**
Tier-1 coding (coding of code-block coefficients) Tier-1 coding (coding of code-block coefficients)
*/ */
typedef struct opj_t1 { typedef struct opj_t1 {
/** codec context */ /** codec context */
opj_common_ptr cinfo; opj_common_ptr cinfo;
/** MQC component */ /** MQC component */
opj_mqc_t *mqc; opj_mqc_t *mqc;
/** RAW component */ /** RAW component */
opj_raw_t *raw; opj_raw_t *raw;
int lut_ctxno_zc[1024]; int *data;
int lut_ctxno_sc[256]; flag_t *flags;
int lut_ctxno_mag[4096]; int w;
int lut_spb[256]; int h;
int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS]; int datasize;
int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS]; int flagssize;
int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS]; int flags_stride;
int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS];
int data[T1_MAXCBLKH][T1_MAXCBLKW];
int flags[T1_MAXCBLKH + 2][T1_MAXCBLKH + 2];
} opj_t1_t; } opj_t1_t;
#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)]
/** @name Exported functions */ /** @name Exported functions */
/*@{*/ /*@{*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/** /**
Create a new T1 handle Create a new T1 handle
and initialize the look-up tables of the Tier-1 coder/decoder and initialize the look-up tables of the Tier-1 coder/decoder
@return Returns a new T1 handle if successful, returns NULL otherwise @return Returns a new T1 handle if successful, returns NULL otherwise
@see t1_init_luts @see t1_init_luts
*/ */
opj_t1_t* t1_create(opj_common_ptr cinfo); opj_t1_t* t1_create(opj_common_ptr cinfo);
 End of changes. 4 change blocks. 
15 lines changed or deleted 11 lines changed or added


 t2.h (1.1)   t2.h (1.2) 
skipping to change at line 68 skipping to change at line 68
/** /**
Encode the packets of a tile to a destination buffer Encode the packets of a tile to a destination buffer
@param t2 T2 handle @param t2 T2 handle
@param tileno number of the tile encoded @param tileno number of the tile encoded
@param tile the tile for which to write the packets @param tile the tile for which to write the packets
@param maxlayers maximum number of layers @param maxlayers maximum number of layers
@param dest the destination buffer @param dest the destination buffer
@param len the length of the destination buffer @param len the length of the destination buffer
@param image_info structure to create an index file @param image_info structure to create an index file
@param tpnum Tile part number of the current tile
@param tppos The position of the tile part flag in the progression order
@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass
*/ */
int t2_encode_packets(opj_t2_t* t2, int tileno, opj_tcd_tile_t *tile, int m int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int ma
axlayers, unsigned char *dest, int len, opj_image_info_t *image_info); xlayers, unsigned char *dest, int len, opj_image_info_t *image_info,int tpn
um, int tppos,int pino,J2K_T2_MODE t2_mode);
/** /**
Decode the packets of a tile from a source buffer Decode the packets of a tile from a source buffer
@param t2 T2 handle @param t2 T2 handle
@param src the source buffer @param src the source buffer
@param len length of the source buffer @param len length of the source buffer
@param tileno number that identifies the tile for which to decode the packe ts @param tileno number that identifies the tile for which to decode the packe ts
@param tile tile for which to decode the packets @param tile tile for which to decode the packets
*/ */
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno , opj_tcd_tile_t *tile); int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno , opj_tcd_tile_t *tile);
 End of changes. 2 change blocks. 
3 lines changed or deleted 6 lines changed or added


 tcd.h (1.1)   tcd.h (1.2) 
skipping to change at line 161 skipping to change at line 161
*/ */
typedef struct opj_tcd_image { typedef struct opj_tcd_image {
int tw, th; /* number of tiles in width and heigth */ int tw, th; /* number of tiles in width and heigth */
opj_tcd_tile_t *tiles; /* Tiles information */ opj_tcd_tile_t *tiles; /* Tiles information */
} opj_tcd_image_t; } opj_tcd_image_t;
/** /**
Tile coder/decoder Tile coder/decoder
*/ */
typedef struct opj_tcd { typedef struct opj_tcd {
/** Position of the tilepart flag in Progression order*/
int tp_pos;
/** Tile part number*/
int tp_num;
/** Current tile part number*/
int cur_tp_num;
/** Total number of tileparts of the current tile*/
int cur_totnum_tp;
/** Current Packet iterator number */
int cur_pino;
/** codec context */ /** codec context */
opj_common_ptr cinfo; opj_common_ptr cinfo;
/** info on each image tile */ /** info on each image tile */
opj_tcd_image_t *tcd_image; opj_tcd_image_t *tcd_image;
/** image */ /** image */
opj_image_t *image; opj_image_t *image;
/** coding parameters */ /** coding parameters */
opj_cp_t *cp; opj_cp_t *cp;
/** pointer to the current encoded/decoded tile */ /** pointer to the current encoded/decoded tile */
opj_tcd_tile_t *tcd_tile; opj_tcd_tile_t *tcd_tile;
/** coding/decoding parameters common to all tiles */ /** coding/decoding parameters common to all tiles */
opj_tcp_t *tcp; opj_tcp_t *tcp;
/** current encoded/decoded tile */ /** current encoded/decoded tile */
int tcd_tileno; int tcd_tileno;
/** Time taken to encode a tile*/
double encoding_time;
} opj_tcd_t; } opj_tcd_t;
/** @name Exported functions */ /** @name Exported functions */
/*@{*/ /*@{*/
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/** /**
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); void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img);
 End of changes. 2 change blocks. 
0 lines changed or deleted 12 lines changed or added

This html diff was produced by rfcdiff 1.41.The latest version is available from http://tools.ietf.org/tools/rfcdiff/