I am testing VPU JPEG image decoding using this sample:
The decoder outputs YUV pixel format which is then converted to RGB using g2d_blit(). I then encode the buffer back into JPEG using SW jpeg library. For comparison, I decode and then encode the same image using only SW jpeg library. I see subtle color differences between the HW and SW decode. I am attaching two images for comparison. It appears the VPU decoder or g2d_blit conversion enhances contrast (see how much darker the top of the white box on the right is for HW decode compared to SW decode) and bumps up red color (see the cardboard box on left is more red for HW decode). The SW decode produce the output images that matches the input image.
Any ideas why this is happening and if it can be fixed? Is there another way to to HW YUV to RGB conversion?
This is HW decode:
This is SW decode, input and output images are identical: