Revision 6785e927

View differences:

doc/tablegen.txt
12 12
Both of these files will be compiled for the host system, so to avoid
13 13
breakage with cross-compilation neither of them may include, directly
14 14
or indirectly, config.h or avconfig.h.
15
This means that e.g. libavutil/mathematics.h is ok but libavutil/libm.h is not.
15 16
Due to this, the .c file or Makefile may have to provide additional defines
16 17
or stubs, though if possible this should be avoided.
17 18
In particular, CONFIG_HARDCODED_TABLES should always be defined to 0.
libavcodec/mdct_tablegen.h
21 21
 */
22 22

  
23 23
#include <assert.h>
24
// do not use libavutil/mathematics.h since this is compiled both
24
// do not use libavutil/libm.h since this is compiled both
25 25
// for the host and the target and config.h is only valid for the target
26 26
#include <math.h>
27 27
#include "../libavutil/attributes.h"
libavcodec/mpegaudio_tablegen.h
24 24
#define MPEGAUDIO_TABLEGEN_H
25 25

  
26 26
#include <stdint.h>
27
// do not use libavutil/mathematics.h since this is compiled both
28
// for the host and the target and config.h is only valid for the target
29 27
#include <math.h>
30 28

  
31 29
#define TABLE_4_3_SIZE (8191 + 16)*4
libavcodec/ps_tablegen.h
24 24
#define PS_TABLEGEN_H
25 25

  
26 26
#include <stdint.h>
27
#include <math.h>
28 27

  
29 28
#if CONFIG_HARDCODED_TABLES
30 29
#define ps_tableinit()
31 30
#include "libavcodec/ps_tables.h"
32 31
#else
33 32
#include "../libavutil/common.h"
34
#ifndef M_SQRT1_2
35
#define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
36
#endif
37
#ifndef M_PI
38
#define M_PI           3.14159265358979323846  /* pi */
39
#endif
40
#ifndef M_SQRT2
41
#define M_SQRT2        1.41421356237309504880  /* sqrt(2) */
42
#endif
33
#include "../libavutil/mathematics.h"
43 34
#define NR_ALLPASS_BANDS20 30
44 35
#define NR_ALLPASS_BANDS34 50
45 36
#define PS_AP_LINKS 3

Also available in: Unified diff