media: coda: add SPS fixup code for frame sizes that are not multiples of 16
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 19 Jul 2018 10:45:10 +0000 (06:45 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 27 Jul 2018 10:58:54 +0000 (06:58 -0400)
commit0dff710d1f939c3ca42960769431cf20c095dbce
treecbdfab23afdc78318b5aa6df9f674f004bf7704c
parent7988b2532aca7463149eea701530d9bafc64619e
media: coda: add SPS fixup code for frame sizes that are not multiples of 16

The CODA7541 firmware does not set the SPS frame cropping fields to
properly describe coded h.264 streams with frame sizes that are not a
multiple of the macroblock size.
This adds RBSP parsing code and a SPS fixup routine to manually replace
the cropping information in the headers produced by the firmware with
the correct values.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[hans.verkuil@cisco.com: added explanation of SPS RBSP to comment]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-h264.c
drivers/media/platform/coda/coda.h