- Mar 18, 2020
-
-
Romain Vimont authored
The video_format_t parameter of vout_display_opengl_Display() is not used anymore. Remove it.
-
Romain Vimont authored
Texture paddings were computed in _Display(), while the picture format is known in _Prepare(). This will allow to remove the video_format_t parameter of _Display().
-
Romain Vimont authored
It will be modified to depend on static functions. Move it below them. This will make the diff more readable.
-
Romain Vimont authored
After the previous changes, two successive loops iterating tex_count times can now be merged into one.
-
Romain Vimont authored
The multiview mode (stereo) was applied by changing the texture paddings to crop only the left eye. The problem is that these texture paddings are specific to the input picture, while the stereo mode is specific to the renderer, which should be independent of the input picture. To separate these concerns, apply the stereo mode using a matrix to transform the texture coordinates from the renderer.
-
Romain Vimont authored
Apply all texture coordinates transformation in the fragment shader. This is necessary to be able to implement a renderer independent of the input picture (i.e. without even knowing the details) by using a single GLSL function "vlc_texture(vec2 pic_coords)".
-
Romain Vimont authored
Now that the coordinates are independant of paddings (which are transmitted via a separate transform matrix), there is no need to recompute them when the paddings change.
-
Romain Vimont authored
A picture is stored in OpenGL textures (one per plane), possibly with padding (the texture may be larger than the actual picture). The conversion from picture coordinates to texture coordinates (which takes the padding into account) was applied on the input coordinates, before the vertex shader. As a consequence, the vertex shader received one vector of input texture coordinates per plane (the padding is not necessarily the same for all the planes): (before this commit) picture texture coords coords (attributes) (varyings) (1 per plane) (x0, y0) --> MultiTexCoord0 TexCoord0 fragment (x,y) --> (x1, y1) --> MultiTexCoord1 --> TexCoord1 --> shader (x2, y2) --> MultiTexCoord2 TexCoord2 This poses a problem to separate chroma conversion from rendering: the renderer should be able to retrieve a pixel color in picture coordinates, regarless of the input format or padding. To solve this issue, pass the picture coordinates instead of the texture coordinates as attribute, and initialize uniform matrices to convert from picture to texture coordinates for each plane directly in the fragment shader: (after this commit) picture coords (attribute) (varying) (x,y) --> PicCoordsIn --> PicCoords --> fragment shader ^^^ ||| TexCoordsMap0 --'|| (uniforms) TexCoordsMap1 ---'| TexCoordsMap2 ----' Note that this also changes the multiplication order of (non-commutative) matrices, from (semantically): TexCoords = Orientation * TexCoordsMap * PicCoords to: TexCoords = TexCoordsMap * Orientation * PicCoords The latter is the correct one: the orientation defines how the input picture is rotated, so it must apply to picture coordinates, regardless of the actual coordinates in the texture. As a side effect, BuildRectangle, BuildSphere and BuildCube are now independant of both the number of planes and any texture padding. For now, TexCoordsMap is computed from the renderer, but the goal is to move it to a separate component (a "sampler").
-
Romain Vimont authored
Expose in vlc_gl_api whether it supports non-power of 2 textures.
-
Romain Vimont authored
The fields is_gles and glexts (extensions) are not specific to interop, and may be useful without an interop instance.
-
Romain Vimont authored
Pass the whole structure (which will have new fields soon) to interop and renderers, instead of the virtual table only.
-
Romain Vimont authored
Use a separate component for storing OpenGL API-specific utils (for now, only the vtable).
-
Romain Vimont authored
The opengl_vtable_t is used only if USE_OPENGL_ES2 is not defined. Declare it inside the ifdef-block.
-
Romain Vimont authored
Expose a single function to create an OpenGL program for a vertex shader and a fragment shader. This simplify the code, and handles the errors in the same way everywhere.
-
- Mar 17, 2020
-
-
Romain Vimont authored
OpenGL ES 2 does not necessarily define all these constants, but supports them as extensions.
-
François Cartegnie authored
-
François Cartegnie authored
-
François Cartegnie authored
-
François Cartegnie authored
-
François Cartegnie authored
-
Steve Lhomme authored
That could be used for testing leak regressions
-
Steve Lhomme authored
No need to load the same resources twice. We hold a reference to the decoder device with these objects.
-
Steve Lhomme authored
If the decoder device doesn't match we shouldn't be using this decoder anyway.
-
This reverts commit 77aa424b. The replacement was not equivalent: strncmp(a, b, strlen(b)) == 0 # test if a starts with b strcmp(a, b) == 0 # test if a equals b In practice, it breaks OpenGL on Android when the vout_modules contains "gles2,none". Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
-
The macro assumed a local variable vgl existed, which is not always the case. Instead, pass a pointer to the opengl_vtable_t as parameter. Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
-
Steve Lhomme authored
The variable already already exists. If it doesn't exist the var_SetString("window", "qt,any") should fail as the UI won't work properly anymore.
-
Steve Lhomme authored
The variable already exists in libvlc. If for some reason the variable is removed from libvlc this test should fail as it's setting a variable that will no longer be used.
-
Steve Lhomme authored
No functional changes
-
Steve Lhomme authored
The StretchRect we're using has the same issue as with the D3D9 vout.
-
Steve Lhomme authored
-
Steve Lhomme authored
-
Steve Lhomme authored
It shares nothing with the D3D9 module and will never be loaded at the same time. No functional changes.
-
- Mar 16, 2020
-
-
Thomas Guillem authored
-
Thomas Guillem authored
-
Thomas Guillem authored
-
Thomas Guillem authored
From the spec: "There are no restrictions upon the order of the chunks within a WAVE file, with the exception that the Format chunk must precede the Data chunk." The Wav demuxer can now parse chunks in any order. I don't check that the fmt chunk is before the data one in order to be more resilient to broken samples. This commit will allow to add new chunks more easily, specially chunks that can be after the 'data' one. I'm thinking about the ADM support, that need 2 chunks, 'chna' and 'axml' that is after the 'data' chunk.
-
Thomas Guillem authored
Use the same type than GetDWLE() that returns an uint32_t.
-
Thomas Guillem authored
-
Thomas Guillem authored
Use the same type than vlc_stream_Tell().
-
Thomas Guillem authored
-