Experimental VDPAU for Allwinner sunxi SoCs (WiP)
C Assembly Makefile
Switch branches/tags
Clone or download
rellla Fix pixman blit
We have to compose the src_rgba over the dst_rgba and
drop dst_rgba information in case dst_rgba needs a clear.
If no clearing is needed, do a blit including the alpha value.
Without this fix, old rgba surfaces may stay visible on screen.
Latest commit ebdf784 Feb 9, 2017
Permalink
Failed to load latest commit information.
kernel-headers Use libcedrus Feb 16, 2016
.gitignore First release Aug 28, 2013
Makefile Add CPU fallback for G2D Feb 24, 2016
README.md Update readme Jul 4, 2016
decoder.c Fix VdpVideoSurfaceGetBitsYCbCr on H3 and newer Dec 17, 2016
device.c Add CPU fallback for G2D Feb 24, 2016
h264.c Remove unneeded reconstruct buffer Dec 17, 2016
h265.c Fix some H.265 parameters Mar 9, 2016
handles.c Make handle table thread-safe Nov 25, 2014
mpeg12.c Remove unneeded reconstruct buffer Dec 17, 2016
mpeg4.c Remove unneeded reconstruct buffer Dec 17, 2016
presentation_queue.c Add OSD support for A33/A80 Feb 24, 2016
rgba.c Add CPU fallback for G2D Feb 24, 2016
rgba.h Only flush cache of rgba_surface data when needed Mar 8, 2014
rgba_g2d.c Add CPU fallback for G2D Feb 24, 2016
rgba_g2d.h Add CPU fallback for G2D Feb 24, 2016
rgba_pixman.c Fix pixman blit Feb 10, 2017
rgba_pixman.h Add CPU fallback for G2D Feb 24, 2016
sunxi_disp.c Use libcedrus Feb 16, 2016
sunxi_disp.h add support of a33 Dec 31, 2015
sunxi_disp1_5.c Add OSD support for A33/A80 Feb 24, 2016
sunxi_disp2.c Add OSD support for H3 Feb 24, 2016
surface_bitmap.c Simplify handle creation Nov 25, 2014
surface_output.c Simplify handle creation Nov 25, 2014
surface_video.c Remove unneeded reconstruct buffer Dec 17, 2016
tiled_yuv.S Add A64 support Feb 29, 2016
tiled_yuv.h Add VideoSurface get_bits_y_cb_cr for YV12 and NV12 Nov 4, 2014
vdpau_private.h Remove unneeded reconstruct buffer Dec 17, 2016
video_mixer.c Use libcedrus Feb 16, 2016

README.md

About

libvdpau-sunxi is a [VDPAU] (ftp://download.nvidia.com/XFree86/vdpau/doxygen/html/index.html) backend driver for Allwinner based (sunxi) SoCs.

It is based on the [reverse engineering effort] (http://linux-sunxi.org/Cedrus) of the [linux-sunxi] (http://linux-sunxi.org) community. It does neither depend on code, which was released by Allwinner, nor does it act like a wrapper around some precompiled binary libraries. libvdpau-sunxi is a clean implementation, that is based on reverse engineering.

It currently supports decoding of MPEG1 and MPEG2, some limited MPEG4 types and H.264. On H3/A64 it also decodes H.265. It also supports all the basic features of the VDPAU API - including presentation. As this is WorkInProgress, not all features are implemented yet. Some of them probably will never get fully supported due to hardware specific limitations.

Requirements:

Installation:

$ make
$ make install

Usage:

$ export VDPAU_DRIVER=sunxi
$ mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all [filename]

Note: Make sure that you have write access to both /dev/disp and /dev/cedar_dev

OSD Support:

OSD support is available either

  • via G2D mixer processor (hardware accelerated) on A10/A20 or
  • via pixman (CPU/Neon based) on H3/A33/A80/A64.

To enable OSD support for e.g. subtitles or GUI, set VDPAU_OSD environment variable to 1:

$ export VDPAU_OSD=1

To disable G2D mixer processor usage (for debugging purposes and forcing pixman usage on A10/A20), set VDPAU_DISABLE_G2D environment variable to 1:

$ export VDPAU_DISABLE_G2D=1

If using G2D (A10/A20), make sure to have write access to /dev/g2d.

Limitations:

  • Output bypasses X video driver by opening own disp layers. You can't use Xv from fbturbo at the same time, and on H3 the video is always on top and can't be overlapped by other windows.
  • OSD partly breaks X11 integration due to hardware limitations. The video area can't be overlapped by other windows. For fullscreen use this is no problem.
  • There is no [OpenGL interoperation feature] (https://www.opengl.org/registry/specs/NV/vdpau_interop.txt) because we are on ARM and only have OpenGL/ES available.