media: amphion: correct the unspecified color space
authorMing Qian <ming.qian@nxp.com>
Fri, 13 Jan 2023 05:25:51 +0000 (06:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:44 +0000 (09:33 +0100)
commit80f98dc3ebf1685cbf73a990df3eceda34978c5e
tree175c386620ebe3a0e684dae5335e41a4f2f92cba
parente66571729a5fbce8d2fdbe78ca1f25e17ddc00a4
media: amphion: correct the unspecified color space

[ Upstream commit 809060c8a357e020010dd8f797a5efd3c5432b13 ]

in the E.2.1 of Rec. ITU-T H.264 (06/2019),
0 of colour primaries is reserved, and 2 is unspecified.
driver can map V4L2_COLORSPACE_LAST to 0,
and map V4L2_COLORSPACE_DEFAULT to 2.

v4l2_xfer_func and v4l2_ycbcr_encoding are similar case.

Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support")
Signed-off-by: Ming Qian <ming.qian@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>
drivers/media/platform/amphion/vpu_color.c