aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-07-09 17:22:59 +0000
committerAlex Converse <alex.converse@gmail.com>2009-07-09 17:22:59 +0000
commit988c170547da735163a297e1c213922ad21fdbda (patch)
tree97ac0f8292dfddd9b2786e7385d29ed5a882571a /libavcodec
parent181b3363043fae8ff05803f792c1cdd8cafd8c41 (diff)
downloadffmpeg-988c170547da735163a297e1c213922ad21fdbda.tar.gz
Change fminf/fmaxf to FFMIN/FFMAX to fix the build on broken operating systems.
Originally committed as revision 19391 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aaccoder.c18
-rw-r--r--libavcodec/aacenc.c2
-rw-r--r--libavcodec/aacpsy.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 920ae53929..f4ae130b7e 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -511,8 +511,8 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
for (i = 0; i < sce->ics.swb_sizes[g]; i++) {
float t = fabsf(coefs[w2*128+i]);
if (t > 0.0f)
- qmin = fminf(qmin, t);
- qmax = fmaxf(qmax, t);
+ qmin = FFMIN(qmin, t);
+ qmax = FFMAX(qmax, t);
}
}
if (nz) {
@@ -534,8 +534,8 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
}
dist = dists[0];
for (i = 1; i <= ESC_BT; i++)
- dist = fminf(dist, dists[i]);
- minrd = fminf(minrd, dist);
+ dist = FFMIN(dist, dists[i]);
+ minrd = FFMIN(minrd, dist);
for (i = FFMAX(q - SCALE_MAX_DIFF, 0); i < FFMIN(q + SCALE_MAX_DIFF, 256); i++) {
float cost;
@@ -640,7 +640,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
uplims[w*16+g] = uplim *512;
sce->zeroes[w*16+g] = !nz;
if (nz)
- minthr = fminf(minthr, uplim);
+ minthr = FFMIN(minthr, uplim);
allz = FFMAX(allz, nz);
}
}
@@ -650,7 +650,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
sce->sf_idx[w*16+g] = SCALE_ONE_POS;
continue;
}
- sce->sf_idx[w*16+g] = SCALE_ONE_POS + fminf(log2(uplims[w*16+g]/minthr)*4,59);
+ sce->sf_idx[w*16+g] = SCALE_ONE_POS + FFMIN(log2(uplims[w*16+g]/minthr)*4,59);
}
}
@@ -810,7 +810,7 @@ static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s,
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
for (i = 0; i < size; i++) {
float t = coefs[w2*128+i]*coefs[w2*128+i];
- maxq[w*16+g] = fmaxf(maxq[w*16+g], fabsf(coefs[w2*128 + i]));
+ maxq[w*16+g] = FFMAX(maxq[w*16+g], fabsf(coefs[w2*128 + i]));
thr += t;
if (sce->ics.num_windows == 1 && maxval < t) {
maxval = t;
@@ -963,8 +963,8 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) {
FFPsyBand *band0 = &s->psy.psy_bands[(s->cur_channel+0)*PSY_MAX_BANDS+(w+w2)*16+g];
FFPsyBand *band1 = &s->psy.psy_bands[(s->cur_channel+1)*PSY_MAX_BANDS+(w+w2)*16+g];
- float minthr = fminf(band0->threshold, band1->threshold);
- float maxthr = fmaxf(band0->threshold, band1->threshold);
+ float minthr = FFMIN(band0->threshold, band1->threshold);
+ float maxthr = FFMAX(band0->threshold, band1->threshold);
for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
M[i] = (sce0->coeffs[start+w2*128+i]
+ sce1->coeffs[start+w2*128+i]) * 0.5;
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index c0fb3607b7..dfa519059c 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -604,7 +604,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
if (!(avctx->flags & CODEC_FLAG_QSCALE)) {
float ratio = avctx->bit_rate * 1024.0f / avctx->sample_rate / avctx->frame_bits;
s->lambda *= ratio;
- s->lambda = fminf(s->lambda, 65536.f);
+ s->lambda = FFMIN(s->lambda, 65536.f);
}
if (!data)
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index f7e73403e9..1200134baf 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -141,7 +141,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) {
for (g = 0; g < ctx->num_bands[j]; g++) {
minscale = ath(ctx->avctx->sample_rate * start / 1024.0, ATH_ADD);
for (i = 1; i < ctx->bands[j][g]; i++)
- minscale = fminf(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD));
+ minscale = FFMIN(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD));
coeffs->ath[g] = minscale - minath;
start += ctx->bands[j][g];
}
@@ -289,8 +289,8 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
for (g = 0; g < num_bands; g++) {
band[g].thr_quiet = FFMAX(band[g].thr, coeffs->ath[g]);
if (wi->num_windows != 8 && wi->window_type[1] != EIGHT_SHORT_SEQUENCE)
- band[g].thr_quiet = fmaxf(PSY_3GPP_RPEMIN*band[g].thr_quiet,
- fminf(band[g].thr_quiet,
+ band[g].thr_quiet = FFMAX(PSY_3GPP_RPEMIN*band[g].thr_quiet,
+ FFMIN(band[g].thr_quiet,
PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet));
band[g].thr = FFMAX(band[g].thr, band[g].thr_quiet * 0.25);