[vlc-devel] [PATCH 00/12] OpenGL: refactor, move fragment shader configuration

Thomas Guillem thomas at gllm.fr
Mon Dec 12 17:03:41 CET 2016


Hi,

This set of patches is a prerequisite to add support for new VLC chroma in
OpenGL. For that, I did a lot of clean-up and moved a lot of codes:

 - Drop OpenGL* 1 and fixed pipeline support
 - Move main openGL sources into a seperate directory:
    - video_output/opengl.c/h -> video_output/opengl/vout_helper.c/h
    - video_output/gl.c -> video_output/opengl/display.c (since this is a
    "vout display" module)
    - video_output/egl.c -> video_output/opengl/egl.c
 - Move all GL function pointers to a new header: allow to use GL API from an
   external file
 - Add a new struct: opengl_fmt_cfg_t: configure a fragment shader in function
   of a video_format_t
 - Move YUV and XYZ12 fragment shader configuration

The next step is to add support for VLC_ANDROID_OPAQUE format (a proof of
concept can be found here
https://github.com/tguillem/vlc/commit/c19b345b5d53845be443df6c3fbac64e538b0d4b).

For that feature, I'll have to add 2 new callbacks in opengl_fmt_cfg_t:
  - One callback to override the texture upload
  - One callback to override the picture pool allocation

Regards,
Thomas

Thomas Guillem (13):
  vout: drop OpenGL 1.x and OpenGL ES 1 support
  vout/opengl: always support shaders
  vout/opengl: fix leak if program check fails
  vout/opengl: fix an unlikely null dereference
  vout/opengl: use msg_Err for errors
  vout: move OpenGL sources
  vout: move gl.c to opengl/display.c
  vout: move egl.c to opengl/egl.c
  vout/opengl: build and use only needed shaders/programs
  vout/opengl: remove unused vgl->local_count
  vout/opengl: expose gl API in an internal header
  vout/opengl: add a new API to configure fragment shaders
  vout/opengl: move YUV/XYZ12 fragment shader configuration

 configure.ac                                       |    2 -
 extras/package/snap/snapcraft.yaml                 |    2 -
 modules/MODULES_LIST                               |    1 -
 modules/video_output/Makefile.am                   |   44 +-
 modules/video_output/caopengllayer.m               |    2 +-
 modules/video_output/ios2.m                        |    2 +-
 modules/video_output/macosx.m                      |    2 +-
 modules/video_output/opengl/common_formats.c       |  318 ++++++
 modules/video_output/{gl.c => opengl/display.c}    |   18 +-
 modules/video_output/{ => opengl}/egl.c            |    0
 modules/video_output/opengl/internal.h             |  188 ++++
 .../{opengl.c => opengl/vout_helper.c}             | 1019 +++++++-------------
 .../{opengl.h => opengl/vout_helper.h}             |   23 +-
 modules/video_output/win32/common.h                |    2 +-
 modules/video_output/win32/glwin32.c               |    2 +-
 modules/video_output/win32/wgl.c                   |    2 +-
 po/POTFILES.in                                     |    4 +-
 17 files changed, 900 insertions(+), 731 deletions(-)
 create mode 100644 modules/video_output/opengl/common_formats.c
 rename modules/video_output/{gl.c => opengl/display.c} (93%)
 rename modules/video_output/{ => opengl}/egl.c (100%)
 create mode 100644 modules/video_output/opengl/internal.h
 rename modules/video_output/{opengl.c => opengl/vout_helper.c} (59%)
 rename modules/video_output/{opengl.h => opengl/vout_helper.h} (88%)

-- 
2.10.2



More information about the vlc-devel mailing list