code wiki / (root) / nx_jpeg_ycbcr.nx

nx_jpeg_ycbcr.nx

buildroot/runtime/nx_jpeg_ycbcr.nx

2694 B79 linesdepth 2pulls 2 transitivereach 73 importersview sourcekind librarytopic jpeg
docsdependenciesstructsconstsfunctions

about

nx_jpeg_ycbcr.nx -- YCbCr -> RGB colour-space conversion for JPEG. Per JFIF v1.02 (ITU-T T.871) the inverse transform is: R = Y + 1.402 * (Cr - 128) G = Y - 0.344136 * (Cb-128) - 0.714136 * (Cr - 128) B = Y + 1.772 * (Cb-128) Where Y, Cb, Cr are post-IDCT 8-bit samples (after level-shift by +128 and clamp to [0..255]). Fixed-point form using 16-bit fractional precision (multiplier 65536): 1.402 -> 91881 0.344136 -> 22554 0.714136 -> 46802 1.772 -> 116130 Clamping: output R, G, B to [0..255]. nx_safety_envelope: intended_use: "YCbCr-to-RGB conversion for JPEG decode." sil_target: SIL1 evidence: [jfif_1_02_canonical_basis, fixed_point_no_floats, clamp_at_boundary] verdict: NOT_YET_EVALUATED

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_jpeg_ycbcr.nx nx_jpeg_ascii.nx nx_jpeg_ycbcr_test.nx

imports: nx_syscalls.nx

imported by: nx_jpeg_ascii.nxnx_jpeg_ycbcr_test.nx

structs

none

consts

none

functions

31func _ycbcr_clamp_u8(v: i64) -> i64
42func nx_jpeg_ycbcr_to_rgb_one(y: i64, cb: i64, cr: i64,
65func nx_jpeg_ycbcr_to_rgb_block(y_buf: *i64, cb_buf: *i64, cr_buf: *i64,