| 338 | } |
| 339 | |
| 340 | av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order, |
| 341 | enum FFLPCType lpc_type) |
| 342 | { |
| 343 | s->blocksize = blocksize; |
| 344 | s->max_order = max_order; |
| 345 | s->lpc_type = lpc_type; |
| 346 | |
| 347 | s->windowed_buffer = av_mallocz((blocksize + 2 + FFALIGN(max_order, 4)) * |
| 348 | sizeof(*s->windowed_samples)); |
| 349 | if (!s->windowed_buffer) |
| 350 | return AVERROR(ENOMEM); |
| 351 | s->windowed_samples = s->windowed_buffer + FFALIGN(max_order, 4); |
| 352 | |
| 353 | s->lpc_apply_welch_window = lpc_apply_welch_window_c; |
| 354 | s->lpc_compute_autocorr = lpc_compute_autocorr_c; |
| 355 | |
| 356 | #if ARCH_RISCV |
| 357 | ff_lpc_init_riscv(s); |
| 358 | #elif ARCH_X86 |
| 359 | ff_lpc_init_x86(s); |
| 360 | #endif |
| 361 | |
| 362 | return 0; |
| 363 | } |
| 364 | |
| 365 | av_cold void ff_lpc_end(LPCContext *s) |
| 366 | { |
no test coverage detected