Gets rid of unused boost analysis code that never worked anyway.
Also removes the -exp_analysis suffix from opus_get_version_string() and fixes a "ISO C90 forbids mixed declarations and code" warning.
This commit is contained in:
parent
7315b35e13
commit
0e490591b7
3 changed files with 1 additions and 27 deletions
|
@ -322,7 +322,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
|
||||||
opus_val16 follower;
|
opus_val16 follower;
|
||||||
int metric=0;
|
int metric=0;
|
||||||
int fmetric=0, bmetric=0;
|
int fmetric=0, bmetric=0;
|
||||||
int count1, count2, count3, count4, count5;;
|
int count1, count2, count3, count4, count5;
|
||||||
|
|
||||||
SAVE_STACK;
|
SAVE_STACK;
|
||||||
ALLOC(tmp, len, opus_val16);
|
ALLOC(tmp, len, opus_val16);
|
||||||
|
@ -3180,7 +3180,6 @@ const char *opus_strerror(int error)
|
||||||
const char *opus_get_version_string(void)
|
const char *opus_get_version_string(void)
|
||||||
{
|
{
|
||||||
return "libopus " OPUS_VERSION
|
return "libopus " OPUS_VERSION
|
||||||
"-exp_analysis"
|
|
||||||
#ifdef FIXED_POINT
|
#ifdef FIXED_POINT
|
||||||
"-fixed"
|
"-fixed"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,8 +56,6 @@ typedef struct {
|
||||||
opus_val16 tonality_slope;
|
opus_val16 tonality_slope;
|
||||||
opus_val16 noisiness;
|
opus_val16 noisiness;
|
||||||
opus_val16 activity;
|
opus_val16 activity;
|
||||||
int boost_band[2];
|
|
||||||
opus_val16 boost_amount[2];
|
|
||||||
opus_val16 music_prob;
|
opus_val16 music_prob;
|
||||||
}AnalysisInfo;
|
}AnalysisInfo;
|
||||||
|
|
||||||
|
|
|
@ -249,8 +249,6 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, CELTEnc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
relativeE = 0;
|
relativeE = 0;
|
||||||
info->boost_amount[0]=info->boost_amount[1]=0;
|
|
||||||
info->boost_band[0]=info->boost_band[1]=0;
|
|
||||||
frame_loudness = 0;
|
frame_loudness = 0;
|
||||||
bandwidth_mask = 0;
|
bandwidth_mask = 0;
|
||||||
for (b=0;b<NB_TBANDS;b++)
|
for (b=0;b<NB_TBANDS;b++)
|
||||||
|
@ -316,19 +314,6 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, CELTEnc
|
||||||
max_frame_tonality = MAX16(max_frame_tonality, (1+.03*(b-NB_TBANDS))*frame_tonality);
|
max_frame_tonality = MAX16(max_frame_tonality, (1+.03*(b-NB_TBANDS))*frame_tonality);
|
||||||
slope += band_tonality[b]*(b-8);
|
slope += band_tonality[b]*(b-8);
|
||||||
/*printf("%f %f ", band_tonality[b], stationarity);*/
|
/*printf("%f %f ", band_tonality[b], stationarity);*/
|
||||||
if (band_tonality[b] > info->boost_amount[1] && b>=7 && b < NB_TBANDS-1)
|
|
||||||
{
|
|
||||||
if (band_tonality[b] > info->boost_amount[0])
|
|
||||||
{
|
|
||||||
info->boost_amount[1] = info->boost_amount[0];
|
|
||||||
info->boost_band[1] = info->boost_band[0];
|
|
||||||
info->boost_amount[0] = band_tonality[b];
|
|
||||||
info->boost_band[0] = b;
|
|
||||||
} else {
|
|
||||||
info->boost_amount[1] = band_tonality[b];
|
|
||||||
info->boost_band[1] = b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tonal->prev_band_tonality[b] = band_tonality[b];
|
tonal->prev_band_tonality[b] = band_tonality[b];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,14 +344,6 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, CELTEnc
|
||||||
frame_tonality = (max_frame_tonality/(NB_TBANDS-NB_TONAL_SKIP_BANDS));
|
frame_tonality = (max_frame_tonality/(NB_TBANDS-NB_TONAL_SKIP_BANDS));
|
||||||
frame_tonality = MAX16(frame_tonality, tonal->prev_tonality*.8);
|
frame_tonality = MAX16(frame_tonality, tonal->prev_tonality*.8);
|
||||||
tonal->prev_tonality = frame_tonality;
|
tonal->prev_tonality = frame_tonality;
|
||||||
info->boost_amount[0] -= frame_tonality+.2;
|
|
||||||
info->boost_amount[1] -= frame_tonality+.2;
|
|
||||||
if (band_tonality[info->boost_band[0]] < band_tonality[info->boost_band[0]+1]+.15
|
|
||||||
|| band_tonality[info->boost_band[0]] < band_tonality[info->boost_band[0]-1]+.15)
|
|
||||||
info->boost_amount[0]=0;
|
|
||||||
if (band_tonality[info->boost_band[1]] < band_tonality[info->boost_band[1]+1]+.15
|
|
||||||
|| band_tonality[info->boost_band[1]] < band_tonality[info->boost_band[1]-1]+.15)
|
|
||||||
info->boost_amount[1]=0;
|
|
||||||
|
|
||||||
slope /= 8*8;
|
slope /= 8*8;
|
||||||
info->tonality_slope = slope;
|
info->tonality_slope = slope;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue