opengl: render YUY2 at full definition
Some YUV 4:2:2 formats are packed: two consecutive pixels are stored using 4 values (for example [Y1 U Y2 V]). But in OpenGL we cannot have both: - a single texture, and - a correct native interpolation for both Y and UV components. To avoid the problem, the current implementation just dropped the Y2 value, so the pictures were rendered at half the horizontal resolution. To render at full definition, upload the single plane into two separate OpenGL textures: - one in GL_RG, to read each Y value in a different texel; - one in GL_RGBA, to read both U and V values in a single texel. As a consequence, pic->i_planes is not necessarily equal to interop->tex_count anymore (there might be 1 picture plane but 2 textures). Fixes #26712
parent
cf0b7fcb
No related branches found
No related tags found
Showing
- modules/video_output/opengl/interop.c 9 additions, 11 deletionsmodules/video_output/opengl/interop.c
- modules/video_output/opengl/interop_sw.c 29 additions, 2 deletionsmodules/video_output/opengl/interop_sw.c
- modules/video_output/opengl/sampler.c 11 additions, 6 deletionsmodules/video_output/opengl/sampler.c
-
mentioned in issue #20800 (closed)
-
mentioned in merge request !2944 (merged)
-
mentioned in issue #28897
Please register or sign in to comment