ref: 856aa84b8e53dea0c8ff91934f29a11368be9c1e
parent: 51f4cf464be2e455f593347580657b2b439692f8
author: knik <knik>
date: Thu Jul 10 15:17:44 EDT 2003
24-bit input
--- a/include/faac.h
+++ b/include/faac.h
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: faac.h,v 1.27 2003/06/26 19:18:02 knik Exp $
+ * $Id: faac.h,v 1.28 2003/07/10 19:16:01 knik Exp $
*/
#ifndef FAACLIB_H
@@ -117,11 +117,11 @@
unsigned long* pSizeOfDecoderSpecificInfo);
int FAACAPI faacEncEncode(faacEncHandle hEncoder,
- short *inputBuffer,
- unsigned int samplesInput,
- unsigned char *outputBuffer,
- unsigned int bufferSize
- );
+ int32_t *inputBuffer,
+ unsigned int samplesInput,
+ unsigned char *outputBuffer,
+ unsigned int bufferSize
+ );
int FAACAPI faacEncClose(faacEncHandle hEncoder);
--- a/libfaac/frame.c
+++ b/libfaac/frame.c
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.c,v 1.37 2003/06/26 19:20:09 knik Exp $
+ * $Id: frame.c,v 1.38 2003/07/10 19:17:01 knik Exp $
*/
/*
@@ -357,7 +357,7 @@
}
int FAACAPI faacEncEncode(faacEncHandle hEncoder,
- short *inputBuffer,
+ int32_t *inputBuffer,
unsigned int samplesInput,
unsigned char *outputBuffer,
unsigned int bufferSize
@@ -428,7 +428,7 @@
} else {
for (i = 0; i < (int)(samplesInput/numChannels); i++)
hEncoder->next3SampleBuff[channel][i] =
- (double)inputBuffer[(i*numChannels)+channel];
+ (1.0/256) * (double)inputBuffer[(i*numChannels)+channel];
for (i = (int)(samplesInput/numChannels); i < FRAME_LEN; i++)
hEncoder->next3SampleBuff[channel][i] = 0.0;
}
@@ -777,6 +777,9 @@
/*
$Log: frame.c,v $
+Revision 1.38 2003/07/10 19:17:01 knik
+24-bit input
+
Revision 1.37 2003/06/26 19:20:09 knik
Mid/Side support.
Copyright info moved from frontend.
--- a/libfaac/frame.h
+++ b/libfaac/frame.h
@@ -16,12 +16,30 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.h,v 1.19 2003/06/26 19:20:20 knik Exp $
+ * $Id: frame.h,v 1.20 2003/07/10 19:17:44 knik Exp $
*/
#ifndef FRAME_H
#define FRAME_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifndef HAVE_INT32_T
+typedef int int32_t;
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -160,7 +178,7 @@
unsigned long *maxOutputBytes);
int FAACAPI faacEncEncode(faacEncHandle hEncoder,
- short *inputBuffer,
+ int32_t *inputBuffer,
unsigned int samplesInput,
unsigned char *outputBuffer,
unsigned int bufferSize