Revert "Fixes a number of double promotions and missing casts."

This reverts commit 43279728cd.
This commit is contained in:
Gregory Maxwell 2013-07-15 15:51:24 -07:00
parent 4effd30882
commit 5280c71883
6 changed files with 32 additions and 32 deletions

View file

@ -327,7 +327,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
/* Costs two sqrt() to avoid overflows */
mean = MULT16_16(celt_sqrt(mean), celt_sqrt(MULT16_16(maxE,len2>>1)));
#else
mean = celt_sqrt(mean * maxE*.5f*len2);
mean = celt_sqrt(mean * maxE*.5*len2);
#endif
/* Inverse of the mean energy in Q15+6 */
norm = SHL32(EXTEND32(len2),6+14)/ADD32(EPSILON,SHR32(mean,1));
@ -1139,7 +1139,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
/*printf("%f %f %f %f %d %d ", st->analysis.activity, st->analysis.tonality, tf_estimate, st->stereo_saving, tot_boost, coded_bands);*/
#ifndef FIXED_POINT
if (analysis->valid && analysis->activity<.4f)
if (analysis->valid && analysis->activity<.4)
target -= (opus_int32)((coded_bins<<BITRES)*(.4f-analysis->activity));
#endif
/* Stereo savings */
@ -1457,8 +1457,8 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
prefilter_tapset = st->tapset_decision;
pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes);
if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3f)
&& (pitch_index > 1.26f*st->prefilter_period || pitch_index < .79f*st->prefilter_period))
if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3)
&& (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period))
pitch_change = 1;
if (pf_on==0)
{