linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] v4l2-mem2mem: add job_write() to support encoders
@ 2018-12-14 15:43 hverkuil-cisco
  2018-12-14 15:43 ` [PATCH 1/2] v4l2-mem2mem: add job_write callback hverkuil-cisco
  2018-12-14 15:43 ` [PATCH 2/2] vicodec: add encoder support to write to multiple buffers hverkuil-cisco
  0 siblings, 2 replies; 6+ messages in thread
From: hverkuil-cisco @ 2018-12-14 15:43 UTC (permalink / raw)
  To: linux-media; +Cc: Tomasz Figa, Ezequiel Garcia, Philipp Zabel

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-08 10:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 15:43 [PATCH 0/2] v4l2-mem2mem: add job_write() to support encoders hverkuil-cisco
2018-12-14 15:43 ` [PATCH 1/2] v4l2-mem2mem: add job_write callback hverkuil-cisco
2019-01-07 14:42   ` Hans Verkuil
2019-01-08  5:49     ` Tomasz Figa
2019-01-08 10:26     ` Philipp Zabel
2018-12-14 15:43 ` [PATCH 2/2] vicodec: add encoder support to write to multiple buffers hverkuil-cisco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).