History

fix hardcoded tables compililation caused by missing math constants

Add -D_XOPEN_SOURCE=600 to host cflags to make the constants in math.h available. Include math.h where necessary and remove redundant M_PI defines.

Janne Grunau committed 14 years ago

Commit 1d01fee1 parent 67ffcb94 files · +2 −7Browse files

Unified · Split

4 files
  1. configure +1 −1
  2. libavcodec/aacps_tablegen.h +1 −0
  3. libavcodec/cos_tablegen.c +0 −3
  4. libavcodec/sinewin_tablegen.c +0 −3
configure+1−1
@@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' · 1681 unmodified lines
1682AS_O='-o $@'1682AS_O='-o $@'
1683CC_O='-o $@'1683CC_O='-o $@'
1684 1684
1685host_cflags='-D_ISOC99_SOURCE -O3 -g'1685host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
1686host_libs='-lm'1686host_libs='-lm'
1687 1687
1688target_path='$(CURDIR)'1688target_path='$(CURDIR)'
libavcodec/aacps_tablegen.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
23#ifndef AACPS_TABLEGEN_H23#ifndef AACPS_TABLEGEN_H
24#define AACPS_TABLEGEN_H24#define AACPS_TABLEGEN_H
25 25
26#include <math.h>
26#include <stdint.h>27#include <stdint.h>
27 28
28#if CONFIG_HARDCODED_TABLES29#if CONFIG_HARDCODED_TABLES
libavcodec/cos_tablegen.c+0−3
@@ -24,9 +24,6 @@ · 23 unmodified lines
24#include <string.h>24#include <string.h>
25#include <math.h>25#include <math.h>
26 26
27#ifndef M_PI
28#define M_PI 3.14159265358979323846
29#endif
30#define BITS 1627#define BITS 16
31#define FLOATFMT "%.18e"28#define FLOATFMT "%.18e"
32#define FIXEDFMT "%6d"29#define FIXEDFMT "%6d"
libavcodec/sinewin_tablegen.c+0−3
@@ -26,9 +26,6 @@ · 25 unmodified lines
26#define SINETABLE(size) \26#define SINETABLE(size) \
27 float ff_sine_##size[size]27 float ff_sine_##size[size]
28#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))28#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
29#ifndef M_PI
30#define M_PI 3.14159265358979323846
31#endif
32#include "sinewin_tablegen.h"29#include "sinewin_tablegen.h"
33#include "tableprint.h"30#include "tableprint.h"
34 31

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t