media: coda: jpeg: support optimized huffman tables
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Tue, 24 Mar 2020 16:04:29 +0000 (17:04 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 09:57:02 +0000 (11:57 +0200)
commit5c990fa01fb2803150c5ebd031753a884976c6d3
tree68713d8c9ad2394f5c7ba59e66969b7d8015f456
parent15c3d5aae73ecfe8cad916000cf42b85197e7308
media: coda: jpeg: support optimized huffman tables

Each jpeg can have the huffman tables optimized for its specific content
meaning that the table lenghts and values don't match the standard table
of substitutions so there's no reason to hardcode and expect the standard
lengths, otherwise we just end up rejecting optimized jpegs altogether.

Tested on CODA960.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/coda/coda-jpeg.c