Intel IPP / IJL / IJG for faster JPEG compression
I'm investigating using Intel's IPP 4.0 to save JPEG images faster
than our current OEM save function.
The problem is that there are two samples IJL and IJG. IJG uses the
"reference" interface of the Independent JPEG Group, whereas the
(deprecated) IJL uses the Intel JPEG Library interface.
I did performance timing using a single thread, and found the IJG
version to take 70% of the time of my existing OEM. However, in my
real program, I'm using 4 threads (4 == # of logical processors) to
perform JPEG compression. I ended up using IJL instead of IJG because
the docs on it seemed to indicate that it utilized IPP better, but I
couldn't tell for sure. In any case, the performance benefit from
switching from OEM to IJL was no more than 5%.
Also, the Intel Press IPP book has some guidelines for how to optimize
IJL to use IPP, but it seems like they've already done these
optimizations. My problem is that IPP is geared towards providing lots
of low-level functions, but I want a plain-jane compression function
that takes an image and writes the entire JIFF/JPEG file to a memory
stream. I can't figure out if I should be using IJG, IJL, or IPP
directly.
The Intel Press IPP book suggests RGBToYCbCr422LS_JPEG_8u16s_C3P3R
performs the full operation in one function call, but my data is BGR
interleaved, so I don't know what I need to do to switch it so that
the huge function listed above can be used. Nor do I know whether the
function above outputs the JIFF header or not.
Thanks,
-ken
|