- Jan 27, 2020
-
-
Romain Vimont authored
Extract the main rendering into a separate component.
-
Romain Vimont authored
Some renderer clean up was done after the call to DeleteRenderer(). Move it to DeleteRenderer to simplify further refactorings.
-
Romain Vimont authored
Some renderer initialization was done after the call to CreateRenderer(). Move it to CreateRenderer to simplify further refactorings.
-
Romain Vimont authored
Replace opengl_init_program() and opengl_deinit_program() by CreateRenderer() and DeleteRenderer(), independant of vout_display_opengl_t.
-
Romain Vimont authored
Use struct vlc_gl_renderer directly instead of vout_display_opengl_t when possible. This paves the way to extract the renderer into a separate component.
-
Romain Vimont authored
The field is an array of textures.
-
Romain Vimont authored
Move fields related to the renderer from vout_display_opengl_t to vlc_gl_renderer. This paves the way to move rendering to a separate renderer component.
-
Romain Vimont authored
The struct prgm contains some locations of the program, the struct vlc_gl_renderer contains some others. There are no reason to keep two separate structures.
-
Romain Vimont authored
Rename renderer callbacks from tc_ to renderer_. There is no tex converter (tc) anymore.
-
Romain Vimont authored
The opengl_tex_converter_t is not a converter anymore: it is only used to communicate between the renderer (currently managed in vout_helper.c) and the fragment shader generation code (fragment_shaders.c).
-
Romain Vimont authored
The field was used only from vout_display_opengl_New().
-
Romain Vimont authored
The vout_helper now only manages the rendering of the "main" pictures, so it never renders subpictures anymore (this has been moved to vlc_gl_sub_renderer).
-
Romain Vimont authored
Extract the subpictures rendering into a separate component, using its own simplified vertex and fragment shaders. This simplifies vout_helper.c.
-
Romain Vimont authored
The functions GenTextures() and DelTextures() apply to interop, move them to the relevant file.
-
Romain Vimont authored
These util functions will be called from other files.
-
Romain Vimont authored
This util function will be called from other files.
-
Romain Vimont authored
Move subpictures rendering to separate functions.
-
Romain Vimont authored
Expose functions to create and delete a vlc_gl_interop. This avoids the callers to handle internal details about interop creation and destruction.
-
Romain Vimont authored
Extract interop creation into a separate function. This will allow to create an interop without an opengl_tex_converter_t.
-
Romain Vimont authored
Do not pass extensions to opengl_init_program(). This was an optimization not to retrieve the extensions list twice. However, since the initialization will be moved into a separate component (the renderer), we don't want to expose this internal detail.
-
Romain Vimont authored
-
Romain Vimont authored
Use a callback to close an interop instead of relying on closing the module. This allows to properly close interop_sw, which is not a module.
-
Romain Vimont authored
Since vlc_gl_interop has been introduced, the fragment shader is built by vout_helper instead of the converter module. Therefore, there is no need to keep it exposed in the opengl_tex_converter_t instance.
-
Romain Vimont authored
-
Use the global conversion matrix to swap U/V components at the same time.
-
The conversion matrix combines several transformations, it does not contain "YUV coefficients".
-
Directly initialize the conversion matrix in place in column-major order. Note: We could not just pass GL_TRUE to the transpose parameter of glUniformMatrix4fv, because it is not supported on OpenGL ES 2: > GL_INVALID_VALUE is generated if transpose is not GL_FALSE. <https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glUniform.xml>
-
Apply the range conversion via the conversion matrix.
-
Construct chroma conversion matrices programmatically, from the luma weight of the R, G and B components. This allows to combine (multiply) matrices and paves the way to properly support full color range (for now, the range is hardcoded to COLOR_RANGE_LIMITED to match the previous implementation).
-
Use native matrix multiplication to apply the chroma conversion. Concretely, the generated fragment shader looked like: uniform vec4 Coefficients[4]; uniform vec4 FillColor; void main(void) { float val;vec4 colors; colors = texture2D(Texture0, TexCoord0); val = colors.r; vec4 color0 = vec4(val, val, val, 1); colors = texture2D(Texture1, TexCoord1); val = colors.r; vec4 color1 = vec4(val, val, val, 1); val = colors.g; vec4 color2 = vec4(val, val, val, 1); vec4 result = (color0 * Coefficients[0]) + Coefficients[3]; result = (color1 * Coefficients[1]) + result; result = (color2 * Coefficients[2]) + result; result = _main_0_0(result); gl_FragColor = result * FillColor; } Now, it looks like: uniform mat4 ConvMatrix; uniform vec4 FillColor; void main(void) { vec4 texel; vec4 pixel = vec4(0.0, 0.0, 0.0, 1.0); texel = texture2D(Texture0, TexCoord0); pixel[0] = texel.r; texel = texture2D(Texture1, TexCoord1); pixel[1] = texel.r; pixel[2] = texel.g; vec4 result = ConvMatrix * pixel; result = _main_0_0(result); gl_FragColor = result * FillColor; }
-
In case the texture format is GL_LUMINANCE, swizzle_per_tex was set to {NULL, "xa"}. Using NULL instead of an explicit swizzle ("x") was a small optimization to assign the texel value directly: vec4 color0 = texture2D(Texture0, TexCoord0); instead of using the general code generation: colors = texture2D(Texture0, TexCoord0); val = colors.x; vec4 color0 = vec4(val, val, val, 1); This was possible because the texture exposes the luminance value in its three components: (L, L, L, 1). But this special case will disappear when we will rewrite the chroma conversion using matrix multiplication directly (instead of computing its steps separately). This simplifies the logic of the code, and paves the way to refactor chroma conversion more easily.
-
-
Steve Lhomme authored
List the supported codecs.
-
Steve Lhomme authored
It's now reported via the viewpoint_moved callback.
-
amem now supports three formats: S16N, S32N and FL32. Signed-off-by: Farid Hammane <farid.hammane@gmail.com> Signed-off-by: Thomas Guillem <thomas@gllm.fr>
-
Thomas Guillem authored
Avoid double rotation from MediaCodec and interop_android. This fixes 90° videos that are flipped horizontally with the recent vout_helper changes.
-
Thomas Guillem authored
No functional changes, will be used by the next commit.
-
The orientation matrix must be applied on the input coordinates, before the (internal) Android transformation, which depends on how the texture is actually stored. For example, if the orientation matrix represents a vertical flip, "vertical" is only meaningful on the input coordinates (if the Android transformation rotates by 90°, the vertical flip would result in an horizontal flip instead). The first version was actually correct: <https://mailman.videolan.org/pipermail/vlc-devel/2019-December/130153.html > Signed-off-by: Thomas Guillem <thomas@gllm.fr>
-
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
-
Steve Lhomme authored
There can be 3 frames (instead of the default 2) in the decoder memory at once. ref #23563
-