Senior
February 19, 2021
Question
F7 hardware jpeg encoding colour failure
- February 19, 2021
- 2 replies
- 2425 views
If I try to encode blocks of colour using the hardware JPEG encode in an F7 from a BMP image (screen memory in this case) they fail if the colour is pure (e.g. all red, all blue) and they come out different shades of green.
By experiment, I have found that extra bits have to be set for the encode to succeed.
Colour Pure code Code that encodes correctly
red 0xff0000 0xff0202
green 0x00ff00 0x02ff02
blue 0x0000ff 0x0202ffAttached is a jpeg captured by the hardware encoder where the first 3 blocks are 'pure' colours and the other 3 are with the extra bits set.
Is this a limitaion of the encoder or should I be using something other than
#define JPEG_CHROMA_SAMPLING JPEG_420_SUBSAMPLING
#define JPEG_COLOR_SPACE JPEG_YCBCR_COLORSPACE
#define JPEG_IMAGE_QUALITY 75in the encoder config.
Thanks
