MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ac3_float_tables_init

Function ac3_float_tables_init

libavcodec/ac3dec.c:57–73  ·  view source on GitHub ↗

* Initialize tables at runtime. */

Source from the content-addressed store, hash-verified

55 * Initialize tables at runtime.
56 */
57static av_cold void ac3_float_tables_init(void)
58{
59 /* generate dynamic range table
60 reference: Section 7.7.1 Dynamic Range Control */
61 for (int i = 0; i < 256; i++) {
62 int v = (i >> 5) - ((i >> 7) << 3) - 5;
63 dynamic_range_tab[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20);
64 }
65
66 /* generate compr dynamic range table
67 reference: Section 7.7.2 Heavy Compression */
68 for (int i = 0; i < 256; i++) {
69 int v = (i >> 4) - ((i >> 7) << 4) - 4;
70 ff_ac3_heavy_dynamic_range_tab[i] = powf(2.0f, v) * ((i & 0xF) | 0x10);
71 }
72 ff_ac3_init_static();
73}
74#endif
75
76static void ac3_downmix(AVCodecContext *avctx)

Callers

nothing calls this directly

Calls 1

ff_ac3_init_staticFunction · 0.85

Tested by

no test coverage detected