Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_SetYUVConversionMode() has no effect with OpenGL #9311

Closed
rom1v opened this issue Mar 19, 2024 · 1 comment
Closed

SDL_SetYUVConversionMode() has no effect with OpenGL #9311

rom1v opened this issue Mar 19, 2024 · 1 comment
Milestone

Comments

@rom1v
Copy link

rom1v commented Mar 19, 2024

SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_JPEG); works correctly for many render drivers, but not for OpenGL.

If I set:

SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");

the rendered colors are as expected.

But without hint, or with:

SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");

the result is the same as if SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_JPEG); was not called.

Context: Genymobile/scrcpy#4756 (comment)

@rom1v rom1v changed the title SDL_SetYUVConversionMode() has no effect for OpenGL SDL_SetYUVConversionMode() has no effect with OpenGL Mar 19, 2024
rom1v added a commit to Genymobile/scrcpy that referenced this issue Mar 30, 2024
Take the color range (full vs limited) into account to render the
picture.

Note that with the current version of SDL, it has no impact with the SDL
opengl render driver.

Fixes #4756 <#4756>
Refs <#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Suggested-by: Simon Chan <[email protected]>
rom1v pushed a commit to Genymobile/scrcpy that referenced this issue Mar 30, 2024
Most devices currently use limited color range, but some recent devices
encode in full color range, which is currently not supported by the SDL
opengl render driver.

Fixes #4756 <#4756>
Refs <#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Signed-off-by: Romain Vimont <[email protected]>
@slouken slouken added this to the 3.2.0 milestone May 23, 2024
@slouken
Copy link
Collaborator

slouken commented May 23, 2024

This function has been removed in SDL 3.0, and all renderers respect the new texture colorspace properties.

@slouken slouken closed this as completed May 23, 2024
FreedomBen pushed a commit to FreedomBen/scrcpy that referenced this issue Aug 2, 2024
Take the color range (full vs limited) into account to render the
picture.

Note that with the current version of SDL, it has no impact with the SDL
opengl render driver.

Fixes Genymobile#4756 <Genymobile#4756>
Refs <Genymobile#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Suggested-by: Simon Chan <[email protected]>
FreedomBen pushed a commit to FreedomBen/scrcpy that referenced this issue Aug 2, 2024
Most devices currently use limited color range, but some recent devices
encode in full color range, which is currently not supported by the SDL
opengl render driver.

Fixes Genymobile#4756 <Genymobile#4756>
Refs <Genymobile#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Signed-off-by: Romain Vimont <[email protected]>
Gottox pushed a commit to Gottox/scrcpy that referenced this issue Sep 29, 2024
Take the color range (full vs limited) into account to render the
picture.

Note that with the current version of SDL, it has no impact with the SDL
opengl render driver.

Fixes Genymobile#4756 <Genymobile#4756>
Refs <Genymobile#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Suggested-by: Simon Chan <[email protected]>
Gottox pushed a commit to Gottox/scrcpy that referenced this issue Sep 29, 2024
Most devices currently use limited color range, but some recent devices
encode in full color range, which is currently not supported by the SDL
opengl render driver.

Fixes Genymobile#4756 <Genymobile#4756>
Refs <Genymobile#4756 (comment)>
Refs libusb/#9311 <libsdl-org/SDL#9311>

Signed-off-by: Romain Vimont <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants