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 366 - Wrong clipping in SDL_DisplayYUVOverlay()
Summary: Wrong clipping in SDL_DisplayYUVOverlay()
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.11
Hardware: x86 All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-17 07:25 UTC by aki.
Modified: 2006-11-17 21:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aki. 2006-11-17 07:25:08 UTC
Hello,

If SDL_SetVideoMode() is not called, SDL_DisplayYUVOverlay() doesn't draw anything. 

And even when SDL_SetVideoMode() is called, it is limited to the size that the size specified with SDL_SetVideoMode(). 

I think that it is clipping processing in SDL_DisplayYUVOverlay(). 
Could you fix?

Regards,
aki.
Comment 1 Ryan C. Gordon 2006-11-17 11:16:25 UTC
Not a bug: YUV overlays are drawn into an SDL_Surface...you can't just draw on the desktop directly, so needing to call SDL_SetVideoMode() and then draw into the bounds of that surface is normal.

--ryan.

Comment 2 aki. 2006-11-17 21:44:15 UTC
I want to use SDL_Overlay only for the color conversion.
For instance, in the following codes.


SDL_Surface* surface = SDL_CreateRGBSurface(
    SDL_SWSURFACE, 640, 480, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0);
SDL_Overlay* overlay = SDL_CreateYUVOverlay(640, 480, SDL_YV12_OVERLAY, surface);
SDL_LockYUVOverlay(overlay);
//
// draw to overlay->pixels
//
SDL_DisplayYUVOverlay(overlay, &rect);
SDL_UnlockYUVOverlay(overlay);
//
// read from surface->pixels
//


aki.