My program runs on the android device, and the device is ARM system with NEON supported.
At first I used libjpeg to compress the RGB image(800*480) to jpeg. The speed was about 70ms for per image, but it was too slow for me. Later I found the libjpeg-turbo, seems it can improve the compressing speed with the NEON in ARM.
But after compiling and testing, I found their compressing speed almost the same. And the change of the quality and flag passed to tjCompress2 also took no effect. I have no idea whether something is wrong or something is missing in my program. Codes below :
tjhandle _jpegCompressor = tjInitCompress();
tjCompress2(_jpegCompressor, (unsigned char*)in, PARAM_WIDTH,
PARAM_WIDTH*PERSIZE, PARAM_HEIGHT, PERSIZE,
(unsigned char**)&out, (long unsigned int*)outlen, TJSAMP_444, 100,
TJFLAG_FASTDCT);
tjDestroy(_jpegCompressor);
The jpeg buffer(out) is allocated and freed by myself.
The version of libjpeg-turbo I use is 1.4.2