All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] media: cedrus: Add H264 decoding support
@ 2018-06-13 14:07 ` Maxime Ripard
  0 siblings, 0 replies; 102+ messages in thread
From: Maxime Ripard @ 2018-06-13 14:07 UTC (permalink / raw)
  To: hans.verkuil, acourbot, sakari.ailus, Laurent Pinchart
  Cc: tfiga, posciak, Paul Kocialkowski, Chen-Yu Tsai, linux-kernel,
	linux-arm-kernel, linux-media, nicolas.dufresne, jenskuske,
	linux-sunxi, Thomas Petazzoni, Maxime Ripard

Hi,

Here is a preliminary version of the H264 decoding support in the
cedrus driver.

As you might already know, the cedrus driver relies on the Request
API, and is a reverse engineered driver for the video decoding engine
found on the Allwinner SoCs.

This work has been possible thanks to the work done by the people
behind libvdpau-sunxi found here:
https://github.com/linux-sunxi/libvdpau-sunxi/

This driver is based on the last version of the cedrus driver sent by
Paul, based on Request API v13 sent by Hans:
https://lkml.org/lkml/2018/5/7/316

This driver has been tested only with baseline profile videos, and is
missing a few key features to decode videos with higher profiles.
This has been tested using our cedrus-frame-test tool, which should be
a quite generic v4l2-to-drm decoder using the request API to
demonstrate the video decoding:
https://github.com/free-electrons/cedrus-frame-test/, branch h264

However, sending this preliminary version, I'd really like to start a
discussion and get some feedback on the user-space API for the H264
controls exposed through the request API.

I've been using the controls currently integrated into ChromeOS that
have a working version of this particular setup. However, these
controls have a number of shortcomings and inconsistencies with other
decoding API. I've worked with libva so far, but I've noticed already
that:
  - The kernel UAPI expects to have the nal_ref_idc variable, while
    libva only exposes whether that frame is a reference frame or
    not. I've looked at the rockchip driver in the ChromeOS tree, and
    our own driver, and they both need only the information about
    whether the frame is a reference one or not, so maybe we should
    change this?
  - The H264 bitstream exposes the picture default reference list (for
    both list 0 and list 1), the slice reference list and an override
    flag. The libva will only pass the reference list to be used (so
    either the picture default's or the slice's) depending on the
    override flag. The kernel UAPI wants the picture default reference
    list and the slice reference list, but doesn't expose the override
    flag, which prevents us from configuring properly the
    hardware. Our video decoding engine needs the three information,
    but we can easily adapt to having only one. However, having two
    doesn't really work for us.

It's pretty much the only one I've noticed so far, but we should
probably fix them already. And there's probably other, feel free to
step in.

Maxime Ripard (8):
  media: cedrus: Add wrappers around container_of for our buffers
  media: cedrus: Add a macro to check for the validity of a control
  media: cedrus: make engine type more generic
  media: cedrus: Remove MPEG1 support
  media: cedrus: Add ops structure
  media: cedrus: Move IRQ maintainance to cedrus_dec_ops
  media: cedrus: Add start and stop decoder operations
  media: cedrus: Add H264 decoding support

Pawel Osciak (1):
  CHROMIUM: v4l: Add H264 low-level decoder API compound controls.

 drivers/media/platform/sunxi/cedrus/Makefile  |   2 +-
 .../platform/sunxi/cedrus/sunxi_cedrus.c      |  23 +
 .../sunxi/cedrus/sunxi_cedrus_common.h        |  81 +++-
 .../platform/sunxi/cedrus/sunxi_cedrus_dec.c  |  38 +-
 .../platform/sunxi/cedrus/sunxi_cedrus_h264.c | 443 ++++++++++++++++++
 .../platform/sunxi/cedrus/sunxi_cedrus_hw.c   |  35 +-
 .../platform/sunxi/cedrus/sunxi_cedrus_hw.h   |   6 +-
 .../sunxi/cedrus/sunxi_cedrus_mpeg2.c         |  52 +-
 .../sunxi/cedrus/sunxi_cedrus_mpeg2.h         |  33 --
 .../platform/sunxi/cedrus/sunxi_cedrus_regs.h |  22 +-
 .../sunxi/cedrus/sunxi_cedrus_video.c         |  37 +-
 drivers/media/v4l2-core/v4l2-ctrls.c          |  42 ++
 include/media/v4l2-ctrls.h                    |  10 +
 include/uapi/linux/v4l2-controls.h            | 164 +++++++
 include/uapi/linux/videodev2.h                |  11 +
 15 files changed, 912 insertions(+), 87 deletions(-)
 create mode 100644 drivers/media/platform/sunxi/cedrus/sunxi_cedrus_h264.c
 delete mode 100644 drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h

-- 
2.17.0


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

end of thread, other threads:[~2018-09-07  7:54 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13 14:07 [PATCH 0/9] media: cedrus: Add H264 decoding support Maxime Ripard
2018-06-13 14:07 ` Maxime Ripard
2018-06-13 14:07 ` [PATCH 1/9] CHROMIUM: v4l: Add H264 low-level decoder API compound controls Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-15 11:59   ` Hans Verkuil
2018-06-15 11:59     ` Hans Verkuil
2018-06-15 13:01     ` Guenter Roeck
2018-06-15 13:01       ` Guenter Roeck
2018-07-12 16:38     ` Maxime Ripard
2018-07-12 16:38       ` Maxime Ripard
2018-07-12 16:47       ` Andrew Lunn
2018-07-12 16:47         ` Andrew Lunn
2018-06-21  8:58   ` Paul Kocialkowski
2018-06-21  8:58     ` Paul Kocialkowski
2018-08-21 16:58   ` Ezequiel Garcia
2018-08-21 16:58     ` Ezequiel Garcia
2018-08-21 17:07     ` Nicolas Dufresne
2018-08-21 17:07       ` Nicolas Dufresne
2018-08-22 13:07       ` Paul Kocialkowski
2018-08-22 13:07         ` Paul Kocialkowski
2018-08-22 13:38         ` Tomasz Figa
2018-08-22 13:38           ` Tomasz Figa
2018-08-22 13:52           ` Nicolas Dufresne
2018-08-22 13:52             ` Nicolas Dufresne
2018-08-22 14:45           ` Paul Kocialkowski
2018-08-22 14:45             ` Paul Kocialkowski
2018-08-28  8:11             ` Tomasz Figa
2018-08-28  8:11               ` Tomasz Figa
2018-09-07  7:54               ` Tomasz Figa
2018-09-07  7:54                 ` Tomasz Figa
2018-08-22  9:15     ` Maxime Ripard
2018-08-22  9:15       ` Maxime Ripard
2018-08-22  9:54       ` Tomasz Figa
2018-08-22  9:54         ` Tomasz Figa
2018-08-22 13:03         ` Paul Kocialkowski
2018-08-22 13:03           ` Paul Kocialkowski
2018-08-22 13:24           ` Tomasz Figa
2018-08-22 13:24             ` Tomasz Figa
2018-08-22 14:03             ` Nicolas Dufresne
2018-08-22 14:03               ` Nicolas Dufresne
2018-08-22 14:30             ` Paul Kocialkowski
2018-08-22 14:30               ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 2/9] media: cedrus: Add wrappers around container_of for our buffers Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21  9:03   ` Paul Kocialkowski
2018-06-21  9:03     ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 3/9] media: cedrus: Add a macro to check for the validity of a control Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21  9:13   ` Paul Kocialkowski
2018-06-21  9:13     ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 4/9] media: cedrus: make engine type more generic Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21  9:33   ` Paul Kocialkowski
2018-06-21  9:33     ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 5/9] media: cedrus: Remove MPEG1 support Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-13 14:07 ` [PATCH 6/9] media: cedrus: Add ops structure Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21  9:49   ` Paul Kocialkowski
2018-06-21  9:49     ` Paul Kocialkowski
2018-06-25 13:29     ` Maxime Ripard
2018-06-25 13:29       ` Maxime Ripard
2018-06-25 13:48       ` Paul Kocialkowski
2018-06-25 13:48         ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 7/9] media: cedrus: Move IRQ maintainance to cedrus_dec_ops Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21 15:35   ` Paul Kocialkowski
2018-06-21 15:35     ` Paul Kocialkowski
2018-06-25 14:18     ` Paul Kocialkowski
2018-06-25 14:18       ` Paul Kocialkowski
2018-06-25 16:15       ` Maxime Ripard
2018-06-25 16:15         ` Maxime Ripard
2018-06-25 15:38   ` Paul Kocialkowski
2018-06-25 15:38     ` Paul Kocialkowski
2018-06-25 15:49     ` Paul Kocialkowski
2018-06-25 15:49       ` Paul Kocialkowski
2018-06-25 19:01       ` Maxime Ripard
2018-06-25 19:01         ` Maxime Ripard
2018-06-27 17:58       ` Maxime Ripard
2018-06-27 17:58         ` Maxime Ripard
2018-06-13 14:07 ` [PATCH 8/9] media: cedrus: Add start and stop decoder operations Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-06-21 15:38   ` Paul Kocialkowski
2018-06-21 15:38     ` Paul Kocialkowski
2018-06-25 13:32     ` Maxime Ripard
2018-06-25 13:32       ` Maxime Ripard
2018-06-25 13:42       ` Paul Kocialkowski
2018-06-25 13:42         ` Paul Kocialkowski
2018-06-13 14:07 ` [PATCH 9/9] media: cedrus: Add H264 decoding support Maxime Ripard
2018-06-13 14:07   ` Maxime Ripard
2018-07-27 13:56   ` Paul Kocialkowski
2018-07-27 13:56     ` Paul Kocialkowski
2018-07-27 14:01     ` Chen-Yu Tsai
2018-07-27 14:01       ` Chen-Yu Tsai
2018-07-27 14:03       ` Paul Kocialkowski
2018-07-27 14:03         ` Paul Kocialkowski
2018-07-30 12:54   ` Paul Kocialkowski
2018-07-30 12:54     ` Paul Kocialkowski
2018-06-14 13:00 ` [PATCH 0/9] " Tomasz Figa
2018-06-14 13:00   ` Tomasz Figa
2018-06-14 16:37   ` Maxime Ripard
2018-06-14 16:37     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.