linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/8] media: cedrus: h264: Support multi-slice frames
@ 2019-10-10 13:11 Hans Verkuil
  2019-10-10 13:11 ` [PATCHv3 1/8] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF Hans Verkuil
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Hans Verkuil @ 2019-10-10 13:11 UTC (permalink / raw)
  To: linux-media
  Cc: Jernej Škrabec, Paul Kocialkowski, mripard, tfiga, jonas,
	Ezequiel Garcia

This series adds support for decoding multi-slice H264 frames along with
support for V4L2_DEC_CMD_FLUSH and V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.

This has only been compile-tested. Jernej, can you test with ffmpeg?

This series is based on https://www.spinics.net/lists/linux-media/msg158081.html
plus ideas from https://www.spinics.net/lists/linux-media/msg158625.html.

Changes since v2:

- Move the code to detect if a capture buffer is done to
  the v4l2-mem2mem core framework.
- Move the first-slice detection to the core as well.
- Add a new v4l2_m2m_buf_done_and_job_finish() function that
  finishes a job taking held capture buffers into account.
  Marking buffers as done and finishing the job has to be
  done with job_spinlock held to avoid race conditions with
  v4l2_m2m_ioctl_stateless_decoder_cmd().
- v4l2_m2m_ioctl_stateless_decoder_cmd takes the job_spinlock
  to prevent race conditions.

Regards,

        Hans

Hans Verkuil (4):
  vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF
  v4l2-mem2mem: support held capture buffers
  videodev2.h: add V4L2_DEC_CMD_FLUSH
  v4l2-mem2mem: add new_frame detection

Jernej Skrabec (4):
  media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers
  media: cedrus: Detect first slice of a frame
  media: cedrus: h264: Support multiple slices per frame
  media: cedrus: Add support for holding capture buffer

 Documentation/media/uapi/v4l/buffer.rst       |  13 ++
 .../media/uapi/v4l/vidioc-decoder-cmd.rst     |  10 +-
 .../media/uapi/v4l/vidioc-reqbufs.rst         |   6 +
 .../media/videodev2.h.rst.exceptions          |   1 +
 .../media/common/videobuf2/videobuf2-v4l2.c   |  12 +-
 drivers/media/v4l2-core/v4l2-mem2mem.c        | 188 +++++++++++++++---
 drivers/staging/media/sunxi/cedrus/cedrus.h   |   1 +
 .../staging/media/sunxi/cedrus/cedrus_dec.c   |   1 +
 .../staging/media/sunxi/cedrus/cedrus_h264.c  |  12 +-
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |  16 +-
 .../staging/media/sunxi/cedrus/cedrus_video.c |  14 ++
 include/media/v4l2-mem2mem.h                  |  44 +++-
 include/media/videobuf2-core.h                |   3 +
 include/media/videobuf2-v4l2.h                |   5 +
 include/uapi/linux/videodev2.h                |  14 +-
 15 files changed, 283 insertions(+), 57 deletions(-)

-- 
2.23.0


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

end of thread, other threads:[~2019-10-11  9:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 13:11 [PATCHv3 0/8] media: cedrus: h264: Support multi-slice frames Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 1/8] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 2/8] v4l2-mem2mem: support held capture buffers Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 3/8] videodev2.h: add V4L2_DEC_CMD_FLUSH Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 4/8] media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 5/8] v4l2-mem2mem: add new_frame detection Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 6/8] media: cedrus: Detect first slice of a frame Hans Verkuil
2019-10-11  8:49   ` Jernej Škrabec
2019-10-11  8:50     ` Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 7/8] media: cedrus: h264: Support multiple slices per frame Hans Verkuil
2019-10-11  9:11   ` Jernej Škrabec
2019-10-10 13:11 ` [PATCHv3 8/8] media: cedrus: Add support for holding capture buffer Hans Verkuil
2019-10-11  9:12   ` Jernej Škrabec
2019-10-11  7:07 ` [PATCHv3 0/8] media: cedrus: h264: Support multi-slice frames Jernej Škrabec

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).