media: allegro: skip filler data if possible
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 16 Mar 2020 15:26:30 +0000 (16:26 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 20 Mar 2020 08:18:57 +0000 (09:18 +0100)
commite74145c2334d857072731eaf6bd518406024a9d4
tree1705670a84b4c3f7f33e48dc3ae9d205594ae1e9
parent0600130e65f96c9ff72766df73d4b256caa32d04
media: allegro: skip filler data if possible

The driver instructs the firmware to leave some space space in front of
the coded frame data for SPS/PPS data. If the driver receives an IDR, it
writes the SPS/PPS into that free space and fills the rest with filler
data. However, if there is no additional data, the driver can use the
plane offset to skip this space instead of adding filler data.

As the size of the SPS/PPS is only available after writing it, keep the
filler data between the SPS/PPS and the coded frame data.

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/staging/media/allegro-dvt/allegro-core.c