ref: 4041be70bf23c172dda3d107e19d84c2fb58f644
parent: 89b8ee4d3bb58e01998568672231c546636a2461
author: menno <menno>
date: Sat Mar 16 10:49:58 EST 2002
fix in output
--- a/libfaad/output.c
+++ b/libfaad/output.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: output.c,v 1.8 2002/03/16 15:43:28 menno Exp $
+** $Id: output.c,v 1.9 2002/03/16 15:49:58 menno Exp $
**/
#include "common.h"
@@ -67,10 +67,10 @@
{
for(i = 0; i < frame_len; i++)
{
- if (input[ch][i] > (1<<16)-1)
- input[ch][i] = (1<<16)-1;
- else if (input[ch][i] < -(1<<16))
- input[ch][i] = -(1<<16);
+ if (input[ch][i] > (1<<15)-1)
+ input[ch][i] = (1<<15)-1;
+ else if (input[ch][i] < -(1<<15))
+ input[ch][i] = -(1<<15);
int_sample_buffer[(i*channels)+ch] = ROUND(input[ch][i]*(1<<8));
}
}
@@ -80,10 +80,10 @@
{
for(i = 0; i < frame_len; i++)
{
- if (input[ch][i] > (1<<16)-1)
- input[ch][i] = (1<<16)-1;
- else if (input[ch][i] < -(1<<16))
- input[ch][i] = -(1<<16);
+ if (input[ch][i] > (1<<15)-1)
+ input[ch][i] = (1<<15)-1;
+ else if (input[ch][i] < -(1<<15))
+ input[ch][i] = -(1<<15);
int_sample_buffer[(i*channels)+ch] = ROUND32(input[ch][i]*(1<<16));
}
}
@@ -93,10 +93,10 @@
{
for(i = 0; i < frame_len; i++)
{
- if (input[ch][i] > (1<<16)-1)
- input[ch][i] = (1<<16)-1;
- else if (input[ch][i] < -(1<<16))
- input[ch][i] = -(1<<16);
+ if (input[ch][i] > (1<<15)-1)
+ input[ch][i] = (1<<15)-1;
+ else if (input[ch][i] < -(1<<15))
+ input[ch][i] = -(1<<15);
float_sample_buffer[(i*channels)+ch] = input[ch][i]*FLOAT_SCALE;
}
}