MLK-20290: mxc-jpeg: Inject a default Huffman table for the decoder
So far, the configuration stream was used only for the encoder, but
it is actually possible to use it for the decoder too, in order to inject
a default Huffman table, because the CAST IP decoder gets stuck for jpegs
that do not contain any Huffman table.
Add dht_needed member in the context structure, and set it true when a
jpeg without any DHT marker is detected. In such case, the decoder will
also operate in 2 phases: first DHT injection, then user buffer decode;
this is done by chaining a configuration descriptor before the decoding
descriptor. The configuration stream is set-up in the s_fmt ioctl with
the minimum resolution.
Also print an error when a jpeg smaller than the minimum size, 64x64
according to imx8qxp errata ERR050135, is detected.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>