summaryrefslogtreecommitdiffstats
path: root/libtoolame-dab
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-04 19:09:39 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-04 19:09:39 +0200
commit085398614ad0326d48eb8bfe402e0f4044bf0230 (patch)
tree1174ec154b22ad352043daaa27f9517732f9372e /libtoolame-dab
parentb68380ba3c00f6db0d60ec5fe9ec72bb230ea7ad (diff)
downloadODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.tar.gz
ODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.tar.bz2
ODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.zip
Enable compilation warnings, and switch toolame-dab to using double
Diffstat (limited to 'libtoolame-dab')
-rw-r--r--libtoolame-dab/ath.c5
-rw-r--r--libtoolame-dab/ath.h4
-rw-r--r--libtoolame-dab/common.h4
-rw-r--r--libtoolame-dab/psycho_3.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/libtoolame-dab/ath.c b/libtoolame-dab/ath.c
index 8544752..94baf8e 100644
--- a/libtoolame-dab/ath.c
+++ b/libtoolame-dab/ath.c
@@ -51,9 +51,8 @@ bitrate is more balanced according to the -V value.*/
/* Convert ATH values from dB into energy values as required by the psycho model */
-float ATH_energy(float freq, float value) {
- float db;
- db = ATH_dB(freq, 0) + value; // Originally: ATH_dB(freq,value)
+FLOAT8 ATH_energy(FLOAT8 freq, FLOAT8 value) {
+ FLOAT db = ATH_dB(freq, 0) + value; // Originally: ATH_dB(freq,value)
/* The values in the standard, and from the ATH formula are in dB.
In the psycho model we are working in the energy domain. Hence the values that
are in the absthr_X tables are not in dB. This function converts from dB into the energy domain.
diff --git a/libtoolame-dab/ath.h b/libtoolame-dab/ath.h
index 297f91f..ee35a82 100644
--- a/libtoolame-dab/ath.h
+++ b/libtoolame-dab/ath.h
@@ -1,3 +1,3 @@
-FLOAT8 ATH_dB(FLOAT8 f, FLOAT8 value);
-FLOAT8 ATH_energy(FLOAT8 f, FLOAT8 value);
+FLOAT8 ATH_dB(FLOAT8 freq, FLOAT8 value);
+FLOAT8 ATH_energy(FLOAT8 freq, FLOAT8 value);
FLOAT8 freq2bark(FLOAT8 freq);
diff --git a/libtoolame-dab/common.h b/libtoolame-dab/common.h
index 0a19af6..9f56a4e 100644
--- a/libtoolame-dab/common.h
+++ b/libtoolame-dab/common.h
@@ -9,7 +9,7 @@
#define EXIT_FAILURE 1
#endif
-#define FLOAT float
+#define FLOAT double
#ifndef FALSE
#define FALSE 0
@@ -78,7 +78,7 @@
#define BUFFER_SIZE 4096
-#define FLOAT8 float
+#define FLOAT8 double
/***********************************************************************
*
* Global Type Definitions
diff --git a/libtoolame-dab/psycho_3.c b/libtoolame-dab/psycho_3.c
index 3dbd462..c623b7f 100644
--- a/libtoolame-dab/psycho_3.c
+++ b/libtoolame-dab/psycho_3.c
@@ -454,7 +454,7 @@ void psycho_3_init(options *glopts) {
by 1.0 of a bark, start a new critical band. */
numlines = (int *)calloc(HBLKSIZE, sizeof(int));
- cbval = (float *)calloc(HBLKSIZE, sizeof(float));
+ cbval = (FLOAT*)calloc(HBLKSIZE, sizeof(FLOAT));
cbandindex[0] = 1;
for (i=1;i<HBLKSIZE;i++) {
if ((bark[i] - bark[cbase]) > 1.0) { /* 1 critical band? 1 bark? */