28 #define QOA_SLICE_LEN 20
41 { 1, -1, 3, -3, 5, -5, 7, -7},
42 { 5, -5, 18, -18, 32, -32, 49, -49},
43 { 16, -16, 53, -53, 95, -95, 147, -147},
44 { 34, -34, 113, -113, 203, -203, 315, -315},
45 { 63, -63, 210, -210, 378, -378, 588, -588},
46 { 104, -104, 345, -345, 621, -621, 966, -966},
47 { 158, -158, 528, -528, 950, -950, 1477, -1477},
48 { 228, -228, 760, -760, 1368, -1368, 2128, -2128},
49 { 316, -316, 1053, -1053, 1895, -1895, 2947, -2947},
50 { 422, -422, 1405, -1405, 2529, -2529, 3934, -3934},
51 { 548, -548, 1828, -1828, 3290, -3290, 5117, -5117},
52 { 696, -696, 2320, -2320, 4176, -4176, 6496, -6496},
53 { 868, -868, 2893, -2893, 5207, -5207, 8099, -8099},
54 {1064, -1064, 3548, -3548, 6386, -6386, 9933, -9933},
55 {1286, -1286, 4288, -4288, 7718, -7718, 12005, -12005},
56 {1536, -1536, 5120, -5120, 9216, -9216, 14336, -14336},
76 int delta = residual >> 4;
94 nb_channels = bytestream2_get_byte(&gb);
95 sample_rate = bytestream2_get_be24(&gb);
96 if (!sample_rate || !nb_channels)
108 frame->nb_samples = bytestream2_get_be16(&gb);
121 for (
int ch = 0; ch < nb_channels; ch++) {
130 for (
int sample_index = 0; sample_index <
frame->nb_samples;
132 for (
int ch = 0; ch < nb_channels; ch++) {
134 uint64_t slice = bytestream2_get_be64u(&gb);
135 int scalefactor = (slice >> 60) & 0
xf;
141 int quantized = (slice >> 57) & 0x7;