ref: d8578de53c9a0af9bf3cc9d2a008cc0a66eb9b1d
parent: d657db3bf49b42561161ef60d6e3e182e517a5ab
author: menno <menno>
date: Fri Mar 19 10:35:59 EST 2004
Fixed point output possible
--- a/include/neaacdec.h
+++ b/include/neaacdec.h
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: neaacdec.h,v 1.2 2004/03/10 19:45:40 menno Exp $
+** $Id: neaacdec.h,v 1.3 2004/03/19 15:35:59 menno Exp $
**/
#ifndef __NEAACDEC_H__
@@ -95,6 +95,7 @@
#define FAAD_FMT_24BIT 2
#define FAAD_FMT_32BIT 3
#define FAAD_FMT_FLOAT 4
+#define FAAD_FMT_FIXED FAAD_FMT_FLOAT
#define FAAD_FMT_DOUBLE 5
/* Capabilities */
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: decoder.c,v 1.100 2004/03/10 19:53:40 menno Exp $
+** $Id: decoder.c,v 1.101 2004/03/19 15:35:35 menno Exp $
**/
#include "common.h"
@@ -176,12 +176,18 @@
hDecoder->config.defSampleRate = config->defSampleRate;
/* check output format */
- if ((config->outputFormat < 1) || (config->outputFormat > 9))
+#ifdef FIXED_POINT
+ if ((config->outputFormat < 1) || (config->outputFormat > 4))
return 0;
+#else
+ if ((config->outputFormat < 1) || (config->outputFormat > 5))
+ return 0;
+#endif
hDecoder->config.outputFormat = config->outputFormat;
if (config->downMatrix > 1)
- hDecoder->config.downMatrix = config->downMatrix;
+ return 0;
+ hDecoder->config.downMatrix = config->downMatrix;
/* OK */
return 1;
--- a/libfaad/decoder.h
+++ b/libfaad/decoder.h
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: decoder.h,v 1.39 2004/03/10 19:45:41 menno Exp $
+** $Id: decoder.h,v 1.40 2004/03/19 15:35:35 menno Exp $
**/
#ifndef __DECODER_H__
@@ -49,6 +49,7 @@
#define FAAD_FMT_24BIT 2
#define FAAD_FMT_32BIT 3
#define FAAD_FMT_FLOAT 4
+#define FAAD_FMT_FIXED FAAD_FMT_FLOAT
#define FAAD_FMT_DOUBLE 5
#define LC_DEC_CAP (1<<0)
--- a/libfaad/output.c
+++ b/libfaad/output.c
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: output.c,v 1.38 2004/03/11 14:34:10 menno Exp $
+** $Id: output.c,v 1.42 2004/09/04 14:56:28 menno Exp $
**/
#include "common.h"
@@ -537,6 +537,14 @@
tmp += -(1 << (16-REAL_BITS-1));
tmp <<= (16-REAL_BITS);
}
+ int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
+ }
+ break;
+ case FAAD_FMT_FIXED:
+ for(i = 0; i < frame_len; i++)
+ {
+ real_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
+ hDecoder->internal_channel);
int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
}
break;