* Initialize tables at runtime. */
| 55 | * Initialize tables at runtime. |
| 56 | */ |
| 57 | static 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 | |
| 76 | static void ac3_downmix(AVCodecContext *avctx) |
nothing calls this directly
no test coverage detected