Commit Graph

196 Commits

Author SHA1 Message Date
Francois-Olivier Devaux 26606c71c8 First import of JAVAOpenJPEG, a Java wrapper of OpenJPEG, developed by Patrick Piscaglia of Telemis (www.telemis.com). Thank you Patrick for this new module ! 2007-12-10 13:16:01 +00:00
Giuseppe Baruffa e06bcd027f Added index.h and index.c in VC6 projects; wrapped index.h in the C++ preprocessor; modified OPJViewer project and some files. 2007-11-29 14:38:26 +00:00
Francois-Olivier Devaux 9e5d165e79 Fixed the maximum number of resolutions a user can discard while decoding.
Added an error state in J2K_STATE (j2k.c)
2007-11-27 14:00:45 +00:00
Francois-Olivier Devaux efa5f7977c Created the file index.c in the codec directory. This file handles the creation of index files, at encoding and decoding.
Fixed bugs during the creation of the index (PCRL progression order)
2007-11-27 12:38:52 +00:00
Francois-Olivier Devaux c458af9cd6 Avoided ABI breakage 2007-11-14 11:34:48 +00:00
Francois-Olivier Devaux 010ae27471 Patch by Callum Lerwick. The opj_tcd_cblk array is one of the largest allocations, because it contains a bunch of static buffers. This also makes it a major source of cache thrashing. This patch allocates the buffers from the heap, and dynamically sizes them in the decoder. I have not yet managed to dynamically size them in the encoder, getting the decoder to do it was tricky enough... I also split opj_tcd_cblk_t into separate encode and decode versions. A lot of fields were not used by both, so this cuts its size even further. 2007-11-14 10:52:02 +00:00
Francois-Olivier Devaux 24e189e4d8 Patch by Callum Lerwick. This patch rearranges the largest memory allocations so they're allocated as late as possible, and freed as soon as possible. This cuts memory usage by about half on two large test images. 2007-11-14 08:45:00 +00:00
Francois-Olivier Devaux 61a15672bb Patch by Callum Lerwick. Instead of reinventing realloc, j2k_read_sod now just uses opj_realloc in j2k.c 2007-11-14 08:29:12 +00:00
Francois-Olivier Devaux dbeebe72b9 Patch by Dzonatas and Callum Lerwick. Fp/vectorization patch which basically converts most of the irreversible decode codepath to floating point, eliminating a few rounds of int/fp conversion, resulting in a vast performance improvement, and an increase in accuracy. 2007-11-13 17:35:12 +00:00
Francois-Olivier Devaux 4bb067642f Patches from Callum Lewick: Fixed some spelling errors in dwt.c. 2007-11-08 14:29:39 +00:00
Francois-Olivier Devaux c38de0728d In t1.c, small change to avoid calling twice t1_getwmsedec()
Patch from Callum Lewick. Basic gcc optimization flags in cmake and makefile match.
2007-11-08 14:26:03 +00:00
Giuseppe Baruffa 95d760a173 Fixed a bug which prevented JPWL from working on multi-tiled images; added some more fields in the interface info structures (keep a list of markers, save start packet number for each tile) 2007-11-05 13:05:07 +00:00
Giuseppe Baruffa 123a680669 Improved success for the linux build; OPJViewer shows all the COM contents 2007-10-23 14:33:40 +00:00
Francois-Olivier Devaux 9e114bcaa4 Patch from Callum Lewick. Memset patch. See ChangeLog for more details. Thanks Callum ! 2007-10-18 12:26:11 +00:00
Francois-Olivier Devaux 5fdc05d18d Changed the ROI parameter in the image_to_j2k codec to make it correspond to the documentation (i.e. -ROI c=0,U=25) 2007-10-18 08:14:43 +00:00
Francois-Olivier Devaux 1f11a4fe90 Changed the way the image structure is allocated when the decoding parameters include some resolutions to discard. This should have a significant impact for the decoding of huge images when some resolutions are discarder (-r parameter)
Warning: The output image size is now reduced when discarding resolutions !
2007-10-12 15:04:34 +00:00
Francois-Olivier Devaux ab0473aa42 *Patch from Callum Lewick. Clean up of j2klib.h for the aligned malloc stuff.
*convert.c: Changed some error comments for TIFF images
2007-10-10 06:17:28 +00:00
Francois-Olivier Devaux 4b60f17bba Patch from Callum Lewick. Fixed dwt.c where an alignment in buffer was problematic under x86_64. 2007-09-27 12:20:12 +00:00
Mathieu Malaterre 6265dcfb11 BUG: Fix previous patch from Callum Lerwick. I have no clue what CMAKE_INSTALL_LIBDIR refers too. Bump up cmake 2.2 restriction to cmake 2.4 because of previous patch not backward compatible. Properly set the SOVERSION in a cross plateform way (yes WIN32 is a plateform) 2007-09-25 14:54:49 +00:00
Parvatha Elangovan 7e40a9475a Fixed issues with generation of SOP marker. 2007-09-19 14:56:19 +00:00
Parvatha Elangovan a6ba04cdf4 Fixed issues with Reading and Writing TIF images in convert.c to avoid segmentation fault.
Fixed issues relating to using user specified rates for CINEMA option for multiple images.
2007-09-18 13:07:29 +00:00
Francois-Olivier Devaux 55c4c14352 OpenJPEG library interface modified to retain compatibility with version 1.2. Sorry if some of you already adapted their code to the previous interface, but we want to avoid a ABI break.... 2007-09-17 15:11:20 +00:00
Francois-Olivier Devaux 569bbb0077 Fixed issues with cstr_info when codestream has components with different number of resolutions. 2007-09-17 14:00:43 +00:00
Francois-Olivier Devaux abfba20b99 Patch from Callum Lerwick. Fixed the library linking so it links with the soversion properly set. Fixes up the install targets so that it interacts properly with RPM. Install target for MJ2. Sets some necessary and useful CFLAGS if gcc is in use. 2007-09-12 09:04:03 +00:00
Francois-Olivier Devaux 09231c317d Updated the MJ2 codec to be compatible with the recent changes in the OpenJPEG library. 2007-09-12 08:52:18 +00:00
Giuseppe Baruffa 1e705438e4 JPWL encoding is finalized correctly into the JP2 file format; added an additional structure in opj_codestream_info, to keep a record of the written markers 2007-09-11 15:21:12 +00:00
Giuseppe Baruffa d70a0415b9 Adapted the JPWL and OPJViewer code to new interface; fixed a samll bug in JPWL which created large EPBs even when null protection was specified 2007-09-07 23:16:31 +00:00
Francois-Olivier Devaux 3816e0edf4 Indexes can now be generated when decoding J2K codestreams. 2007-09-07 15:01:55 +00:00
Mathieu Malaterre b29cff9b9c ENH: Add cmake code to do testing if user has properly setup a testimages directory 2007-09-07 13:21:17 +00:00
Mathieu Malaterre 2479921c71 ENH: Upon failure, properly return error code (!=0) 2007-09-07 13:06:36 +00:00
Mathieu Malaterre 53471a76f1 ENH: Fix unitialized read in img_fol (we may need a smarter initialize than memset) 2007-09-06 16:49:15 +00:00
Mathieu Malaterre 8ac5e7023c ENH: Add very simple tests (simply run command line with no option) 2007-09-06 16:38:06 +00:00
Giuseppe Baruffa dfcacb8247 One more field in the codestream_info struct for recording the number of packets per tile part; JPWL now distributes the EPBs in all the tile part headers 2007-09-06 15:59:39 +00:00
Mathieu Malaterre cf95a80be6 ENH: Add CMake/doxygen output 2007-09-06 15:10:15 +00:00
Mathieu Malaterre be5db9489e ENH: add Java j2kviewer but do not compile it using cmake since cmake has too poor support for Java. Should create a custom command running ant instead. 2007-09-06 14:56:23 +00:00
Mathieu Malaterre 375754f1e6 ENH: CMake: start compiling index_create. OpenJPEG.rc update copyright year 2007-09-06 14:46:24 +00:00
Mathieu Malaterre 86da5c2589 ENH: CMake: output all executable/libs into one single directory 2007-09-06 11:01:00 +00:00
Mathieu Malaterre 23891ede86 ENH: update changelog 2007-09-06 10:53:41 +00:00
Giuseppe Baruffa d3d2a36fbc Added some fields in the codestream_info structure: they are used to record the position of single tile parts. Changed also the write_index function in the codec, to reflect the presence of this new information. 2007-09-04 14:19:55 +00:00
Giuseppe Baruffa 564e16d5ce Added the knowledge of JPSEC SEC and INSEC markers (you have to compile the JPWL project). Management of these markers is limited to skipping them without crashing: no real security function at this stage. Deprecated USE_JPSEC and USE_JPWL will be removed next 2007-09-03 13:30:59 +00:00
Giuseppe Baruffa c4313f0b39 Fixed save capabilities in OPJViewer due to recent code upgrade 2007-08-31 10:55:15 +00:00
Francois-Olivier Devaux 7a2d96efe1 Added information regarding the end of packet position in the index 2007-08-30 15:32:51 +00:00
Francois-Olivier Devaux acfe0ad645 Changed the OpenJPEG library interface to enable users to access information regarding the codestream (also called index). 2007-08-30 09:51:20 +00:00
Francois-Olivier Devaux d07fa5d9d0 Fixed wrong destructors called in openjpeg.c
Fixed bug in j2k_decode_jpt_stream
2007-08-28 10:13:58 +00:00
Parvatha Elangovan c101f8049c The end of main header is calculated after TLM and POC marker for Dcinema. 2007-08-24 15:11:01 +00:00
Francois-Olivier Devaux 07be749bf2 Moved the orient flipping into the ctxno_zc table.
Thanks to Callum Lerwick who provided all these great patches !
2007-08-21 12:51:57 +00:00
Francois-Olivier Devaux 2952874cb8 Replaced the large ctxno_mag lookup table with a small bit of inline-able branchless code 2007-08-21 12:42:55 +00:00
Francois-Olivier Devaux 1cfbdcc9ce Consolidated some calls to mqc_setcurctx. Cleaned up t1_generate_luts to output the proper types. 2007-08-21 12:36:05 +00:00
Francois-Olivier Devaux d4d23c7eb5 Reworks of t1_updateflags to get rid of the shift operation. mqc_setcurctx moved to the header to allow it to be inlined into the t1. 2007-08-21 12:30:08 +00:00
Francois-Olivier Devaux adca52578d Memory leaks fixed 2007-08-21 12:21:35 +00:00
Francois-Olivier Devaux 3810e943b1 Aligned malloc using Intel's _mm_malloc(), cleanup on the t1 memory allocation, getting rid of some leftover debug code 2007-08-21 12:13:54 +00:00
Francois-Olivier Devaux ca2a0114a2 Minor cleanup patch, that gets rid of a bunch of "old style declaration" warnings from Intel's compiler 2007-08-21 12:02:23 +00:00
Francois-Olivier Devaux 2c75c27ee8 Solved problems with codec reading from image file directory when filename had more than one "." in name 2007-08-21 10:50:47 +00:00
Francois-Olivier Devaux d9924962ff Added support for Visual Studio 2005 2007-08-21 10:17:35 +00:00
Francois-Olivier Devaux 8298fd2b0a Added support for the TGA file format in the codec 2007-08-20 15:20:42 +00:00
Francois-Olivier Devaux 7dcb817e6a Fixed the DCinema filesize allocation. It now includes the SOT marker size 2007-08-08 09:41:16 +00:00
Giuseppe Baruffa 9cf692e897 Added a basic saving capability to OPJViewer 2007-08-02 12:45:28 +00:00
Francois-Olivier Devaux c45b8e6c38 Updated libtiff library version to 3.8.2 (for WIN32)
Updated BMP and PxM truncation when decoding J2K files with more than 8 bits (convert.c)
2007-07-19 13:44:04 +00:00
Francois-Olivier Devaux 64d72b7bfd Fixed raw option to encode raw images with more than three components. 2007-07-18 09:45:59 +00:00
Francois-Olivier Devaux b7ce19709d Added support for RAW images. This module has been developped by the University of Perugia team. Thanks to them ! 2007-07-17 16:19:41 +00:00
Francois-Olivier Devaux 5dec8bbbe9 2007-07-13 13:07:07 +00:00
Giuseppe Baruffa 4a50efe542 Fixed a bug in JPWL module, which prevented to exploit the full error correction capability of RS codes (e.g. it gave up at 5 errors, even if 6 were correctable); defined a JPWL_MAXIMUM_EPB_ROOM for better customization of the maximum dimension of EPBs (the dimension is pre-calculated on an hypothesis, if it goes beyond 65535 there will be problems, thus we give a little less than the max, let's say 65450) 2007-07-12 08:31:01 +00:00
Antonin Descampe bdb18ab19c fixed the size of the memory allocation in cio.c (confusion between bits and bytes) 2007-07-08 16:38:51 +00:00
Giuseppe Baruffa 167fb6337b Previous, home, and next frame buttons for exploring MJ2 files in OPJViewer 2007-06-21 14:00:32 +00:00
Francois-Olivier Devaux c924975434 Output image color space set when decoding a JP2 file 2007-06-21 08:26:03 +00:00
Giuseppe Baruffa 92398409a5 Reload image doesn't crash in OPJViewer; more settings saved to registry 2007-06-18 13:05:28 +00:00
Giuseppe Baruffa 2845d9bf64 Possibility to disable parsing in OPJViewer; also, saves common settings to the registry; automatic build numbering 2007-06-16 17:28:47 +00:00
Francois-Olivier Devaux 3d626da232 Fixed the generation of index files. Now works with cinema formats. 2007-06-15 13:27:43 +00:00
Francois-Olivier Devaux 21f2cab710 Release of version 1.2.0 2007-06-04 13:27:25 +00:00
Francois-Olivier Devaux ea9335ff48 Bugs corrected in decoding of command line (getopt.c), in the handling of 16 bit files (t1.c and tcd.c) and the calculation of elapsed time for multiple tiles parts (tcd.c and tdc.h). 2007-06-04 13:23:26 +00:00
Giuseppe Baruffa adc1aacb60 OPJViewer opens now BMP, PNG, GIF, PNM, TIFF (with wxWidgets internals); added an encoder settings tab, for future integration with "save file as..." in JPEG 2000 format 2007-06-03 17:34:46 +00:00
Francois-Olivier Devaux 814bab6900 Fixed the handling of 16bit TIFF files for cinema compression. Modified "convert.c".
Fixed the parameters used for cinema compression (9-7 transform used instead of 5-3). Modified "image_to_j2k.c"
2007-05-31 09:13:44 +00:00
Francois-Olivier Devaux 0afa3c70bc Changlog updated 2007-05-15 14:02:03 +00:00
Mathieu Malaterre 848214e789 ENH: add basic instructions for cmake 2007-04-26 09:09:29 +00:00
Francois-Olivier Devaux 2bd0f7b8c4 Modification of the openjpeg.h file to avoid and ABI break with v1.1, removed the dangerous #IFDEF JPWL and added tcp_mct in cparameters. 2007-04-25 17:04:21 +00:00
Giuseppe Baruffa fbc9a5edcb enable/disable decoding in OPJViewer 2007-04-22 22:41:01 +00:00
Parvatha Elangovan 110b54c7c6 Fixed Error in tiftoimage(). Modification in convert.c. 2007-04-12 10:01:48 +00:00
Parvatha Elangovan dbd132dca8 Accepting "j2c" as format for Encoding and Decoding. Modification in image_to_j2k.c.
Modified imagetotif() to read images with signed data. Modification in convert.c.
2007-04-10 16:23:48 +00:00
Francois-Olivier Devaux 0930d9886b fix.h, dwt.c and t1.c optimized. Thanks a lot to Dzonatas <dzonatas at dzonux.net> and Callum Lerwick <seg at haxxed.com> for these great patches ! 2007-04-05 14:24:19 +00:00
Parvatha Elangovan dd18811600 Digital cinema compliance for 4K chosen by "-cinema4K" option. Modification in image_to_j2k.c.
Bit rate limitation for each color component. Modification in image_to_j2k.c, t2.c.
Modified and tested Progression order change "-POC" option. Modification in image_to_j2k.c, j2k.c, pi.c.
Function j2k_check_poc_val() to check for possible loss of packets in case of wrong POC declaration. Modification in j2k.c.
Structure T2_MODE. This tells if the t2_encode_packets() is called during Threshold calculation or in Final pass. Modification in j2k.h, tcd.c
2007-04-04 13:40:32 +00:00
Giuseppe Baruffa 7dd3a5bf22 OPJViewer should now work under Linux, at least with not big j2k files. Tested under Suse 10.1 64 bit. 2007-03-30 09:27:08 +00:00
Parvatha Elangovan 9ba672366e Enable accepting file names with `-´ symbol .Modification getopt.c
Rsiz profile name generation to be STD_RSIZ for profiles which are not DCI compliant.Modification in image_to_j2k.c
Renamed convert_progression_order to j2k_convert_progression_order. Modification j2k.c
Calculation of number of tile part in each tile in j2k_calculate_tp. Modification j2k.c
j2k_setup_encoder to set bit rate limitation for digital cinema compliance with quality option. Modification in j2k.c
Equation to check multiple tile precincts. Modification pi.c
array size generation of pi->include in pi_initialise_encode().Modification in pi.c
Modification in pi_create_encode for tile part generation.Modification in pi.c
In tcd_rateallocate a variable stable_threshold which holds the valid threshold value. This is used to avoid error in case of a wrong threshold value in the last iteration. Modification in tcd.c.
2007-03-29 14:15:14 +00:00
Francois-Olivier Devaux 5a3c1ffe7d Fixed an historical bug in t1.c that leaded to the inclusion of useless 0xFF in the codestream. Thanks to Sylvain, Pascal and Parvatha ! 2007-03-28 08:44:21 +00:00
Giuseppe Baruffa 144e1ff4e6 Following to Hervé's suggestions, all the exit() calls, added by JPWL strict checking in t2.c and j2k.c, have been substituted with (object free'ing + opj_evt_message(EVT_ERROR) + return); added linking to TIFF library in the JPWL VC6 workspaces 2007-03-27 17:18:56 +00:00
Giuseppe Baruffa 3f36196dfd Improved parsing in OPJViewer, as well some aesthetic modifications; support for image rendering with bit depths lower than 8 bits; can display an arbitrary frame of an MJ2 file (only in B/W, though); can reload a file; better image resizing capabilities 2007-03-27 12:48:17 +00:00
Antonin Descampe f7c9b01800 Fixed Makefile.osx and changed Readme.osx accordingly 2007-03-23 14:08:15 +00:00
Parvatha Elangovan 6045158ce6 Fixed j2k_prog_order_list[]. Modifications in j2k.c.
Fixed t1_decode_cblks. Modifications in t1.c.
2007-03-21 13:01:15 +00:00
Parvatha Elangovan 694a173adb Added feature for generation of tile parts. Modifications in image_to_j2k.c, openjpeg.c, j2k.c, pi.c
Added function j2k_write_tlm(),to generate TLM marker for a Digital cinema compliant codestream. Modifications in j2k.c.
2007-03-20 17:15:18 +00:00
Francois-Olivier Devaux 8bc6da2ffa Fixed linux makefile, with help from David Fries and Guido 2007-03-14 07:35:54 +00:00
Parvatha Elangovan 78003a016a Added option for Digital cinema profile compliant codestream. This can be chosen by "-cinema2K" or "-cinema4K" for a 2K and 4K compliance respectively. The feature for tileparts has not been implemented in this version. Modification in image_to_j2k.c
Added the Digital Cinema profiles (CINEMA2K and CINEMA4K) to the list of profiles recognized in the codestream SIZ marker segment. Modification in openjpeg.h,j2k.c
Added feature for constant quality within bitrate defined in Digital cinema standards. Modification in tcd.c
Modified the method of generation of buffer length. Modification in cio.c
2007-03-07 16:04:33 +00:00
Francois-Olivier Devaux 9e5d0b1a40 Modified codec projects (*.dsp) and makefile to include the tiff library (modified codec/image_to_j2k.dsp codec/j2k_to_image.dsp and codec/makefile) 2007-03-01 16:12:17 +00:00
Giuseppe Baruffa ba423fe3d0 Zoom capability and decoder settings dialog in OPJViewer 2007-03-01 00:01:37 +00:00
Parvatha Elangovan 192e46c32f Enabled compression of TIF image format to j2k by tifftoimage() and decompression of codestream to TIF image format using imagetotif(). Modifications in image_to_j2k.c, j2k_to_image.c, convert.c, convert.h 2007-02-28 15:31:56 +00:00
Antonin Descampe e5c5d1064e fixed a bug in context numerotation that prevented the RESET switch to work correctly : mqc_reset_enc in mqc.c 2007-02-28 14:27:20 +00:00
Francois-Olivier Devaux 2fb6da8d85 Corrected codec Makefile by adding the compilation of "compat/getopt.c" 2007-02-28 13:56:06 +00:00
Parvatha Elangovan fd680a1cf0 Made get_file_format function more robust. Modifications in image_to_j2k.c, j2k_to_image.c, getopt.c, getopt.h 2007-02-27 14:19:09 +00:00
Parvatha Elangovan 0781b7d441 Option to read images from a Folder whose path is specified in the Input parameters by "-ImgDir" along with output decod format specified by "-OutFor" . Modifications in image_to_j2k.c, j2k_to_image.c, getopt.c, getopt.h
Enabling use of multi character input parameters in the codec. Modifications in image_to_j2k.c, j2k_to_image.c, getopt.c, getopt.h
2007-02-26 15:40:01 +00:00
Giuseppe Baruffa e6ce7958f2 Added makefile for linux build of JPWL module; added newlines at the end of JPWL files 2007-02-23 18:24:49 +00:00
Francois-Olivier Devaux d268ea7d6a Changed version number from 1.1.0 to 1.1.1 in openjpeg.h 2007-02-23 10:48:11 +00:00
Giuseppe Baruffa 8a75823eea Fixed a copy-and-paste type assignment error (bool instead of int) in the JPWL section of decoder parameters structure in openjpeg.h; minor type-casting in jpwl_lib.c. As a result, now OPJViewer should run correctly when built against the most current SVN trunk of LibOpenJPEG.lib 2007-02-23 01:23:05 +00:00