From 68c192b892975b5016a2dd530fe1ed85a60da7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 13 Apr 2024 01:05:55 +0200 Subject: [PATCH] Fix some symbol clashes apparently affecting the docker build --- UI/GameInfoCache.cpp | 2 +- ext/at3_standalone/atrac.cpp | 6 ++--- ext/at3_standalone/atrac.h | 2 +- ext/at3_standalone/atrac3.cpp | 4 ++-- ext/at3_standalone/atrac3plusdsp.cpp | 8 +++---- ext/at3_standalone/fft.cpp | 36 ++++++++++++++-------------- ext/at3_standalone/fft.h | 2 +- ext/at3_standalone/sinewin.cpp | 12 +++++----- ext/at3_standalone/sinewin.h | 2 +- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 26bbccf1ae..2ad0ee1bb4 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -357,7 +357,7 @@ void GameInfo::SetupTexture(Draw::DrawContext *thin3d, GameInfoTex &tex) { tex.texture = CreateTextureFromFileData(thin3d, (const uint8_t *)tex.data.data(), tex.data.size(), ImageFileType::DETECT, false, GetTitle().c_str()); tex.timeLoaded = time_now_d(); if (!tex.texture) { - ERROR_LOG(G3D, "Failed creating texture (%s) from %d-byte file", GetTitle().c_str(), tex.data.size()); + ERROR_LOG(G3D, "Failed creating texture (%s) from %d-byte file", GetTitle().c_str(), (int)tex.data.size()); } } diff --git a/ext/at3_standalone/atrac.cpp b/ext/at3_standalone/atrac.cpp index 6f3d0e89a6..7fce83e40c 100644 --- a/ext/at3_standalone/atrac.cpp +++ b/ext/at3_standalone/atrac.cpp @@ -32,7 +32,7 @@ #include "atrac.h" -float ff_atrac_sf_table[64]; +float av_atrac_sf_table[64]; static float qmf_window[48]; static const float qmf_48tap_half[24] = { @@ -50,9 +50,9 @@ void ff_atrac_generate_tables(void) float s; /* Generate scale factors */ - if (!ff_atrac_sf_table[63]) + if (!av_atrac_sf_table[63]) for (i=0 ; i<64 ; i++) - ff_atrac_sf_table[i] = pow(2.0, (i - 15) / 3.0); + av_atrac_sf_table[i] = pow(2.0, (i - 15) / 3.0); /* Generate the QMF window. */ if (!qmf_window[47]) diff --git a/ext/at3_standalone/atrac.h b/ext/at3_standalone/atrac.h index 5bef52a1ce..3a68c8e092 100644 --- a/ext/at3_standalone/atrac.h +++ b/ext/at3_standalone/atrac.h @@ -51,7 +51,7 @@ typedef struct AtracGCContext { int loc_size; ///< size of location code in samples } AtracGCContext; -extern float ff_atrac_sf_table[64]; +extern float av_atrac_sf_table[64]; /** * Generate common tables. diff --git a/ext/at3_standalone/atrac3.cpp b/ext/at3_standalone/atrac3.cpp index 9e6cbcef16..7b2ca124eb 100644 --- a/ext/at3_standalone/atrac3.cpp +++ b/ext/at3_standalone/atrac3.cpp @@ -297,7 +297,7 @@ static int decode_spectrum(GetBitContext *gb, float *output) mantissas, subband_size); /* decode the scale factor for this subband */ - scale_factor = ff_atrac_sf_table[sf_index[i]] * + scale_factor = av_atrac_sf_table[sf_index[i]] * inv_max_quant[subband_vlc_index[i]]; /* inverse quantize the coefficients */ @@ -379,7 +379,7 @@ static int decode_tonal_components(GetBitContext *gb, coded_values = coded_values_per_component + 1; coded_values = FFMIN(max_coded_values, coded_values); - scale_factor = ff_atrac_sf_table[sf_index] * + scale_factor = av_atrac_sf_table[sf_index] * inv_max_quant[quant_step_index]; read_quant_spectral_coeffs(gb, quant_step_index, coding_mode, diff --git a/ext/at3_standalone/atrac3plusdsp.cpp b/ext/at3_standalone/atrac3plusdsp.cpp index 1f6a76fca4..fcdb9caecb 100644 --- a/ext/at3_standalone/atrac3plusdsp.cpp +++ b/ext/at3_standalone/atrac3plusdsp.cpp @@ -476,15 +476,15 @@ void ff_atrac3p_imdct(FFTContext *mdct_ctx, float *pIn, * Both regions are 32 samples long. */ if (wind_id & 2) { /* 1st half: steep window */ memset(pOut, 0, sizeof(float) * 32); - vector_fmul(&pOut[32], &pOut[32], ff_sine_64, 64); + vector_fmul(&pOut[32], &pOut[32], av_sine_64, 64); } else /* 1st half: simple sine window */ - vector_fmul(pOut, pOut, ff_sine_128, ATRAC3P_MDCT_SIZE / 2); + vector_fmul(pOut, pOut, av_sine_128, ATRAC3P_MDCT_SIZE / 2); if (wind_id & 1) { /* 2nd half: steep window */ - vector_fmul_reverse(&pOut[160], &pOut[160], ff_sine_64, 64); + vector_fmul_reverse(&pOut[160], &pOut[160], av_sine_64, 64); memset(&pOut[224], 0, sizeof(float) * 32); } else /* 2nd half: simple sine window */ - vector_fmul_reverse(&pOut[128], &pOut[128], ff_sine_128, ATRAC3P_MDCT_SIZE / 2); + vector_fmul_reverse(&pOut[128], &pOut[128], av_sine_128, ATRAC3P_MDCT_SIZE / 2); } /* lookup table for fast modulo 23 op required for cyclic buffers of the IPQF */ diff --git a/ext/at3_standalone/fft.cpp b/ext/at3_standalone/fft.cpp index c638b9be87..961c43b55d 100644 --- a/ext/at3_standalone/fft.cpp +++ b/ext/at3_standalone/fft.cpp @@ -54,21 +54,21 @@ COSTABLE(16384); COSTABLE(32768); COSTABLE(65536); -static FFTSample * const ff_cos_tabs[] = { +static FFTSample * const av_cos_tabs[] = { NULL, NULL, NULL, NULL, - ff_cos_16, - ff_cos_32, - ff_cos_64, - ff_cos_128, - ff_cos_256, - ff_cos_512, - ff_cos_1024, - ff_cos_2048, - ff_cos_4096, - ff_cos_8192, - ff_cos_16384, - ff_cos_32768, - ff_cos_65536, + av_cos_16, + av_cos_32, + av_cos_64, + av_cos_128, + av_cos_256, + av_cos_512, + av_cos_1024, + av_cos_2048, + av_cos_4096, + av_cos_8192, + av_cos_16384, + av_cos_32768, + av_cos_65536, }; static void fft_permute_c(FFTContext *s, FFTComplex *z); @@ -90,7 +90,7 @@ void ff_init_ff_cos_tabs(int index) int i; int m = 1<= 0 && index < FF_ARRAY_ELEMS(ff_sine_windows)); - ff_sine_window_init(ff_sine_windows[index], 1 << index); + assert(index >= 0 && index < FF_ARRAY_ELEMS(av_sine_windows)); + ff_sine_window_init(av_sine_windows[index], 1 << index); } diff --git a/ext/at3_standalone/sinewin.h b/ext/at3_standalone/sinewin.h index 5965a56fe8..da512bbd1f 100644 --- a/ext/at3_standalone/sinewin.h +++ b/ext/at3_standalone/sinewin.h @@ -23,7 +23,7 @@ #include "compat.h" #define SINETABLE(size) \ - DECLARE_ALIGNED(32, float, ff_sine_##size)[size] + DECLARE_ALIGNED(32, float, av_sine_##size)[size] /** * Generate a sine window.