rkvdec: h264: Refuse to decode unsupported bitstream
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 9 Jul 2020 16:36:34 +0000 (18:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 11:26:25 +0000 (13:26 +0200)
commit9363aa33f6a9acfd16f98c749f17f6c65d184670
tree7b507ba0a6822001aab837777e491eebdb525f66
parent46d7aaebbe441d5381e35d8e16df784690e65ef3
rkvdec: h264: Refuse to decode unsupported bitstream

The hardware only supports 4:2:2, 4:2:0 or 4:0:0 (monochrome),
8-bit or 10-bit depth content.

Verify that the SPS refers to a supported bitstream, and refuse
unsupported bitstreams by failing at TRY_EXT_CTRLS time.

The driver is currently broken on 10-bit and 4:2:2
so disallow those as well.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkvdec/rkvdec.c