[vlc-devel] OpenGL handle of RGB32 is broken
Alexandre Janniaux
ajanni at videolabs.io
Fri Oct 30 09:14:20 CET 2020
Hi,
We've discussed this with Romain when fixing #25077 in the commit
82b6190e68c4de79a0c14a3b29233994dc146e31. Currently the fallback is
currently not functional because it's choosing alternative formats
but not actually requesting conversion to those formats.
Thus, I guess you could say it's still work in progress yes. :/
Regards,
--
Alexandre Janniaux
Videolabs
On Fri, Oct 30, 2020 at 03:00:22PM +0800, "zhilizhao(赵志立)" wrote:
> Hi all,
> I found the problem with vlc screen://.
>
> The following patch shows what caused the problem. How RGB fallback is handled
> in interop_sw.c? Why interop_rgb_base_init doesn’t take account of fmt_in? Is
> this still work in progress?
>
> diff --git a/modules/video_output/opengl/interop.c b/modules/video_output/opengl/interop.c
> index 96d548519e..6ded931189 100644
> --- a/modules/video_output/opengl/interop.c
> +++ b/modules/video_output/opengl/interop.c
> @@ -321,6 +321,24 @@ interop_rgb_base_init(struct vlc_gl_interop *interop, GLenum tex_target,
> break;
>
> case VLC_CODEC_RGB32:
> + if (interop->fmt_in.i_rmask == 0x00ff0000
> + && interop->fmt_in.i_gmask == 0x0000ff00
> + && interop->fmt_in.i_bmask == 0x000000ff)
> + {
> + if (GetTexFormatSize(interop->vt, tex_target, GL_BGRA, GL_RGBA,
> + GL_UNSIGNED_BYTE) != 32)
> + return VLC_EGENERIC;
> + interop->texs[0] = (struct vlc_gl_tex_cfg) {
> + { 1, 1 }, { 1, 1 }, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE
> + };
> + }
> + else
> + {
> + interop->texs[0] = (struct vlc_gl_tex_cfg) {
> + { 1, 1 }, { 1, 1 }, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE
> + };
> + }
> + break;
> case VLC_CODEC_RGBA:
> interop->texs[0] = (struct vlc_gl_tex_cfg) {
> { 1, 1 }, { 1, 1 }, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE
>
> _______________________________________________
> 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