tests/audiomatch: removes a warning when compiling tests/audiomatch
the warning message: warning: using floating point absolute value function 'fabs' when argument is of integer type use FFABS to set the absolute value. Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
This commit is contained in:
parent
7fc97fb7f4
commit
bc90145fa3
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
|
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
|
||||||
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
|
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
|
||||||
|
|
||||||
static int64_t fsize(FILE *f) {
|
static int64_t fsize(FILE *f) {
|
||||||
int64_t end, pos = ftell(f);
|
int64_t end, pos = ftell(f);
|
||||||
@ -101,9 +102,9 @@ int main(int argc, char **argv) {
|
|||||||
int j = pos + i;
|
int j = pos + i;
|
||||||
c += signal[i] * data[j];
|
c += signal[i] * data[j];
|
||||||
}
|
}
|
||||||
if (fabs(c) > sigamp * 0.94)
|
if (FFABS(c) > sigamp * 0.94)
|
||||||
maxshift = FFMIN(maxshift, fabs(pos)+32);
|
maxshift = FFMIN(maxshift, FFABS(pos)+32);
|
||||||
if (fabs(c) > fabs(bestc)) {
|
if (FFABS(c) > FFABS(bestc)) {
|
||||||
bestc = c;
|
bestc = c;
|
||||||
bestpos = pos;
|
bestpos = pos;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user