From fd5aa93a37b3fa21195c6d7b22ef655124020e09 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 16 Jun 2023 19:22:49 +0200 Subject: [PATCH] avcodec: Rename ff_kbd_window_init() as it will be needed from outside libavcodec Signed-off-by: Michael Niedermayer --- libavcodec/aacdec_template.c | 8 ++++---- libavcodec/aactab.c | 4 ++-- libavcodec/ac3dec.c | 2 +- libavcodec/ac3enc_fixed.c | 2 +- libavcodec/ac3enc_float.c | 2 +- libavcodec/dolby_e.c | 4 ++-- libavcodec/kbdwin.c | 4 ++-- libavcodec/kbdwin.h | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 444dc4fa9d..2385ea58b0 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -1159,8 +1159,8 @@ static av_cold void aac_static_table_init(void) 352); // window initialization - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120); + AAC_RENAME(avpriv_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960); + AAC_RENAME(avpriv_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120); #if !USE_FIXED AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_960), 960); @@ -1168,8 +1168,8 @@ static av_cold void aac_static_table_init(void) AAC_RENAME(ff_init_ff_sine_windows)(9); ff_aac_float_common_init(); #else - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128); + AAC_RENAME(avpriv_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024); + AAC_RENAME(avpriv_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128); init_sine_windows_fixed(); #endif diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index 0f4941d5df..d0006eac35 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -48,8 +48,8 @@ DECLARE_ALIGNED(32, float, ff_aac_kbd_short_128)[128]; static av_cold void aac_float_common_init(void) { - ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024); - ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128); + avpriv_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024); + avpriv_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128); ff_init_ff_sine_windows(10); ff_init_ff_sine_windows(7); } diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index fc0cbeb493..8c63f015f4 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -228,7 +228,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) if ((ret = av_tx_init(&s->tx_256, &s->tx_fn_256, IMDCT_TYPE, 1, 256, &scale, 0))) return ret; - AC3_RENAME(ff_kbd_window_init)(s->window, 5.0, 256); + AC3_RENAME(avpriv_kbd_window_init)(s->window, 5.0, 256); ff_bswapdsp_init(&s->bdsp); #if (USE_FIXED) diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index 88dfd66b91..079a43dc39 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -82,7 +82,7 @@ static av_cold int ac3_fixed_mdct_init(AC3EncodeContext *s) if (!iwin) return AVERROR(ENOMEM); - ff_kbd_window_init(fwin, 5.0, AC3_BLOCK_SIZE); + avpriv_kbd_window_init(fwin, 5.0, AC3_BLOCK_SIZE); for (int i = 0; i < AC3_BLOCK_SIZE; i++) iwin[i] = lrintf(fwin[i] * (1 << 22)); diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index ae351a535e..9664adbf63 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -92,7 +92,7 @@ static av_cold int ac3_float_mdct_init(AC3EncodeContext *s) return AVERROR(ENOMEM); } - ff_kbd_window_init(window, 5.0, AC3_BLOCK_SIZE); + avpriv_kbd_window_init(window, 5.0, AC3_BLOCK_SIZE); s->mdct_window = window; return av_tx_init(&s->tx, &s->tx_fn, AV_TX_FLOAT_MDCT, 0, diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c index 921c33f3ba..b8dac0fa3f 100644 --- a/libavcodec/dolby_e.c +++ b/libavcodec/dolby_e.c @@ -1200,7 +1200,7 @@ static av_cold void init_tables(void) gain_tab[i] = exp2f((i - 960) / 64.0f); // short 1 - ff_kbd_window_init(window, 3.0f, 128); + avpriv_kbd_window_init(window, 3.0f, 128); for (i = 0; i < 128; i++) window[128 + i] = window[127 - i]; @@ -1227,7 +1227,7 @@ static av_cold void init_tables(void) window[1088 + i] = 1.0f; // long - ff_kbd_window_init(window + 1408, 3.0f, 256); + avpriv_kbd_window_init(window + 1408, 3.0f, 256); for (i = 0; i < 640; i++) window[1664 + i] = 1.0f; for (i = 0; i < 256; i++) diff --git a/libavcodec/kbdwin.c b/libavcodec/kbdwin.c index 82755874d4..eacdb46774 100644 --- a/libavcodec/kbdwin.c +++ b/libavcodec/kbdwin.c @@ -56,12 +56,12 @@ av_cold static int kbd_window_init(float *float_window, int *int_window, float a return 0; } -av_cold int ff_kbd_window_init(float *window, float alpha, int n) +av_cold int avpriv_kbd_window_init(float *window, float alpha, int n) { return kbd_window_init(window, NULL, alpha, n); } -av_cold int ff_kbd_window_init_fixed(int32_t *window, float alpha, int n) +av_cold int avpriv_kbd_window_init_fixed(int32_t *window, float alpha, int n) { return kbd_window_init(NULL, window, alpha, n); } diff --git a/libavcodec/kbdwin.h b/libavcodec/kbdwin.h index 452fc46596..0cb2073c5f 100644 --- a/libavcodec/kbdwin.h +++ b/libavcodec/kbdwin.h @@ -22,7 +22,7 @@ #include /** - * Maximum window size for ff_kbd_window_init. + * Maximum window size for avpriv_kbd_window_init. */ #define FF_KBD_WINDOW_MAX 1024 @@ -34,7 +34,7 @@ * * @return if n is larger than FF_KBD_WINDOW_MAX then AVERROR(ENOMEM) is possible */ -int ff_kbd_window_init(float *window, float alpha, int n); -int ff_kbd_window_init_fixed(int32_t *window, float alpha, int n); +int avpriv_kbd_window_init(float *window, float alpha, int n); +int avpriv_kbd_window_init_fixed(int32_t *window, float alpha, int n); #endif /* AVCODEC_KBDWIN_H */