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 652

Summary: YUV to RGB conversion broken for odd widths
Product: SDL Reporter: Daniel Verkamp <daniel>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 1.2Keywords: target-1.2.14
Hardware: x86   
OS: Linux   

Description Daniel Verkamp 2008-12-08 23:09:01 UTC
Example of this problem is ffplay from FFmpeg:

Input to ffplay is bitmap at http://samples.mplayerhq.hu/bmp-files/test32bf.bmp (width = 127); ffplay internally converts to YUV and displays it (incorrectly) as http://drv.nu/stuff/ffplay-test32bf.png

Looks like one of the channels is misaligned.

Other ffmpeg tools and mplayer -vf format=bgr32 -vo sdl can convert or display this file correctly, so it seems to be a problem with SDL_DisplayYUVOverlay.

The ffplay source is available in FFmpeg SVN as ffplay.c

See also relevant FFmpeg bug http://roundup.mplayerhq.hu/roundup/ffmpeg/issue731

Tested with Gentoo amd64 media-libs/libsdl-1.2.13
Comment 1 Ryan C. Gordon 2009-09-13 16:33:07 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 2 Sam Lantinga 2009-09-27 15:04:50 UTC
SDL 1.2 YUV code only supports even width and height.  You're welcome to submit a patch for SDL 1.3 however.