comparison aacpsy.c @ 9944:c5ca5e520fe1 libavcodec

Change fminf/fmaxf to FFMIN/FFMAX to fix the build on broken operating systems.
author alexc
date Thu, 09 Jul 2009 17:22:59 +0000
parents 6c1ac45b3097
children 7dd2a45249a9
comparison
equal deleted inserted replaced
9943:2cd0d1447bd3 9944:c5ca5e520fe1
139 } 139 }
140 start = 0; 140 start = 0;
141 for (g = 0; g < ctx->num_bands[j]; g++) { 141 for (g = 0; g < ctx->num_bands[j]; g++) {
142 minscale = ath(ctx->avctx->sample_rate * start / 1024.0, ATH_ADD); 142 minscale = ath(ctx->avctx->sample_rate * start / 1024.0, ATH_ADD);
143 for (i = 1; i < ctx->bands[j][g]; i++) 143 for (i = 1; i < ctx->bands[j][g]; i++)
144 minscale = fminf(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD)); 144 minscale = FFMIN(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD));
145 coeffs->ath[g] = minscale - minath; 145 coeffs->ath[g] = minscale - minath;
146 start += ctx->bands[j][g]; 146 start += ctx->bands[j][g];
147 } 147 }
148 } 148 }
149 149
287 for (g = num_bands - 2; g >= 0; g--) 287 for (g = num_bands - 2; g >= 0; g--)
288 band[g].thr = FFMAX(band[g].thr, band[g+1].thr * coeffs->spread_hi [g]); 288 band[g].thr = FFMAX(band[g].thr, band[g+1].thr * coeffs->spread_hi [g]);
289 for (g = 0; g < num_bands; g++) { 289 for (g = 0; g < num_bands; g++) {
290 band[g].thr_quiet = FFMAX(band[g].thr, coeffs->ath[g]); 290 band[g].thr_quiet = FFMAX(band[g].thr, coeffs->ath[g]);
291 if (wi->num_windows != 8 && wi->window_type[1] != EIGHT_SHORT_SEQUENCE) 291 if (wi->num_windows != 8 && wi->window_type[1] != EIGHT_SHORT_SEQUENCE)
292 band[g].thr_quiet = fmaxf(PSY_3GPP_RPEMIN*band[g].thr_quiet, 292 band[g].thr_quiet = FFMAX(PSY_3GPP_RPEMIN*band[g].thr_quiet,
293 fminf(band[g].thr_quiet, 293 FFMIN(band[g].thr_quiet,
294 PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet)); 294 PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet));
295 band[g].thr = FFMAX(band[g].thr, band[g].thr_quiet * 0.25); 295 band[g].thr = FFMAX(band[g].thr, band[g].thr_quiet * 0.25);
296 296
297 ctx->psy_bands[channel*PSY_MAX_BANDS+w+g].threshold = band[g].thr; 297 ctx->psy_bands[channel*PSY_MAX_BANDS+w+g].threshold = band[g].thr;
298 } 298 }