media: allegro: implement scaling of cpb size in SPS
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 3 Dec 2020 11:00:58 +0000 (12:00 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 15:08:55 +0000 (16:08 +0100)
commitd4a881c1b9f61978f05412487877b6745f58478d
tree7ac0da8b2d67908a71f7f94216eff3e63990227d
parent2e3917e6bd226b2d69f903392592d701a388e4f0
media: allegro: implement scaling of cpb size in SPS

The cbp_size_value_minus1 in the SPS can scaled using cpb_size_scale to
reduce the number of bits necessary to encode the value. For simplicity,
the scaling was set to 1.

Restructure to the code to make it easier to drop the cbp_size from the
channel and as we are at it, also properly implement the scaling.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-core.c