Commit Graph

214 Commits

Author SHA1 Message Date
Paul Kocialkowski ca5198b429 Add support for the meson build system
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Paul Kocialkowski e29b04ccc7 autotools: Rewrite configuration in a minimalistic fashion
Drop the per-codec options while at it, since we'll soon include a copy
of the associated headers.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Paul Kocialkowski 518d7a0c59 Update and harmonize heading author lists
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Ralf Zerres 4855281abe video.c: update struct video_format field
- upstream changed formats.drm_modifier from
  DRM_FORMAT_MOD_ALLWINNER_MB32_TILED -> DRM_FORMAT_MOD_ALLWINNER_TILED

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2019-03-06 14:35:34 +01:00
Maxime Ripard 85a0f72f72 Merge pull request #9 from jernejsk/build_fix
Fix building with h264 enabled
2018-11-16 16:48:59 +00:00
Jernej Skrabec a816436baf config: fix building with h264 enabled
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
2018-10-31 18:10:47 +01:00
Maxime Ripard e62c2d1c8e Merge pull request #8 from ezequielgarcia/fixes
Three different, completely unrelated fixes/improvements
2018-10-16 14:53:12 +00:00
Ezequiel Garcia 59cd32bc42 Fix single planar QBUF ioctl
Commit 7ff2543e64 ("Add support for the single-planar V4L2 API")
missed the VIDIOC_QBUF bytesused parameter. The kernel will
warn loudly if bytesused is not properly defined for an OUTPUT buffer.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2018-10-12 16:42:02 -03:00
Ezequiel Garcia 2c27ec3794 Add settable attributes to pixelformats
Apparently, pixelformats are expected to be settable although
the reason is not exactly clear to me.

However, intel vaapi driver sets all its pixelformats as
settable, and gstreamer-vaapi expects that as well.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2018-10-12 16:13:05 -03:00
Ezequiel Garcia b2944629fa Add support for dynamic detection of supported codecs
H.264 and H.265 support is still not supported upstream,
so it makes sense to autodetect each codec and only
enable those that are supported.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2018-10-12 16:11:06 -03:00
Thomas Petazzoni 3e442a19b6 CREDITS: add Albin Söderqvist
Albin did not had an account on Kickstarter initially, so he was
registered as GuestXYZ. Upon his request, add his real name.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-08 08:51:51 +02:00
Paul Kocialkowski 7ff2543e64 Add support for the single-planar V4L2 API
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-09-07 16:43:13 +02:00
Paul Kocialkowski 25a8ac4d7e Register video format directly instead of tiled indicator
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-09-07 12:58:44 +02:00
Maxime Ripard 8857fc7019 Merge pull request #6 from tpetazzoni/credits
Add CREDITS file
2018-09-05 07:43:03 +00:00
Maxime Ripard 26454b70a6 Merge pull request #4 from tpetazzoni/minor-doc-updates
Minor doc updates
2018-09-05 07:42:35 +00:00
Thomas Petazzoni d53335bbc8 Add CREDITS file
As promised by Bootlin's Kickstarter campaign, all contributors above
16 EUR would get their name in the CREDITS file. This commit
implements the promised CREDITS file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-04 12:05:10 +02:00
Thomas Petazzoni 128936588f Update AUTHORS file with Maxime and Paul
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-02 21:54:52 +02:00
Thomas Petazzoni c71e16a141 Update README.md to mention H265 support
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-02 21:54:18 +02:00
Paul Kocialkowski 13eaae060e Add support for H265 decoding, including predictive frames
Some features are missing, such as scaling lists (quantization) and
10-bit output.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-31 10:13:52 +02:00
Paul Kocialkowski 1c009e64d5 media: Adapt for the latest Request API
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-28 10:39:41 +02:00
Paul Kocialkowski 5fd5c9823b mpeg2: Update to match latest definitions
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-09 14:13:19 +02:00
Paul Kocialkowski e96e5f392a request: Check required v4l2 capabilities after opening the video node
Since our use of the v4l2 API has some assumptions on the available
userspace APIs, check the capabilities reported by the driver to make
sure they are supported.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-06 16:44:37 +02:00
Paul Kocialkowski 57999e3883 v4l2: Add support for querying capabilities
This adds a helper function to query v4l2 capabilities, returning
either the device caps when available or the general device caps
otherwise.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-06 16:38:48 +02:00
Paul Kocialkowski 7d1ac10517 Add support for MPEG2 quantization matrices
This adds support for MPEG2 quantization matrices, which are optional
given that fallback default matrices are used (on the kernel side) when
no such matrix is provided.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-25 14:36:36 +02:00
Paul Kocialkowski 815f38a6a7 Remove stray empty template file
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-25 14:19:10 +02:00
Paul Kocialkowski c9327dd55a Grab the base index when allocating buffers and mapping them
Because there might be more than a single call to CreateSurfaces,
we cannot assume that the index relative to the number of surfaces
requested in a single call matches the v4l2 index.

