OSDN Git Service

[media] coda: clamp frame sequence counters to 16 bit
authorLucas Stach <l.stach@pengutronix.de>
Thu, 9 Jul 2015 10:10:12 +0000 (07:10 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 17 Jul 2015 13:50:55 +0000 (10:50 -0300)
commitf964c409f7cc626335cf2370f55690660a273dad
tree252b08a921fc79a72b4631ec10050e0a5edcf17b
parentadb8963f27e00273c912a53f28f7af5d14cfd32e
[media] coda: clamp frame sequence counters to 16 bit

This is already done for one side of the comparison with the expectation
that the HW counter rolls over at the 16 bit boundary. This is true when
decoding a h.264 stream, but doesn't hold for at least MJPEG. As we don't
know the exact wrap-around point for this format just clamp the HW counter
to the same 16 bits. This should be enough to detect most of the errors
and saves us from doing different comparisons based on the decoded format.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c