mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
lavfi: Fix aix compilation.
Rename hz in af_apulsator.c and avf_showspectrum.c as hertz. The aix header sys/m_param.h defines hz as __hz.
This commit is contained in:
parent
4e6d1c1f4e
commit
d44af9a38e
@ -47,7 +47,7 @@ typedef struct AudioPulsatorContext {
|
|||||||
double offset_r;
|
double offset_r;
|
||||||
double pwidth;
|
double pwidth;
|
||||||
double bpm;
|
double bpm;
|
||||||
double hz;
|
double hertz;
|
||||||
int ms;
|
int ms;
|
||||||
int timing;
|
int timing;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ static const AVOption apulsator_options[] = {
|
|||||||
{ "hz", NULL, 0, AV_OPT_TYPE_CONST, {.i64=UNIT_HZ}, 0, 0, FLAGS, "timing" },
|
{ "hz", NULL, 0, AV_OPT_TYPE_CONST, {.i64=UNIT_HZ}, 0, 0, FLAGS, "timing" },
|
||||||
{ "bpm", "set BPM", OFFSET(bpm), AV_OPT_TYPE_DOUBLE, {.dbl=120}, 30, 300, FLAGS },
|
{ "bpm", "set BPM", OFFSET(bpm), AV_OPT_TYPE_DOUBLE, {.dbl=120}, 30, 300, FLAGS },
|
||||||
{ "ms", "set ms", OFFSET(ms), AV_OPT_TYPE_INT, {.i64=500}, 10, 2000, FLAGS },
|
{ "ms", "set ms", OFFSET(ms), AV_OPT_TYPE_INT, {.i64=500}, 10, 2000, FLAGS },
|
||||||
{ "hz", "set frequency", OFFSET(hz), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0.01, 100, FLAGS },
|
{ "hz", "set frequency", OFFSET(hertz), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0.01, 100, FLAGS },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
switch (s->timing) {
|
switch (s->timing) {
|
||||||
case UNIT_BPM: freq = s->bpm / 60; break;
|
case UNIT_BPM: freq = s->bpm / 60; break;
|
||||||
case UNIT_MS: freq = 1 / (s->ms / 1000.); break;
|
case UNIT_MS: freq = 1 / (s->ms / 1000.); break;
|
||||||
case UNIT_HZ: freq = s->hz; break;
|
case UNIT_HZ: freq = s->hertz; break;
|
||||||
default: av_assert0(0);
|
default: av_assert0(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1120,13 +1120,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
|
|||||||
dst[x] = 200;
|
dst[x] = 200;
|
||||||
}
|
}
|
||||||
for (y = 0; y < h; y += 40) {
|
for (y = 0; y < h; y += 40) {
|
||||||
float hz = y * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(h)));
|
float hertz = y * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(h)));
|
||||||
char *units;
|
char *units;
|
||||||
|
|
||||||
if (hz == 0)
|
if (hertz == 0)
|
||||||
units = av_asprintf("DC");
|
units = av_asprintf("DC");
|
||||||
else
|
else
|
||||||
units = av_asprintf("%.2f", hz);
|
units = av_asprintf("%.2f", hertz);
|
||||||
if (!units)
|
if (!units)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
@ -1185,13 +1185,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
|
|||||||
dst[x] = 200;
|
dst[x] = 200;
|
||||||
}
|
}
|
||||||
for (x = 0; x < w; x += 80) {
|
for (x = 0; x < w; x += 80) {
|
||||||
float hz = x * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(w)));
|
float hertz = x * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(w)));
|
||||||
char *units;
|
char *units;
|
||||||
|
|
||||||
if (hz == 0)
|
if (hertz == 0)
|
||||||
units = av_asprintf("DC");
|
units = av_asprintf("DC");
|
||||||
else
|
else
|
||||||
units = av_asprintf("%.2f", hz);
|
units = av_asprintf("%.2f", hertz);
|
||||||
if (!units)
|
if (!units)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user