Grab the base index (as returned by the kernel) when allocating
buffers and use it for memory mapping and addressing them in v4l2.
This avoids memory-mapping the first (index 0) buffer multiple times
in that scenario instead of the n-th allocated buffer (in the n-th
call in the sequence).

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:48:51 +02:00
Paul Kocialkowski 3b0e7dbf12 surface: Avoid unitialized variable compiler warning
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:47:48 +02:00
Paul Kocialkowski fa7ab6a251 context: Liberate output and capture buffers at ContextDestroy
The V4L2 API does not currently provide a way to liberate allocated
buffers one by one (which would fit well with DestroySurfaces in
VAAPI). Moreover, streaming needs to be off before liberating
buffers is allowed.

As a result, output an capture buffers can only be liberated when
destroying the decoding context, all at once, such as implemented
in this patch.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:47:48 +02:00
Paul Kocialkowski 72c22a3bce v4l2: Introduce helper to request buffers
Although this is not needed when using the combination of CREATE_BUFS and
QUERYBUF V4L2 ioctls (as currently done) to allocate and prepare buffers,
the REQBUF ioctl is useful to liberate the buffers after use.

This introduces a helper for this purpose.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:47:48 +02:00
Paul Kocialkowski d2357862f8 Rename request_buffer helper to query_buffer
Since the V4L2 ioctl is called QUERYBUF, it makes more sense to
call the associated function with the same name.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:47:48 +02:00
Paul Kocialkowski c2fb5683cf surface: Remove duplicate request fd close
This removes a duplicate conditional close of the request fd.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-20 13:47:48 +02:00
Paul Kocialkowski c764527c17 Add support for QuerySurfaceAttributes
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 15:07:42 +02:00
Paul Kocialkowski 7587ef6901 surface: Add ExportSurfaceHandle support for dma-buf export
This is the latest version of dma-buf export, that does support
specifying DRM modifiers.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 15:02:37 +02:00
Paul Kocialkowski 48a6e0a7ef fixup! buffer: Add Acquire/ReleaseBufferHandle support for dma-buf export 2018-07-18 14:55:06 +02:00
Paul Kocialkowski c3400478ff fixup! v4l2: Add helper for exporting with dma-buf 2018-07-18 14:54:47 +02:00
Paul Kocialkowski 019a0ccb42 buffer: Add Acquire/ReleaseBufferHandle support for dma-buf export
This is the first version of dma-buf export, that does not support
specifying a DRM modifier.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:51:11 +02:00
Paul Kocialkowski 7a72782612 request: Reorder BufferInfo
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:46:47 +02:00
Paul Kocialkowski 9a4693ca0d buffer: Store derived surface id and buffer info for dma-buf export
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:46:26 +02:00
Paul Kocialkowski 2543041a18 image: Replace buffer ID with full VAImage structure
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:40:36 +02:00
Paul Kocialkowski 4cf9400dc2 v4l2: Add helper for exporting with dma-buf
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:40:36 +02:00
Paul Kocialkowski 793a29d668 image: Mark unimplemented functions as such
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:40:36 +02:00
Paul Kocialkowski 829abae895 surface: Add basic support for CreateSurfaces2
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:40:36 +02:00
Maxime Ripard 3119125a2a tree: add the driver_data parameter to the IMAGE macro as well
The IMAGE macro takes an implicit driver_data argument. In order to make
it obvious that we need it, let's put it as an explicit parameter.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-18 14:37:33 +02:00
Paul Kocialkowski b4605a08bd README: Update supported codecs
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-17 17:49:17 +02:00
Maxime Ripard 4173013493 libva: Change the vendor string
The vendor string needs to be updated to match the new name. Do so.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 59c4a6e034 libva: Change the environment variables name
Change the environment variables for the media and video path to match the
libva name.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 4dbfe44c9b README: Update with the new name
Convert the README to the new name for the libva.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 22e0c6c3e1 tree: Rename the libva name for real
Change the autotools files, and with them the name of the libva.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 791428e2c0 buffer: Remove the sunxi_cedrus_destroy buffer prototype
That function isn't defined anywhere, remove its prototype.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 92f6546596 tree: Remove void * casts
void * can be assigned from and stored to any pointer type without any
warning. Remove the explicit casts.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00