MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / root_table

Function root_table

modules/data/mp3/libmad/layer3.c:355–368  ·  view source on GitHub ↗

fractional powers of two used for requantization and joint stereo decoding root_table[3 + x] = 2^(x/4) */

Source from the content-addressed store, hash-verified

353 root_table[3 + x] = 2^(x/4)
354*/
355static inline mad_fixed_t root_table(int i)
356{
357 static mad_fixed_t const root_table_val[7] PROGMEM = {
358 MAD_F(0x09837f05) /* 2^(-3/4) == 0.59460355750136 */,
359 MAD_F(0x0b504f33) /* 2^(-2/4) == 0.70710678118655 */,
360 MAD_F(0x0d744fcd) /* 2^(-1/4) == 0.84089641525371 */,
361 MAD_F(0x10000000) /* 2^( 0/4) == 1.00000000000000 */,
362 MAD_F(0x1306fe0a) /* 2^(+1/4) == 1.18920711500272 */,
363 MAD_F(0x16a09e66) /* 2^(+2/4) == 1.41421356237310 */,
364 MAD_F(0x1ae89f99) /* 2^(+3/4) == 1.68179283050743 */
365 };
366 volatile uint32_t a = *(uint32_t*)&root_table_val[i];
367 return *(mad_fixed_t*)&a;
368}
369/*
370 coefficients for aliasing reduction
371 derived from Table B.9 of ISO/IEC 11172-3

Callers 2

III_requantizeFunction · 0.85
III_stereoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected