SDL_ISCOLORSPACE_MATRIX_BT601(3)
π SDL_ISCOLORSPACE_MATRIX_BT601 π
okay bestie, so this is a page straight outta the SDL3 FUNCTIONS manual, and it's about a lil macro named SDL_ISCOLORSPACE_MATRIX_BT601. She's small, she's iconic, and she does exactly one job. Let's get into it π«Ά
β¨ NAME β¨
SDL_ISCOLORSPACE_MATRIX_BT601 β a macro that tells you if an SDL_Colorspace is rockin' BT601 (or BT470BG) matrix coefficients. that's it. that's the whole vibe check π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_pixels.h>
#define SDL_ISCOLORSPACE_MATRIX_BT601(cspace) (SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT601 || SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT470BG)
like. look at her. one line. no notes. π
β¨ DESCRIPTION β¨
so basically you hand her a colorspace and she's like "hmm is this BT601 coded or BT470BG coded?" and she answers. slay.
β οΈ BESTIE LISTEN β this macro double-evaluates its parameter. so do NOT pass it expressions with side-effects, fr fr. like if your expression increments something or does literally anything spicy, it's gonna happen twice. no cap. keep it boring, keep it safe. π¨
β¨ MACRO PARAMETERS β¨
cspaceβ anSDL_Colorspaceyou wanna check. the lil guy you're interrogating π΅οΈβοΈ
β¨ RETURN VALUE β¨
- returns
trueif it's BT601 or BT470BG π - returns
falseotherwise π
β¨ THREAD SAFETY β¨
it is safe to call this macro from any thread. go wild, queen. multithreaded and unbothered πβ¨
β¨ AVAILABILITY β¨
this macro has been available since SDL 3.2.0. she's not new new but she's still serving π
okay that's the whole page, you're basically an expert now π
Simple Directmedia Layer wrote this one, SDL 3.4.18 is the version on the tin, and SDL_ISCOLORSPACE_MATRIX_BT601(3) is the section she lives in. mwah, go check your colorspaces bestie π
πΈπ¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms