| Summary: | Wrong clipping in SDL_DisplayYUVOverlay() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | aki. <c> |
| Component: | video | Assignee: | 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
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. 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.
|