[PATCH 0/2] v4l2-mem2mem: add job_write() to support encoders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>

The m2m framework is not quite symmetrical: decoders can process multiple
output buffers in job_ready until enough buffers have arrived so a frame
can be decoded.

However, encoders do not have an equivalent where multiple capture buffers
can be used to write the compressed frame. They expect that the provided
capture buffer is always large enough to contain the full compressed
frame.

This patch adds a job_write() callback and a v4l2_m2m_job_writing()
function to tell the m2m framework that the job isn't finished but that
it is waiting for more capture buffers so it can write the remaining
compressed data to the buffers.

The first patch adds the support for this to the m2m framework, the
second patch adapts vicodec to use it.

Let me know if there are any comments! It would be even better if this
could be tested in a real stateful encoder.

Regards,

	Hans

Hans Verkuil (2):
  v4l2-mem2mem: add job_write callback
  vicodec: add encoder support to write to multiple buffers

 drivers/media/platform/vicodec/vicodec-core.c | 91 +++++++++++++++----
 drivers/media/v4l2-core/v4l2-mem2mem.c        | 61 +++++++++++--
 include/media/v4l2-mem2mem.h                  | 27 +++++-
 3 files changed, 152 insertions(+), 27 deletions(-)

-- 
2.19.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux