I spent my week working on the Jpeg2000 loader again, working through the new source code I talked about last month. Also Christmas shopping, playing DHTML Lemmings and various other random activities, so not actually as much time on the loader as I'd been intending.
The new source code is still pretty awful:
int i,k1,k2,k3,k4,l; // countersNot to mention the seemingly everpresent "what, you mean some people don't use the same size tabs as me" interchange of tabs and spaces for indentation. I really ought to find a beautifier. Still, it's easier to work through that the jasper source. Feels a bit strange to be working with Java again though.
int tmp1,tmp2,tmp3,tmp4; // temporary storage for sample values
int mv1,mv2,mv3,mv4; // max value for each component
int ls1,ls2,ls3,ls4; // level shift for each component
int fb1,fb2,fb3,fb4; // fractional bits for each component
int data1,data2,data3,data4; // references to data buffers
final ImageConsumer cons; // image consumers cache
int hints; // hints to image consumers
int height; // image height
int width; // image width
int pixbuf; // line buffer for pixel data
DataBlkInt db1,db2,db3,db4; // data-blocks to request data from src
int tOffx, tOffy; // Active tile offset
boolean prog; // Flag for progressive data
Coord nT = src.getNumTiles(null);
// 38 lines which don't modify nT or src
// getNumTiles is a non-modifying getter
nT = src.getNumTiles(null);
Next weeks installment will either be a day early or won't get written, since I'm away for Christmas as of next Sunday.