SDL_ISCOLORSPACE_MATRIX_BT709(3)

πŸ’– SDL_ISCOLORSPACE_MATRIX_BT709 πŸ’–

okay bestie, so this is a macro from SDL3, specifically it lives in the SDL_pixels.h zone, and it's literally the vibe-check for whether an SDL_Colorspace is using BT709 matrix coefficients. That's it. That's the whole job. It's giving tiny-but-mighty. ✨


🌸 NAME 🌸

SDL_ISCOLORSPACE_MATRIX_BT709 β€” a macro to determine if an SDL_Colorspace uses BT709 matrix coefficients. no cap, that's what it does. πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_pixels.h>

#define SDL_ISCOLORSPACE_MATRIX_BT709(cspace)        (SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT709)

look at her. one line. iconic. πŸ’…


πŸ¦‹ MACRO PARAMETERS πŸ¦‹

  • cspace β€” an SDL_Colorspace to check. that's the one you're interrogating. be nice to it. 🫢

πŸ“ RETURN VALUE πŸ“

Returns true if it's BT709, false otherwise. binary queen. either it ate or it didn't. πŸ’€


πŸ”₯ THREAD SAFETY πŸ”₯

It is safe to call this macro from any thread. go wild, no locks needed, she's chill like that. 😌


⭐ AVAILABILITY ⭐

This macro is available since SDL 3.2.0. so if you're on something older... bestie. upgrade. πŸ™ˆ


Simple Directmedia Layer β€” this is the SDL 3.4.18 era, and that's the whole sign-off, mwah πŸ’‹ hope your colorspaces are always exactly what you think they are, ily, bye πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from