Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v6 0/5] HEVC/H.265 stateless support for V4L2 and Cedrus
@ 2019-06-14 14:38 Paul Kocialkowski
  2019-06-14 14:38 ` [PATCH v6 1/5] media: v4l2-ctrls: Split off MPEG-2 controls validation Paul Kocialkowski
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Paul Kocialkowski @ 2019-06-14 14:38 UTC (permalink / raw)
  To: linux-media, linux-kernel, devel, linux-arm-kernel, linux-sunxi
  Cc: Mauro Carvalho Chehab, Maxime Ripard, Paul Kocialkowski,
	Greg Kroah-Hartman, Chen-Yu Tsai, Thomas Petazzoni, Hans Verkuil,
	Ezequiel Garcia, Tomasz Figa, Alexandre Courbot,
	Nicolas Dufresne, Boris Brezillon, Jernej Skrabec, Jonas Karlman

This is early support for HEVC/H.265 stateless decoding in V4L2,
including both definitions and driver support for the Cedrus VPU
driver, which concerns Allwinner devices.

A specific pixel format is introduced for the HEVC slice format and
controls are provided to pass the bitstream metadata to the decoder.
Some bitstream extensions are intentionally not supported at this point.

Since this is the first proposal for stateless HEVC/H.265 support in
V4L2, reviews and comments about the controls definitions are
particularly welcome.

On the Cedrus side, the H.265 implementation covers frame pictures
with both uni-directional and bi-direction prediction modes (P/B
slices). Field pictures (interleaved), scaling lists and 10-bit output
are not supported at this point.

This series is based upon the following series:
* media: cedrus: Add H264 decoding support

Changes since v5:
* Rebased atop latest next media tree;
* Moved to flags instead of u8 fields;
* Added padding to ensure 64-bit alignment
  (tested with GDB on 32 and 64-bit architectures);
* Reworked cedrus H.265 driver support a bit for flags;
* Split off codec-specific control validation and init;
* Added HEVC controls fields cleanup at std_validate to allow reliable
  control comparison with memcmp;
* Fixed various misc reported mistakes.

Changes since v4:
* Rebased atop latest H.254 series.

Changes since v3:
* Updated commit messages;
* Updated CID base to avoid conflicts;
* Used cpu_to_le32 for packed le32 data;
* Fixed misc minor issues in the drive code;
* Made it clear in the docs that the API will evolve;
* Made the pixfmt private and split commits about it.

Changes since v2:
* Moved headers to non-public API;
* Added H265 capability for A64 and H5;
* Moved docs to ext-ctrls-codec.rst;
* Mentionned sections of the spec in the docs;
* Added padding to control structures for 32-bit alignment;
* Made write function use void/size in bytes;
* Reduced the number of arguments to helpers when possible;
* Removed PHYS_OFFSET since we already set PFN_OFFSET;
* Added comments where suggested;
* Moved to timestamp for references instead of index;
* Fixed some style issues reported by checkpatch.

Changes since v1:
* Added a H.265 capability to whitelist relevant platforms;
* Switched over to tags instead of buffer indices in the DPB
* Declared variable in their reduced scope as suggested;
* Added the H.265/HEVC spec to the biblio;
* Used in-doc references to the spec and the required APIs;
* Removed debugging leftovers.

Cheers!

Paul Kocialkowski (5):
  media: v4l2-ctrls: Split off MPEG-2 controls validation
  media: v4l2-ctrls: Split off MPEG-2 controls initialization
  media: v4l: Add definitions for the HEVC slice controls
  media: pixfmt: Document the HEVC slice pixel format
  media: cedrus: Add HEVC/H.265 decoding support

 Documentation/media/uapi/v4l/biblio.rst       |   9 +
 .../media/uapi/v4l/ext-ctrls-codec.rst        | 474 +++++++++++++-
 .../media/uapi/v4l/pixfmt-compressed.rst      |  21 +
 .../media/uapi/v4l/vidioc-queryctrl.rst       |  18 +
 .../media/videodev2.h.rst.exceptions          |   3 +
 drivers/media/v4l2-core/v4l2-ctrls.c          | 231 +++++--
 drivers/media/v4l2-core/v4l2-ioctl.c          |   1 +
 drivers/staging/media/sunxi/cedrus/Makefile   |   2 +-
 drivers/staging/media/sunxi/cedrus/cedrus.c   |  31 +-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  18 +
 .../staging/media/sunxi/cedrus/cedrus_dec.c   |   9 +
 .../staging/media/sunxi/cedrus/cedrus_h265.c  | 616 ++++++++++++++++++
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |   4 +
 .../staging/media/sunxi/cedrus/cedrus_regs.h  | 271 ++++++++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  10 +
 include/media/hevc-ctrls.h                    | 197 ++++++
 include/media/v4l2-ctrls.h                    |   7 +
 17 files changed, 1860 insertions(+), 62 deletions(-)
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_h265.c
 create mode 100644 include/media/hevc-ctrls.h

-- 
2.21.0


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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 14:38 [PATCH v6 0/5] HEVC/H.265 stateless support for V4L2 and Cedrus Paul Kocialkowski
2019-06-14 14:38 ` [PATCH v6 1/5] media: v4l2-ctrls: Split off MPEG-2 controls validation Paul Kocialkowski
2019-06-14 14:38 ` [PATCH v6 2/5] media: v4l2-ctrls: Split off MPEG-2 controls initialization Paul Kocialkowski
2019-06-14 14:38 ` [PATCH v6 3/5] media: v4l: Add definitions for the HEVC slice controls Paul Kocialkowski
2019-07-22 14:40   ` Hans Verkuil
2019-07-25 12:52     ` Paul Kocialkowski
2019-06-14 14:38 ` [PATCH v6 4/5] media: pixfmt: Document the HEVC slice pixel format Paul Kocialkowski
2019-06-14 14:38 ` [PATCH v6 5/5] media: cedrus: Add HEVC/H.265 decoding support Paul Kocialkowski
2019-07-22 13:17 ` [PATCH v6 0/5] HEVC/H.265 stateless support for V4L2 and Cedrus Paul Kocialkowski
2019-07-22 14:41   ` Hans Verkuil

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox