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

Summary: Wrong clipping in SDL_DisplayYUVOverlay()
Product: SDL Reporter: aki. <c>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.11   
Hardware: x86   
OS: All   

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.