FFmpeg
2.8.17
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
libavcodec
mathops.c
Go to the documentation of this file.
1
#include "
mathops.h
"
2
3
#ifdef TEST
4
5
#include <stdlib.h>
6
7
int
main
(
void
)
8
{
9
unsigned
u
;
10
11
for
(u=0; u<65536; u++) {
12
unsigned
s
= u*
u
;
13
unsigned
root =
ff_sqrt
(s);
14
unsigned
root_m1 =
ff_sqrt
(s-1);
15
if
(s && root != u) {
16
fprintf(stderr,
"ff_sqrt failed at %u with %u\n"
, s, root);
17
return
1;
18
}
19
if
(u && root_m1 != u - 1) {
20
fprintf(stderr,
"ff_sqrt failed at %u with %u\n"
, s, root);
21
return
1;
22
}
23
}
24
return
0;
25
}
26
#endif
/* TEST */
s
const char * s
Definition:
avisynth_c.h:631
ff_sqrt
#define ff_sqrt
Definition:
mathops.h:214
mathops.h
u
float u
Definition:
avf_showspectrum.c:96
main
int main(int argc, char **argv)
Definition:
main.c:22
Generated on Wed Jul 8 2020 07:31:55 for FFmpeg by
1.8.8