Mercurial Repository Public Repository

libopenjpeg-dev

URLs

Copy to Clipboard

Changeset 4e7218730b9cea30088d4229b7975693be5b320a

Committed by bjm128 on Thu 14 Nov, 2013 22:35:10 +0000

Commit Message:

Commit of some changes and some general code tidy-ups:

  • /CMakelists.txt: added -g and -pg flags as well as enalbed option to build
codecs.
  • /codec/convert.c: Changed TGA image reader to use stdint data types, removed
some assigned but unused variables and cleaned up some data parameter definitions in functions tga_readheader, tgatoimage and imagetopnm.
  • /codec/image_to_j2k.c: #define’d __USE_BSD to get strncasecmp.
cinema_setup_encoder(): Disabled unused declaration POC and added default case to switch statement to get rid of compiler warnings. parse_cmdline_encoder(): 904: Corrected sscanf format string argument from char ** to char *.
  • /codec/index.c:
write_index_file(): 82: corrected fprintf format specification
  • /codec/j2k_to_image.c: #define’d __USE_BSD to get strncasecmp.
  • /indexer_JPIP/int.c: Added FIXME about int_abs() and int_ceildiv(). Should these
be based more strongly on libary functions like abs() and div()?
  • /jp3d/libjp3dvm/jp3d_lib.h: Added attribute((malloc)) to opj_malloc()
declaration.
  • /jp3d/libjp3dvm/tcd.c:
tcd_create() 136: Changed NULL pointer test. tcd_create() 139: Changed tcd_volume struct pointer to point to a statically allocated point at end of array. Dynamically allocating it appeared unnecessary. tcd_destroy(): Modified destroy function to take into account whether the tcd_volume pointer actually needs to be freed or not. opj_cio_open() 61,62: Removed some type casts and cleaned up some data type handling.

/libopenjpeg/CMakeLists.txt: Added opj_malloc.c to source code list

/libopenjpeg/event.c:
opj_event_msg(): Removed some unused variables.

/libopenjpeg/opj_malloc.h: Changed definitions of opj_malloc, opj_calloc and
friends to full function declarations.

/libopenjpeg/opj_malloc.c: Added this file as a companion to opj_malloc.h.
Contains new definitions of opj_malloc and friends written as 'proper'
functions.

/libopenjpeg/openjpeg.h:
* Removed macro declaration of structs (we repeat the information but keeping it
consistent should not be too annoying here).
* Added preprocessor macro PROGORDER_LEN to define the size of the progorder
string in opj_poc_t data type.
* Line 596: corrected minor typo in comment.

/libopenjpeg/tcd.c:
* Added assert with bytes of 1 << 29 (512MB). THIS IS FOR DEBUGGING PURPOSES
ONLY!!!! It should not be necessary in a release version.
* All of the bytes and bytes_total stuff is for debugging purposes only. This
needs to be removed for release.
* tcd_create(): Cleanup of opj_malloc invocation to allocate tcd and tcd_image.
tcd_image is now a pointer to a static structure in the opj_tcd_image_t as
opposed to being dynamically allocated in itself.
* tcd_destroy(): Modified the deallocator so that it doesn’t try to free the
image data if it is not dynamically allocated itself.

/libopenjpeg/tcd.h:
* Added static struct tcd_image_data to eliminate the malloc calls.

/libs/libtiff/tiff.h:
* Got rid of macros for defining int8, int16 and friends and based them on
stdint.h instead.

/mj2/mj2.c:
* Tidied up some malloc calls, using sizeof the data itself rather than the size
of its type. Changed some pointers from unsigned char to char (cf src in
mj2_read_struct().)

/mj2/wrap_j2k_in_mj2.c:
* Added some macros for calculating BUF_SIZE and moov box length. Also tidied
up some malloc calls (cf. buf in main()).

Changes