Commits on Source (15)
-
The "config" argument is used.
dfacd74f -
A sampler can be initialized in two ways: with or without an interop. In both cases, it needs the number of input textures and their sizes. When initialized from vlc_gl_sampler_NewFromInterop(), the number of textures and their sizes were set immediately. However, when initialized from vlc_gl_sampler_NewFromTexture2D(), the number of textures was re-computed indirectly from the chroma, and the texture sizes were updated on each picture (even if they are constant). To unify the behavior, always initialize the number of textures and their sizes on sampler creation. This paves the way to move the interop out of the sampler.
f22ddc78 -
This will allow OpenGL filters to handle OpenGL textures directly (currently, they can only receive the input picture content in GLSL via vlc_texture()).
3f5a7f5e -
Replace the private sampler fields related to OpenGL format by a public instance of the struct vlc_gl_format introduced recently. This prepares further refactors.
877f10e0 -
Replace the private sampler fields related to OpenGL format by an instance of the struct vlc_gl_picture introduced recently. This prepares further refactors.
7404ddbf -
A sampler was responsible for exposing a VLC picture_t as an RGBA picture, via a vlc_texture() GLSL function. Extract part of its responsibilities to an "importer", to prepare its split into two parts: 1. importing a picture_t to textures (via an interop), handling the necessary coordinates transformations; 2. expose input textures as a single RGBA texel, by handling texture access, swizzle and chroma conversion internally. This will allow OpenGL filters to: - bind and read the raw input textures directly; - generate chroma conversion GLSL code for any vlc_gl_picture with a given vlc_gl_format (not only for input VLC pictures). As a first step, the importer is internal to the sampler, to split without impacting the sampler API.
013d995b -
This makes the sampler independent of interop and importer. Instead, it is created from a vlc_gl_format, and receive instances of vlc_gl_picture.
712808c1 -
This will allow to pass the format to the Open() function of OpenGL filters modules.
af808745 -
Pass the input format to the Open() function of OpenGL filter modules.
dc8af6c2 -
Pass an OpenGL picture to the draw() callback of OpenGL filter modules.
dd3d2078 -
Now that filters have access to the input vlc_gl_picture, move the transform to convert from picture coordinates to texture coordinates to the picture. It is independent of the sampler.
4c41c138 -
This will allow filters to create their own sampler (a vlc_gl_t instance is necessary).
f202ba92 -
This will allow filters to access the format easily from the callbacks.
5f8aad2e -
Some sampler functions were private and only used internally by the filter engine. Expose them publicly so that filters could create and manage their own sampler.
27adc90f -
A sampler now allows to handle chroma conversion from any OpenGL picture provided by the filter. It can be the input picture directly (most of the time), or any picture produced by the filter itself. Therefore, make the sampler a simple helper for filters, independent of the filter engine.
c1770ffc
Showing
- modules/video_filter/deinterlace/glblend.c 25 additions, 9 deletionsmodules/video_filter/deinterlace/glblend.c
- modules/video_output/opengl/Makefile.am 6 additions, 2 deletionsmodules/video_output/opengl/Makefile.am
- modules/video_output/opengl/filter.c 13 additions, 10 deletionsmodules/video_output/opengl/filter.c
- modules/video_output/opengl/filter.h 5 additions, 28 deletionsmodules/video_output/opengl/filter.h
- modules/video_output/opengl/filter_draw.c 19 additions, 6 deletionsmodules/video_output/opengl/filter_draw.c
- modules/video_output/opengl/filter_mock.c 41 additions, 20 deletionsmodules/video_output/opengl/filter_mock.c
- modules/video_output/opengl/filter_priv.h 13 additions, 15 deletionsmodules/video_output/opengl/filter_priv.h
- modules/video_output/opengl/filters.c 91 additions, 90 deletionsmodules/video_output/opengl/filters.c
- modules/video_output/opengl/importer.c 424 additions, 0 deletionsmodules/video_output/opengl/importer.c
- modules/video_output/opengl/importer.h 46 additions, 0 deletionsmodules/video_output/opengl/importer.h
- modules/video_output/opengl/importer_priv.h 78 additions, 0 deletionsmodules/video_output/opengl/importer_priv.h
- modules/video_output/opengl/picture.c 82 additions, 0 deletionsmodules/video_output/opengl/picture.c
- modules/video_output/opengl/picture.h 146 additions, 0 deletionsmodules/video_output/opengl/picture.h
- modules/video_output/opengl/renderer.c 29 additions, 17 deletionsmodules/video_output/opengl/renderer.c
- modules/video_output/opengl/sampler.c 52 additions, 562 deletionsmodules/video_output/opengl/sampler.c
- modules/video_output/opengl/sampler.h 29 additions, 74 deletionsmodules/video_output/opengl/sampler.h
- modules/video_output/opengl/sampler_priv.h 0 additions, 110 deletionsmodules/video_output/opengl/sampler_priv.h
- modules/video_output/opengl/vout_helper.c 0 additions, 2 deletionsmodules/video_output/opengl/vout_helper.c
modules/video_output/opengl/importer.c
0 → 100644
modules/video_output/opengl/importer.h
0 → 100644
modules/video_output/opengl/importer_priv.h
0 → 100644
modules/video_output/opengl/picture.c
0 → 100644
modules/video_output/opengl/picture.h
0 → 100644