[vlc-devel] [PATCH 0/6] OpenGL video filters

Alexandre Janniaux ajanni at videolabs.io
Thu Feb 25 11:59:43 UTC 2021


So for the time being, I suggest:

 - only activate egl_pbuffer for android (which has
   EGL_KHR_display_reference) until situation where
   the implementation is crashing on linux EGL are
   fixed.

 - merge the GBM platform support later to activate
   for linux too.

 - ensure later that no clients are using gl->window
   except the vlc_gl_t providers themselves.

 - refactor afterwards to move the potential clients
   of things like window to the Activation function.

So that the core stays stable.

Is that ok for everyone?

Regards,
--
Alexandre Janniaux
Videolabs

On Tue, Feb 23, 2021 at 05:06:08PM +0100, Romain Vimont wrote:
> Last year, we merged an API to write OpenGL filters:
> https://mailman.videolan.org/pipermail/vlc-devel/2020-July/135096.html
>
> However, we could not run them as a video filter yet.
>
> This patchset introduces:
>  - an OpenGL offscreen API (to create an "offscreen" vlc_gl_t)
>  - an implementation based on EGL pbuffer
>  - a VLC video filter (opengl.c) used to run "OpenGL filters"
>  - a mock filter to test
>
> A filter may be run as follow:
>
>     ./vlc --dec-dev=none file.mkv --video-filter='opengl{filter=mock}'
>     ./vlc --dec-dev=none file.mkv --video-filter=opengl --opengl-filter=mock
>
> Several "opengl" video filter instances may be chained:
>
>     ./vlc --dec-dev=none file.mkv --video-filter='opengl{filter=mock{mask,speed=1}}:opengl{filter=mock{angle=180,speed=-1}}'
>
> But a single one could also chain several OpenGL filters (with better
> performance):
>
>     ./vlc --dec-dev=none file.mkv --video-filter='opengl{filter="mock{mask,speed=1}:mock{angle=180,speed=-1}"}'
>
> Note that the OpenGL offscreen implementation with EGL pbuffers does not offer
> good performances, because it downloads the filter result to the CPU. It just
> allows to test easily. Further patches will add support for GBM platform, and
> we'll also submit other implementations later handling opaque formats.
>
> If you have problems running it, you might need to set EGL_PLATFORM=x11 (if you
> use X11).
>
> Regards
>
> Branch: https://code.videolan.org/rom1v/vlc/-/commits/video_filter_opengl
>
> Alexandre Janniaux (3):
>   opengl: add CreateOffscreen API
>   video_filter: add egl_pbuffer filter plugin
>   video_filter: add opengl filter executor
>
> Romain Vimont (3):
>   opengl: replace runtime check by assertion
>   opengl: add vflip option to "draw" filter
>   opengl: add mock filter
>
>  include/vlc_opengl.h                      |  26 +-
>  modules/video_filter/Makefile.am          |  29 ++
>  modules/video_filter/egl_pbuffer.c        | 470 ++++++++++++++++++++++
>  modules/video_filter/opengl.c             | 327 +++++++++++++++
>  modules/video_output/opengl/Makefile.am   |  35 ++
>  modules/video_output/opengl/filter_draw.c |  22 +-
>  modules/video_output/opengl/filter_draw.h |  10 +-
>  modules/video_output/opengl/filter_mock.c | 411 +++++++++++++++++++
>  modules/video_output/opengl/gl_api.c      |   3 +
>  modules/video_output/opengl/gl_common.h   |  17 +
>  src/libvlccore.sym                        |   1 +
>  src/video_output/opengl.c                 |  54 +++
>  12 files changed, 1399 insertions(+), 6 deletions(-)
>  create mode 100644 modules/video_filter/egl_pbuffer.c
>  create mode 100644 modules/video_filter/opengl.c
>  create mode 100644 modules/video_output/opengl/filter_mock.c
>
> --
> 2.30.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list