| 119 | /* ── Dequantize into the rotated basis ──────────────────────────────── */ |
| 120 | |
| 121 | void cbm_rsq_decode(const cbm_rsq_code_t *c, float *out) { |
| 122 | for (int i = 0; i < CBM_RSQ_CODE_BYTES; i++) { |
| 123 | uint8_t b = c->codes[i]; |
| 124 | out[i * 2] = c->offset + c->scale * (float)(b & 0x0F); |
| 125 | out[i * 2 + 1] = c->offset + c->scale * (float)(b >> 4); |
| 126 | } |
| 127 | } |