al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
gDPSetConvert [macro]Sets the matrix coefficients for converting from YUV pixels to RGB. Syntax
Arguments
Explanation
R = C0 * (Y-16) + C1 * V G = C0 * (Y-16) + C2 * U - C3 * V B = C0 * (Y-16) + C4 * U
Color conversion in the RDP is performed via the texture filter (TF) and the color combiner (CC). R' = Y + K0 * V G' = Y + K1 * U + K2 * V B' = Y + K3 * U The following calculations are executed in the CC: R = (R' - K4) * K5 + R' G = (G' - K4) * K5 + G' B = (B' - K4) * K5 + B' The relationships between Cn and Kn are shown below: K0 = C1/C0 K1 = C2/C0 K2 = C3/C0 K3 = C4/C0 K4 = 16 + 16/(C0 - 1.0) K5 = C0 - 1.0 The values normally used for the conversion from YUV to RGB are shown below: K0 = 175 K1 = -43 K2 = -89 K3 = 222 K4 = 114 K5 = 42 Notes
For further details, see Section 12.5.2, "Color Space Conversion," and Section 12.6, "CC: Color Combiner," in the N64 Programming Manual. See Also
Revision History
|