[media] coda: add CODA7541 decoding support
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 27 Jun 2013 09:59:01 +0000 (06:59 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 31 Jul 2013 18:56:44 +0000 (15:56 -0300)
commit918c66fd41268ec34bba0a82f4221ddc18e9501b
treed4854cac78b1c0775d355d8c5c70a18084748bf5
parent477c1cfe8f8050ce716b3d89be17b33a4a80fc9d
[media] coda: add CODA7541 decoding support

This patch enables decoding of h.264 and mpeg4 streams on CODA7541.
Queued output buffers are immediately copied into the bitstream
ringbuffer. A device_run can be scheduled whenever there is either
enough compressed bitstream data, or the CODA is in stream end mode.
Each successful device_run, data is read from the bitstream ringbuffer
and a frame is decoded into a free internal framebuffer. Depending on
reordering, a possibly previously decoded frame is marked as display
frame, and at the same time the display frame from the previous run
is copied out into a capture buffer by the rotator hardware.
The dequeued capture buffers are counted to send the EOS signal to
userspace with the last frame. When userspace sends the decoder stop
command or enqueues an empty output buffer, the stream end flag is
set to allow decoding the remaining frames in the bitstream
ringbuffer.
The enum_fmt/try_fmt functions return fixed capture buffer sizes
while the output queue is streaming, to allow better autonegotiation
in userspace.
A per-context buffer mutex is used to lock the picture run against
buffer dequeueing: if a job gets queued, then streamoff dequeues
the last buffer, and then device_run is called, bail out. For that
the interrupt handler has to be threaded.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda.c
drivers/media/platform/coda.h
This page took 0.024632 seconds and 5 git commands to generate.