| 7985 | } |
| 7986 | |
| 7987 | inline void wdec14(unsigned short l, unsigned short h, unsigned short &a, |
| 7988 | unsigned short &b) { |
| 7989 | short ls = static_cast<short>(l); |
| 7990 | short hs = static_cast<short>(h); |
| 7991 | |
| 7992 | int hi = hs; |
| 7993 | int ai = ls + (hi & 1) + (hi >> 1); |
| 7994 | |
| 7995 | short as = static_cast<short>(ai); |
| 7996 | short bs = static_cast<short>(ai - hi); |
| 7997 | |
| 7998 | a = static_cast<unsigned short>(as); |
| 7999 | b = static_cast<unsigned short>(bs); |
| 8000 | } |
| 8001 | |
| 8002 | // |
| 8003 | // Wavelet basis functions with modulo arithmetic; they work with full |