Commit Graph

14 Commits

Author SHA1 Message Date
Mark Thompson 2708c8e8ef hwcontext_vaapi: Set message callbacks on internally-created devices
The message callbacks are library-safe in libva2, so we can now use
them.
2017-10-25 00:01:41 +01:00
Elviss Strazdins 2017ffc18f vaapi: Add ABGR map only if VA_FOURCC_ABGR is defined
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-05-29 13:50:03 +02:00
Mark Thompson e791b915c7 hwcontext_vaapi: Try to support the VDPAU wrapper
The driver is somewhat bitrotten (not updated for years) but is still
usable for decoding with this change.  To support it, this adds a new
driver quirk to indicate no support at all for surface attributes.

Based on a patch by wm4 <nfxjfg@googlemail.com>.
2017-02-13 21:44:47 +00:00
Anton Khirnov fd9212f2ed Mark some arrays that never change as const. 2017-02-01 10:42:59 +01:00
Mark Thompson d30719e62d hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool 2016-11-26 18:03:05 +00:00
Mark Thompson 8ad9f9d675 hwcontext_vaapi: Frame mapping support
Can map to any supported software format (using a GPU copy if it
doesn't actually match the surface format underneath).
2016-11-03 23:49:05 +00:00
Mark Thompson eaaaabf6c9 hwcontext_vaapi: Enable P010 support
This is required for 10-bit surfaces.
2016-10-02 20:23:18 +01:00
Anton Khirnov 2124711b95 hwcontext_vaapi: add a quirk for the missing MemoryType attribute
The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.
2016-10-02 11:41:45 +02:00
Mark Thompson 121f34d5f0 hwcontext_vaapi: Try the first render node as the default DRM device
If no string argument is supplied when av_hwdevice_ctx_create() is
called to create a VAAPI device, we currently only try the default
X11 display (that is, $DISPLAY) to find a device, and will therefore
fail in the absence of an X server to connect to.  Change the logic
to also look for a device via the first DRM render node (that is,
"/dev/dri/renderD128"), which is probably the right thing to use in
most simple configurations which only have one DRM device.
2016-08-13 09:46:48 +01:00
Mark Thompson 4926fa9a4a hwcontext_vaapi: Add driver quirks to the hwdevice
The driver being used is detected inside av_hwdevice_ctx_init() and
the quirks field then set from a table of known device.  If this
behaviour is unwanted, the user can also set the quirks field
manually.

Also adds the Intel i965 driver quirk (it does not destroy parameter
buffers used in a call to vaRenderPicture()) and detects that driver
to set it.
2016-07-02 14:09:54 +01:00
Mark Thompson f62bb216ac hwcontext_vaapi: allow transfers to/from any size of sw frame
The hw frame used as reference has an attached size but it need not
match the actual size of the surface, so enforcing that the sw frame
used in copying matches its size exactly is not useful.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-06-28 08:32:11 +02:00
Mark Thompson fe498ef514 hwcontext_vaapi: Return all formats for constraints without config
No longer make a dummy device configuration to query.  Instead, just
return everything we recognise from the whole format list.  Also
change the device setup code to query that list only, rather than
intersecting it with the constraint output.

This makes hwupload more usable on mesa/gallium where the video
processor only declares support for RGB formats, making it unable to
deal with YUV formats before this patch.  It might introduce some
different trickier failures in the internal upload/download code
because the set of allowed formats there has changed, though I didn't
find any obvious regressions with i965.
2016-06-21 20:42:22 +01:00
Anton Khirnov b8bf9194af hwcontext_vaapi: implement device creation 2016-05-26 15:40:34 +02:00
Mark Thompson 551c6775ab lavu: VAAPI hwcontext implementation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-19 15:40:22 +01:00