We recently just found an issue that popped up with MJPEG decoding in the UMC sample code. It looks like this issue was introduced in the 6.1.x sample code and is still present as far as 7.1.x. In the 6.0.x sample code YCbCr411 JPEG was decoded and converted to RGB so it didn't have this problem. Starting in 6.1.x this gets treated as YUV420 which is close, but not exactly the same. The problem is that the value ranges are different between YCbCr411 and YUV420. YCbCr411 has the range of 0-255 for all components while YUV 420 has a range of 16-235 for Y and 16-240 for UV data. The displayed images look pretty close, but are not accurate.
The main issue with this inaccuracy is that certain fisheye cameras etc watermark the video in order to indicate to their dewarping libraries that the image can be dewarped. When the proper conversion does not take place and this watermark data is distorted the dewarping libraries no longer work.
The code in question is located in jpegdec.cpp in ProcessBuffer in the if(m_jpeg_precision <= 8) block it does an ippiCopy_8uC1R to just copy the data when it should be doing a YCbCr411 to YUV420 conversion in here. As a workaround for now I've used the following code:
int max = (c == 0 ? 235 : 240);
for (int i = 0; i < roi.height; i++)
for (int j = 0; j < srcStep; j++)
pDst8u[j] = (Ipp8u)(16 + ((int)pSrc8u[j] * (max - 16) / 255));
pSrc8u += srcStep;
pDst8u += m_dst.lineStep[c];
I've attached some examples of the same JPEG image using both methods to show the difference.