SDL_Overlay(3)
β¨ SDL_Overlay β¨
okay bestie, welcome to the YUV video overlay page π this is from the SDL API Reference and it's lowkey iconic.
π NAME π
SDL_Overlay β YUV video overlay. that's it, that's the whole vibe π¦
π§ STRUCTURE DEFINITION π§
here's the whole struct, no cap, every field exactly as it is:
typedef struct{
Uint32 format;
int w, h;
int planes;
Uint16 *pitches;
Uint8 **pixels;
Uint32 hw_overlay:1;
} SDL_Overlay;
πΈ STRUCTURE DATA πΈ
formatβ the overlay format, and there's a whole list of those down below πw,hβ width and height of the overlay, obviously πplanesβ how many planes are in the overlay. usually it's either1or3, no in-between energypitchesβ an array of pitches, one for each plane. a pitch is the length of a row, in bytes πpixelsβ an array of pointers to the data of each plane. bestie, listen: the overlay should be locked before you touch these pointers, fr fr πhw_overlayβ this gets set to1if the overlay is hardware accelerated β‘ main character energy
π DESCRIPTION π
so a SDL_Overlay is basically a SDL_Surface's cousin, except instead of regular pixel data it stores a YUV overlay. same family, different vibe π«Ά
every single field is read only β all of them β except pixels, which you gotta lock before you use it. the format field stores the format of the overlay, and it's one of these:
#define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U */
#define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V */
#define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 */
#define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 */
#define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 */
if you want more info on YUV formats (and honestly, who doesn't), it's at http://www.webartz.com/fourcc/indexyuv.htm (link to URL http://www.webartz.com/fourcc/indexyuv.htm) π
π₯ SEE ALSO π₯
SDL_CreateYUVOverlaySDL_LockYUVOverlaySDL_UnlockYUVOverlaySDL_FreeYUVOverlay
and that's the page!! mwah π this was SDL, from the SDL API Reference, dated Tue 11 Sep 2001, 23:01 β yeah she's vintage but she ate and left no crumbs πβ¨ go lock your overlays bestie, ily π
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms