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 - SDL red color when doing YUV conversion with BGR format
Summary: SDL red color when doing YUV conversion with BGR format
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: don't know
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 09:18 UTC by Sylvain
Modified: 2017-11-22 05:52 UTC (History)
1 user (show)

See Also:


Attachments
test case (6.17 KB, text/x-csrc)
2017-11-15 09:18 UTC, Sylvain
Details

Note You need to log in before you can comment on or make changes to this bug.
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!