From 77006973e417e13024e014798d14f0506f71ca20 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Date: Thu, 3 Apr 2025 13:42:57 +0200 Subject: [PATCH 06/23] avcodec/lsp: Make ff_acelp_lsp2lpc() static Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/lsp.c | 12 +++++++++--- libavcodec/lsp.h | 8 -------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c index 275984097d..4eaeb2bfc2 100644 --- a/libavcodec/lsp.c +++ b/libavcodec/lsp.c @@ -150,7 +150,13 @@ static void lsp2polyf(const double *lsp, double *f, int lp_half_order) } #endif /* lsp2polyf */ -void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order) +/** + * @brief LSP to LP conversion (3.2.6 of G.729) + * @param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) + * @param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) + * @param lp_half_order LP filter order, divided by 2 + */ +static void acelp_lsp2lpc(int16_t lp[], const int16_t lsp[], int lp_half_order) { int i; int f1[MAX_LP_HALF_ORDER+1]; // (3.22) @@ -211,10 +217,10 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd lsp_1st[i] = (lsp_2nd[i] + lsp_prev[i]) >> 1; #endif - ff_acelp_lsp2lpc(lp_1st, lsp_1st, lp_order >> 1); + acelp_lsp2lpc(lp_1st, lsp_1st, lp_order >> 1); /* LSP values for second subframe (3.2.5 of G.729)*/ - ff_acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1); + acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1); } void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order) diff --git a/libavcodec/lsp.h b/libavcodec/lsp.h index 26b1382eda..17126a43ce 100644 --- a/libavcodec/lsp.h +++ b/libavcodec/lsp.h @@ -67,14 +67,6 @@ void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order); */ void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order); -/** - * @brief LSP to LP conversion (3.2.6 of G.729) - * @param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) - * @param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) - * @param lp_half_order LP filter order, divided by 2 - */ -void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order); - /** * LSP to LP conversion (5.2.4 of AMR-WB) */ -- 2.45.2