24
edits
m (Created page with "== June 14th - Initial clone of libjpeg == My starting point is a copy of the libjpeg library. Thus far, the following have been stripped out: * Makefiles of the form "makefile...") |
mNo edit summary |
||
| Line 1: | Line 1: | ||
== June 15th - Parsing outline == | |||
First goal is to just parse an XR header correctly. This involves (adapted from libjpeg): | |||
# Allocating and initialising decompression object. | |||
# Assigning an error manager. | |||
# Specifying a source. | |||
# Reading the header. | |||
# Verifying header was parsed correctly. | |||
# Aborting compression. | |||
First I adapted djpeg-xr to abort early - later when actually decompressing I will probably pull some code back in. For now, steps 2 and 3 are exactly the same. The rest of the process is also the same, except for the following alterations: | |||
* jpeg_decompress_struct is replaced by an XR specific copy, in jpeglib.h. | |||
* jpeg_create_decompress is replaced by an XR specific copy, in jdapimin.c. | |||
* jpeg_read_header is replaced by an XR specific copy, in jdapimin.c. | |||
* jpeg_destroy_decompress is replaced by an XR specific copy, in jcomapi.c. | |||
This is done by creating XR specific copies of the source files: | |||
* jpegxrlib.h - interface definition. | |||
* jxrdapimin.c - interface routines for decompression (minimal required, more in jdapistd.c). | |||
* jxrcomapi.c - interface routines common to both compression and decompression. | |||
Note that even though this is a decompression library, I keep the distinction between algorithms and data types for "compression", "decompression" and "common to both". Why? I figure I might as well - maybe one day someone will want to adapt the library for encoding, and either way its roughly the same effort on my part. | |||
Again my approach is to first build a duplicate, independent copy that can decode a JPEG. Next step, however, is to rewrite jpegxrlib.h pretty much from scratch, based exactly on the specification. | |||
== June 14th - Initial clone of libjpeg == | == June 14th - Initial clone of libjpeg == | ||
| Line 15: | Line 44: | ||
* Added a script cleanup.sh to undo the action of autogen.sh, for debugging purposes. | * Added a script cleanup.sh to undo the action of autogen.sh, for debugging purposes. | ||
Right now I can run autogen.py, build and install from the build directory. Running the included tests with djpeg-xr instead of djpeg seems to work as expected. | Right now I can run autogen.py, build and install from the build directory. Running the included tests with djpeg-xr instead of djpeg seems to work as expected. Next step is to modify djpeg-xr to perform parsing of JPEG XR headers. | ||
edits