| 1894 | } |
| 1895 | |
| 1896 | inline void wdec14(unsigned short l, unsigned short h, unsigned short &a, |
| 1897 | unsigned short &b) { |
| 1898 | short ls = static_cast<short>(l); |
| 1899 | short hs = static_cast<short>(h); |
| 1900 | |
| 1901 | int hi = hs; |
| 1902 | int ai = ls + (hi & 1) + (hi >> 1); |
| 1903 | |
| 1904 | short as = static_cast<short>(ai); |
| 1905 | short bs = static_cast<short>(ai - hi); |
| 1906 | |
| 1907 | a = static_cast<unsigned short>(as); |
| 1908 | b = static_cast<unsigned short>(bs); |
| 1909 | } |
| 1910 | |
| 1911 | // |
| 1912 | // Wavelet basis functions with modulo arithmetic; they work with full |