When I was implementing the OpenCL version of JPEG decoding, there are some
question I want to know:
1. Now we completed the OpenCL version of IDCT-is-slow, IDCT-fast(use
short) and IDCT-float. However, I found the following function in
jdictint.c and jindred.c:
I don't know when these function will be used, and I also try to debug
these function, but it isn't been used when my debug.
I didn't implement OpebCL version for them.
Could you give me more info?
2. When I use:
djpeg -bmp -dct float -outfile out.bmp in.jpg
to decode a image, I found that the results are differnet between jpeg6b
and jpeg8d/jpeg9. The SIMD version is also different from C code. And now
the OCL version is bit-match with 8d/9.
However, if we complile with VS2010, it won't be bit-match, if we use GCC
or VS2012, it's bit-match.
Is it a bugs?
Dear Zhang Peixuan
1. These are the general NxN-point DCT functions.
They are used in jcdctmgr.c and jddctmgr.c,
and are used by the cjpeg/djpeg -scale and cjpeg -block
switches, and also for the "fancy" color subsampling mode.
See the accompanying documentation for more info.
2. jpeg6b uses an irreversible algorithm for the "fancy" color
subsampling mode. That's why the result is different compared
to newer versions, which use a reversible algorithm.
The 8x8 DCT function itself, although optimized in newer IJG
versions, delivers the same results.
You can get the same results in all versions by using the
"-nosmooth" switch in djpeg invocation, or using/creating
image files with disabled color subsampling (option "-sample 1x1"
in cjpeg invocation; otherwise, the default is 2x2).
jpeg9a, which is expected to be released in January 2014
(see http://www.infai.org/jpeg/), introduces another mismatch:
This is due to the YCbCr <=> RGB conversion, which will use a
more accurate code than prior versions.
VS2010 seems to have some subtle optimization bugs in the compiler.
We had to disable optimization for the file jquant2.c in the library
project file for the self-test to pass properly (see install.txt).
Organizer Independent JPEG Group