| 512 | #define MOD_MASK ((1 << NBITS) - 1) |
| 513 | |
| 514 | static inline void wdec16(uint16_t l, uint16_t h, uint16_t *a, uint16_t *b) |
| 515 | { |
| 516 | int m = l; |
| 517 | int d = h; |
| 518 | int bb = (m - (d >> 1)) & MOD_MASK; |
| 519 | int aa = (d + bb - A_OFFSET) & MOD_MASK; |
| 520 | *b = bb; |
| 521 | *a = aa; |
| 522 | } |
| 523 | |
| 524 | static void wav_decode(uint16_t *in, int nx, int ox, |
| 525 | int ny, int oy, uint16_t mx) |