]> git.baikalelectronics.ru Git - kernel.git/commit
media: allegro: correctly scale the bit rate in SPS
authorMichael Tretter <m.tretter@pengutronix.de>
Wed, 8 Sep 2021 13:03:51 +0000 (14:03 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 Oct 2021 14:58:38 +0000 (15:58 +0100)
commitf5470c47f725f4884b91cefded074a7074940a2c
treee357c4f74e6c58e435bcce6075a7e343a9034593
parent029a997a8637562e3f4a04a844aec01ad6968413
media: allegro: correctly scale the bit rate in SPS

The bit rate in the SPS can be scaled by an exponent, which allows to
reduce the number of bits in the SPS in case of high bit rates.

The driver did not scale the bitrate, but used a scaling exponent of 0.
Fix this by properly calculating the scaling factor and writing the bit
rate as value and scaling factor into the SPS.

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