Skip to content

Commit 6ee008a

Browse files
committed
Warning fix, rename some variables to avoid clashes with actual ffmpeg
1 parent b35b351 commit 6ee008a

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

ext/at3_standalone/atrac3plus.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,8 @@ static void decode_spectrum(GetBitContext *gb, Atrac3pChanUnitCtx *ctx,
854854
memset(chan->power_levs, ATRAC3P_POWER_COMP_OFF, sizeof(chan->power_levs));
855855

856856
for (qu = 0; qu < ctx->used_quant_units; qu++) {
857-
num_specs = ff_atrac3p_qu_to_spec_pos[qu + 1] -
858-
ff_atrac3p_qu_to_spec_pos[qu];
857+
num_specs = av_atrac3p_qu_to_spec_pos[qu + 1] -
858+
av_atrac3p_qu_to_spec_pos[qu];
859859

860860
wordlen = chan->qu_wordlen[qu];
861861
codetab = chan->qu_tab_idx[qu];
@@ -871,14 +871,14 @@ static void decode_spectrum(GetBitContext *gb, Atrac3pChanUnitCtx *ctx,
871871
tab_index = tab->redirect;
872872

873873
decode_qu_spectra(gb, tab, &spec_vlc_tabs[tab_index],
874-
&chan->spectrum[ff_atrac3p_qu_to_spec_pos[qu]],
874+
&chan->spectrum[av_atrac3p_qu_to_spec_pos[qu]],
875875
num_specs);
876876
} else if (ch_num && ctx->channels[0].qu_wordlen[qu] && !codetab) {
877877
/* copy coefficients from master */
878-
memcpy(&chan->spectrum[ff_atrac3p_qu_to_spec_pos[qu]],
879-
&ctx->channels[0].spectrum[ff_atrac3p_qu_to_spec_pos[qu]],
878+
memcpy(&chan->spectrum[av_atrac3p_qu_to_spec_pos[qu]],
879+
&ctx->channels[0].spectrum[av_atrac3p_qu_to_spec_pos[qu]],
880880
num_specs *
881-
sizeof(chan->spectrum[ff_atrac3p_qu_to_spec_pos[qu]]));
881+
sizeof(chan->spectrum[av_atrac3p_qu_to_spec_pos[qu]]));
882882
chan->qu_wordlen[qu] = ctx->channels[0].qu_wordlen[qu];
883883
}
884884
}

ext/at3_standalone/atrac3plus.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ void ff_atrac3p_imdct(FFTContext *mdct_ctx, float *pIn,
229229
void ff_atrac3p_ipqf(FFTContext *dct_ctx, Atrac3pIPQFChannelCtx *hist,
230230
const float *in, float *out);
231231

232-
extern const uint16_t ff_atrac3p_qu_to_spec_pos[33];
233-
extern const float ff_atrac3p_sf_tab[64];
234-
extern const float ff_atrac3p_mant_tab[8];
232+
extern const uint16_t av_atrac3p_qu_to_spec_pos[33];
233+
extern const float av_atrac3p_sf_tab[64];
234+
extern const float av_atrac3p_mant_tab[8];
235235

236236
#endif /* AVCODEC_ATRAC3PLUS_H */

ext/at3_standalone/atrac3plusdec.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ static void decode_residual_spectrum(Atrac3pChanUnitCtx *ctx,
205205
memset(out[ch], 0, ATRAC3P_FRAME_SAMPLES * sizeof(*out[ch]));
206206

207207
for (qu = 0; qu < ctx->used_quant_units; qu++) {
208-
src = &ctx->channels[ch].spectrum[ff_atrac3p_qu_to_spec_pos[qu]];
209-
dst = &out[ch][ff_atrac3p_qu_to_spec_pos[qu]];
210-
nspeclines = ff_atrac3p_qu_to_spec_pos[qu + 1] -
211-
ff_atrac3p_qu_to_spec_pos[qu];
208+
src = &ctx->channels[ch].spectrum[av_atrac3p_qu_to_spec_pos[qu]];
209+
dst = &out[ch][av_atrac3p_qu_to_spec_pos[qu]];
210+
nspeclines = av_atrac3p_qu_to_spec_pos[qu + 1] -
211+
av_atrac3p_qu_to_spec_pos[qu];
212212

213213
if (ctx->channels[ch].qu_wordlen[qu] > 0) {
214-
q = ff_atrac3p_sf_tab[ctx->channels[ch].qu_sf_idx[qu]] *
215-
ff_atrac3p_mant_tab[ctx->channels[ch].qu_wordlen[qu]];
214+
q = av_atrac3p_sf_tab[ctx->channels[ch].qu_sf_idx[qu]] *
215+
av_atrac3p_mant_tab[ctx->channels[ch].qu_wordlen[qu]];
216216
for (i = 0; i < nspeclines; i++)
217217
dst[i] = src[i] * q;
218218
}

ext/at3_standalone/atrac3plusdsp.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* To get the number of spectral lines in each quant unit do the following:
3939
* num_specs = qu_to_spec_pos[i+1] - qu_to_spec_pos[i]
4040
*/
41-
const uint16_t ff_atrac3p_qu_to_spec_pos[33] = {
41+
const uint16_t av_atrac3p_qu_to_spec_pos[33] = {
4242
0, 16, 32, 48, 64, 80, 96, 112,
4343
128, 160, 192, 224, 256, 288, 320, 352,
4444
384, 448, 512, 576, 640, 704, 768, 896,
@@ -48,7 +48,7 @@ const uint16_t ff_atrac3p_qu_to_spec_pos[33] = {
4848

4949
/* Scalefactors table. */
5050
/* Approx. Equ: pow(2.0, (i - 16.0 + 0.501783948) / 3.0) */
51-
const float ff_atrac3p_sf_tab[64] = {
51+
const float av_atrac3p_sf_tab[64] = {
5252
0.027852058, 0.0350914, 0.044212341, 0.055704117, 0.0701828,
5353
0.088424683, 0.11140823, 0.1403656, 0.17684937, 0.22281647, 0.2807312, 0.35369873,
5454
0.44563293, 0.5614624, 0.70739746, 0.89126587, 1.1229248, 1.4147949, 1.7825317,
@@ -63,7 +63,7 @@ const float ff_atrac3p_sf_tab[64] = {
6363

6464
/* Mantissa table. */
6565
/* pow(10, x * log10(2) + 0.05) / 2 / ([1,2,3,5,7,15,31] + 0.5) */
66-
const float ff_atrac3p_mant_tab[8] = {
66+
const float av_atrac3p_mant_tab[8] = {
6767
0.0,
6868
0.74801636,
6969
0.44882202,
@@ -167,7 +167,7 @@ static void waves_synth(Atrac3pWaveSynthParams *synth_param,
167167

168168
/* fade out with steep Hann window if requested */
169169
if (envelope->has_stop_point) {
170-
pos = (envelope->stop_pos + 1 << 2) - reg_offset;
170+
pos = ((envelope->stop_pos + 1) << 2) - reg_offset;
171171
if (pos > 0 && pos <= 128) {
172172
out[pos - 4] *= hann_window[96];
173173
out[pos - 3] *= hann_window[64];
@@ -445,12 +445,12 @@ void ff_atrac3p_power_compensation(Atrac3pChanUnitCtx *ctx, int ch_index,
445445
if (ctx->channels[ch_index].qu_wordlen[qu] <= 0)
446446
continue;
447447

448-
qu_lev = ff_atrac3p_sf_tab[ctx->channels[ch_index].qu_sf_idx[qu]] *
449-
ff_atrac3p_mant_tab[ctx->channels[ch_index].qu_wordlen[qu]] /
448+
qu_lev = av_atrac3p_sf_tab[ctx->channels[ch_index].qu_sf_idx[qu]] *
449+
av_atrac3p_mant_tab[ctx->channels[ch_index].qu_wordlen[qu]] /
450450
(1 << ctx->channels[ch_index].qu_wordlen[qu]) * grp_lev;
451451

452-
dst = &sp[ff_atrac3p_qu_to_spec_pos[qu]];
453-
nsp = ff_atrac3p_qu_to_spec_pos[qu + 1] - ff_atrac3p_qu_to_spec_pos[qu];
452+
dst = &sp[av_atrac3p_qu_to_spec_pos[qu]];
453+
nsp = av_atrac3p_qu_to_spec_pos[qu + 1] - av_atrac3p_qu_to_spec_pos[qu];
454454

455455
for (i = 0; i < nsp; i++)
456456
dst[i] += pwcsp[i] * qu_lev;

0 commit comments

Comments
 (0)