]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: imx-jpeg: Identify and handle precision correctly
authorMing Qian <ming.qian@nxp.com>
Wed, 23 Mar 2022 09:05:55 +0000 (10:05 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:56:09 +0000 (11:56 +0200)
commitcd62306823a27a281542fbcb03f8bdb73ac3d07c
treea8c3b26ce77b2bff822ffb765ad9b120204ad9a1
parent92edf4e8a1d0088d4486b6a52bdc59c22713c715
media: imx-jpeg: Identify and handle precision correctly

BugLink: https://bugs.launchpad.net/bugs/1990162
[ Upstream commit bec0a3a67389ede106d0661a007edf832878d8b2 ]

The decoder will save the precision that was detected from jpeg header
and use it later, when choosing the pixel format and also calculate
bytesperline according to precision.

The 12bit jpeg is not supported yet,
but driver shouldn't led to serious problem if user enqueue a 12 bit jpeg.
And the 12bit jpeg is supported by hardware, driver may support it later.

[hverkuil: document the new precision field]

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/platform/imx-jpeg/mxc-jpeg.c
drivers/media/platform/imx-jpeg/mxc-jpeg.h