-Developer functions detailed descriptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -packJPG contains functionality especially designed for developers. This -document details how to use the developer functions. - - -Developer switches -~~~~~~~~~~~~~~~~~~ - - -dev needed to enable any of the switches bewlow - - -test test algorithms, alert if error - -split split jpeg (to header & image data) - -coll? write coefficients (0=std,1=dhf,2=squ,3=unc) - -fcol? write filtered coefficients (see above) - -zdst write zero distribution lists to files - -info write debug info to .nfo file - -dist write distribution data to file - -pgm convert and write to pgm files - - -s? set global number of segments (1<=s<=49) - -t? set global noise threshold (0<=t<=10) - -s?,? set number of segments for component - -t?,? set noise threshold for component - - -Developer switches usage -~~~~~~~~~~~~~~~~~~~~~~~~ - -The developer switch "-ver" is needed the enable any developer function. -Other developer functions won't work without it. - -"-test" is a special case of the "-ver" option. Files are also verified, -but if any error happens, all the output will be kept for the developer -to have a look at it. - -"-split" splits a JPEG file to huffman coded image data and header data. -This mode is useful if a closer look at the header of a given file is -needed. - -"-coll?" and "-fcol?" write decompressed DCT coefficients to separate -files (one for each color component). DCT coefficients are stored in two -byte signed short integers. In the "-fcol?" option, DC coefficents are -replaced by the corresponding DC prediction errors, while using the -"-coll?" option will dump DC coeffcients without any prediction applied. -The "?" has to be replaced by a number 0, 1, 2 or 3, which will -determine the order the coefficients will be stored inside the files. -Have a look at the included sample images or the source code to get an -idea on which each number stands for. - -"-zdst" writes zero distribution lists to files (one for each color -component). For each 8x8 image data block in a given color component, a -zero distribution list contains the number of coefficients unequal zero. -These numbers are stored as unsigned one byte chars. In packJPG, zero -distribution lists are used as a replacement for JPEGs EOB symbol and -for segmentation of data. - -"-info" dumps a ".nfo" text file with data about the JPEG file. -Structure of header, type of coding and quantization tables for each -component are included in this file. - -"-dump" dumps distribution for a given file to ".dist" files (again, one -file per color component). For each band seperately this files contain -the number of coefficients = 0; 1; 2; 3; 4; .... (absolute values). Have -a look at the source code to get an idea about the structure of these -files. - -"-pgm" mainly serves as a test function for the integrated DCT routines. -Each color component is transformed back to it's image representation -using the IDCT and dumped seperately as a ".PGM" (Portable GrayMap) -file. - -"-t?" and "-s?" control specific compression settings. By manipulating -these parameters, you might achieve higher compression. By default, -these values are set automatically. The default for segmentation ("-s?") -is 10. The default for the noise threshold ("-t?") is dependant on the -size of the input file. Higher sizes mean higher t - theres more data -for the statistical model to learn in bigger files, so less has to be -considered noise. - - -____________________________________ -packJPG by Matthias Stirner, 11/2011