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

Function is_table

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

coefficients for intensity stereo processing derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3 is_ratio[i] = tan(i * (PI / 12)) is_table[i] = is_ratio[i] / (1 + is_ratio[i]) */

Source from the content-addressed store, hash-verified

474 is_table[i] = is_ratio[i] / (1 + is_ratio[i])
475*/
476static inline mad_fixed_t is_table(int i)
477{
478 static mad_fixed_t const is_table_val[7] PROGMEM = {
479 MAD_F(0x00000000) /* 0.000000000 */,
480 MAD_F(0x0361962f) /* 0.211324865 */,
481 MAD_F(0x05db3d74) /* 0.366025404 */,
482 MAD_F(0x08000000) /* 0.500000000 */,
483 MAD_F(0x0a24c28c) /* 0.633974596 */,
484 MAD_F(0x0c9e69d1) /* 0.788675135 */,
485 MAD_F(0x10000000) /* 1.000000000 */
486 };
487 volatile uint32_t a = *(uint32_t*)&is_table_val[i];
488 return *(mad_fixed_t*)&a;
489}
490
491/*
492 coefficients for LSF intensity stereo processing

Callers 1

III_stereoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected