nx_jpeg_ycbcr_test.nx
buildroot/runtime/nx_jpeg_ycbcr_test.nx
about
nx_jpeg_ycbcr_test.nx -- KAT for YCbCr -> RGB conversion.
Canonical reference points from JFIF v1.02:
(Y= 0, Cb=128, Cr=128) -> black (R=0, G=0, B=0)
(Y=255, Cb=128, Cr=128) -> white (R=255, G=255, B=255)
(Y=128, Cb=128, Cr=128) -> mid grey (R=128, G=128, B=128)
(Y= 76, Cb= 85, Cr=255) -> pure red (R=~255, G=~0, B=~0)
(Y=150, Cb= 44, Cr= 21) -> pure green (R=~0, G=~255, B=~0)
(Y= 29, Cb=255, Cr=107) -> pure blue (R=~0, G=~0, B=~255)
JPEG conversion is approximate (Rec 601 coefficients + fixed-point
rounding) so we allow +/- 2 ULP tolerance on the pure-colour cases.
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_jpeg_ycbcr.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 20 | func _fail(n: i64) -> i64 |
| 40 | func _within(actual: i64, expected: i64, tol: i64) -> i64 called by 1: main |
| 47 | func main() -> i64 |