Cameras on devices are getting higher in resolution but displaying those images is not possible owing to memory limitations on the device. This library can decode arbitrary areas of large images without having to read the entire image into memory.
Unfortunately this can be rather slow. One reason is because Jpegs are optimally compressed with variable length coding and so it is not possible to locate and "jump" to the required point in the file to begin decoding because this cannot be found without decompressing the entire file up to that point.
However the main reason this process can be slow is because versions of Android before 2.2 interpret the bytecodes of their programs at runtime. Versions 2.2 of Android and later have a Just In Time compiler that compiles the bytecodes to native code and, according to reports that I have read, provide a speed increase of 4 or 5 times. The CPUs used by typical Android devices are increasing in their processing speed which again should give a processing speed advantage to the most recent devices. So locating the spaceman's head in the demo takes about 7 seconds on my 600Mhz Android 2.1 phone and comes down to around one second on a 1Ghz Android 2.2 or later device.
EDIT :- Version 1.1 now posted. See post #22 for details.
Note that if you like to test it in rapid debug mode then you need to add #DebuggerForceStandardAssets: true to your project.
Unfortunately this can be rather slow. One reason is because Jpegs are optimally compressed with variable length coding and so it is not possible to locate and "jump" to the required point in the file to begin decoding because this cannot be found without decompressing the entire file up to that point.
However the main reason this process can be slow is because versions of Android before 2.2 interpret the bytecodes of their programs at runtime. Versions 2.2 of Android and later have a Just In Time compiler that compiles the bytecodes to native code and, according to reports that I have read, provide a speed increase of 4 or 5 times. The CPUs used by typical Android devices are increasing in their processing speed which again should give a processing speed advantage to the most recent devices. So locating the spaceman's head in the demo takes about 7 seconds on my 600Mhz Android 2.1 phone and comes down to around one second on a 1Ghz Android 2.2 or later device.
EDIT :- Version 1.1 now posted. See post #22 for details.
Note that if you like to test it in rapid debug mode then you need to add #DebuggerForceStandardAssets: true to your project.
Attachments
Last edited by a moderator: