Lines Matching defs:packs
15 packs = {w: (lambda *data, width=w: pack(width, data)) for w in (1, 2, 3, 4)}
21 2: packs[2](0, 0x1234, 0x4567, -0x4567, 0x7fff, -0x8000, -1),
22 3: packs[3](0, 0x123456, 0x456789, -0x456789, 0x7fffff, -0x800000, -1),
23 4: packs[4](0, 0x12345678, 0x456789ab, -0x456789ab,
42 p = packs[w]
57 p = packs[w]
72 self.assertEqual(audioop.maxpp(packs[w](*range(100)), w), 0)
73 self.assertEqual(audioop.maxpp(packs[w](9, 10, 5, 5, 0, 1), w), 10)
82 p = packs[w]
90 self.assertEqual(audioop.avg(packs[4](0x50000000, 0x70000000), 4),
92 self.assertEqual(audioop.avg(packs[4](-0x50000000, -0x70000000), 4),
100 self.assertEqual(audioop.avgpp(packs[w](*range(100)), w), 0)
101 self.assertEqual(audioop.avgpp(packs[w](9, 10, 5, 5, 0, 1), w), 10)
112 p = packs[w]
128 p = packs[w]
145 packs[2](0, 0x2468, 0x7fff, -0x8000, 0x7fff, -0x8000, -2))
147 packs[3](0, 0x2468ac, 0x7fffff, -0x800000,
150 packs[4](0, 0x2468acf0, 0x7fffffff, -0x80000000,
168 packs[2](1, 0x1235, 0x4568, -0x4566, -0x8000, -0x7fff, 0))
170 packs[2](-1, 0x1233, 0x4566, -0x4568, 0x7ffe, 0x7fff, -2))
172 packs[2](-1, 0x1233, 0x4566, -0x4568, 0x7ffe, 0x7fff, -2))
176 packs[3](1, 0x123457, 0x45678a, -0x456788,
179 packs[3](-1, 0x123455, 0x456788, -0x45678a,
182 packs[3](-1, 0x123455, 0x456788, -0x45678a,
187 packs[4](1, 0x12345679, 0x456789ac, -0x456789aa,
190 packs[4](-1, 0x12345677, 0x456789aa, -0x456789ac,
193 packs[4](0x7fffffff, -0x6dcba989, -0x3a987656, 0x3a987654,
196 packs[4](-0x80000000, -0x6dcba988, -0x3a987655, 0x3a987655,
208 packs[2](0, 0x1200, 0x4500, -0x4500, 0x7f00, -0x8000, -0x100))
210 packs[3](0, 0x120000, 0x450000, -0x450000,
213 packs[4](0, 0x12000000, 0x45000000, -0x45000000,
218 packs[3](0, 0x123400, 0x456700, -0x456700,
221 packs[4](0, 0x12340000, 0x45670000, -0x45670000,
226 packs[2](0, 0x1234, 0x4567, -0x4568, 0x7fff, -0x8000, -1))
228 packs[4](0, 0x12345600, 0x45678900, -0x45678900,
233 packs[2](0, 0x1234, 0x4567, -0x4568, 0x7fff, -0x8000, -1))
235 packs[3](0, 0x123456, 0x456789, -0x45678a,
246 (packs[2](0, 0xb, 0x29, -0x16, 0x72, -0xb3), (-179, 40)))
248 (packs[3](0, 0xb00, 0x2900, -0x1600, 0x7200,
251 (packs[4](0, 0xb0000, 0x290000, -0x160000, 0x720000,
307 decoded = packs[w](*(x << (w * 8) >> 13 for x in src))
334 decoded = packs[w](*(x << (w * 8) >> 14 for x in src))
357 packs[2](0, 0x2468, 0x7fff, -0x8000, 0x7fff, -0x8000, -2))
359 packs[3](0, 0x2468ac, 0x7fffff, -0x800000,
362 packs[4](0, 0x2468acf0, 0x7fffffff, -0x80000000,
398 1: packs[1](0, 0x0d, 0x37, -0x26, 0x55, -0x4b, -0x14),
399 2: packs[2](0, 0x0da7, 0x3777, -0x2630, 0x5673, -0x4a64, -0x129a),
400 3: packs[3](0, 0x0da740, 0x377776, -0x262fca,
402 4: packs[4](0, 0x0da740da, 0x37777776, -0x262fc962,
420 self.assertEqual(audioop.reverse(packs[w](0, 1, 2), w),
421 packs[w](2, 1, 0))
469 self.assertEqual(audioop.findfit(datas[2], packs[2](1, 2, 0)),
481 data = packs[w](0, 1, -1, maxvalues[w], minvalues[w])
493 2: packs[2](0, 0x3412, 0x6745, -0x6646, -0x81, 0x80, -1),
494 3: packs[3](0, 0x563412, -0x7698bb, 0x7798ba, -0x81, 0x80, -1),
495 4: packs[4](0, 0x78563412, -0x547698bb, 0x557698ba,