We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3962

Summary: SDL red color when doing YUV conversion with BGR format
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: don't know   
Hardware: All   
OS: All   
Attachments: test case

Description Sylvain 2017-11-15 09:18:06 UTC
Created attachment 3087 [details]
test case

Last yuv commit https://hg.libsdl.org/SDL/rev/cf166abbde4a makes yuv conversion very very fast!

bug when trying with BGR format, it produces a red image.

For instance: 
PIXELFORMAT_YV12 to SDL_PIXELFORMAT_BGR888
or
PIXELFORMAT_YV12 to SDL_PIXELFORMAT_ABGR8888

(but maybe any yuv format)

Here's a testcase. 
Sorry, no patch provided as there is too much code to dig into
Comment 1 Ozkan Sezer 2017-11-16 08:28:53 UTC
https://discourse.libsdl.org/t/yuv-conversion-bugs/23413 describes
a similar issue.
Comment 2 Sam Lantinga 2017-11-22 05:52:43 UTC
This should be fixed, thanks!