Commit c0c8853f authored by jm's avatar jm
Browse files

Patch by Jim Crichton updating TI DSP support for the library split.


git-svn-id: http://svn.xiph.org/trunk/speex@14280 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent eca7c8c8
......@@ -38,6 +38,13 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef OS_SUPPORT_CUSTOM
#include "os_support_custom.h"
#endif
/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free
NOTE: speex_alloc needs to CLEAR THE MEMORY */
#ifndef OVERRIDE_SPEEX_ALLOC
......
......@@ -35,35 +35,39 @@
#define FRAME_SIZE 160
#define DISABLE_WIDEBAND
/* Disable DC block if doing SNR testing */
#define DISABLE_HIGHPASS
/* Allow for 2 20ms narrowband blocks per frame, plus a couple of bytes */
#define MAX_CHARS_PER_FRAME (42/BYTES_PER_CHAR)
/* for debug */
#undef DECODE_ONLY
#define VERBOSE_ALLOC
/* EITHER Allocate from fixed array (C heap not used) */
/* Enable VERBOSE_ALLOC to see how much is used */
#define MANUAL_ALLOC
#define USER_MISC
#define VERBOSE_ALLOC
#define OS_SUPPORT_CUSTOM
/* OR Use CALLOC (heap size must be increased in linker command file) */
//#undef MANUAL_ALLOC
//#undef USER_MISC
//#undef OS_SUPPORT_CUSTOM
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
//#define PRECISION16
// These values determined by analysis for 8kbps narrowband
#define SPEEXENC_PERSIST_STACK_SIZE 5000
#define SPEEXENC_PERSIST_STACK_SIZE 1000
#define SPEEXENC_SCRATCH_STACK_SIZE 3000
#define SPEEXDEC_PERSIST_STACK_SIZE 2500
#define SPEEXDEC_PERSIST_STACK_SIZE 1000
#define SPEEXDEC_SCRATCH_STACK_SIZE 1000
#else /* C6X */
#define NO_LONGLONG
#define SPEEXENC_PERSIST_STACK_SIZE 10000
#define SPEEXENC_PERSIST_STACK_SIZE 2000
#define SPEEXENC_SCRATCH_STACK_SIZE 6000
#define SPEEXDEC_PERSIST_STACK_SIZE 5000
#define SPEEXDEC_PERSIST_STACK_SIZE 2000
#define SPEEXDEC_SCRATCH_STACK_SIZE 2000
#endif
#define SPEEX_PERSIST_STACK_SIZE (SPEEXENC_PERSIST_STACK_SIZE + SPEEXDEC_PERSIST_STACK_SIZE)
......
; Code Composer Project File, Version 2.0 (do not modify or remove this line)
[Project Settings]
ProjectDir="C:\speex_11234\ti\speex_C54_test\"
ProjectDir="C:\Speex\speex_14274\ti\speex_C54_test\"
ProjectType=Executable
CPUFamily=TMS320C54XX
Tool="Compiler"
......@@ -27,8 +27,6 @@ Source="..\..\libspeex\lpc.c"
Source="..\..\libspeex\lsp.c"
Source="..\..\libspeex\lsp_tables_nb.c"
Source="..\..\libspeex\ltp.c"
Source="..\..\libspeex\math_approx.c"
Source="..\..\libspeex\misc.c"
Source="..\..\libspeex\modes.c"
Source="..\..\libspeex\nb_celp.c"
Source="..\..\libspeex\quant_lsp.c"
......
; Code Composer Project File, Version 2.0 (do not modify or remove this line)
[Project Settings]
ProjectDir="C:\speex_11234\ti\speex_C55_test\"
ProjectDir="C:\Speex\speex_14274\ti\speex_C55_test\"
ProjectType=Executable
CPUFamily=TMS320C55XX
Tool="Compiler"
......@@ -27,8 +27,6 @@ Source="..\..\libspeex\lpc.c"
Source="..\..\libspeex\lsp.c"
Source="..\..\libspeex\lsp_tables_nb.c"
Source="..\..\libspeex\ltp.c"
Source="..\..\libspeex\math_approx.c"
Source="..\..\libspeex\misc.c"
Source="..\..\libspeex\modes.c"
Source="..\..\libspeex\nb_celp.c"
Source="..\..\libspeex\quant_lsp.c"
......
; Code Composer Project File, Version 2.0 (do not modify or remove this line)
[Project Settings]
ProjectDir="C:\speex_11234\ti\speex_C64_test\"
ProjectDir="C:\Speex\speex_14274\ti\speex_C64_test\"
ProjectType=Executable
CPUFamily=TMS320C64XX
Tool="Compiler"
......@@ -12,7 +12,7 @@ Config="Debug"
Config="Release"
[Source Files]
Source="..\..\..\CCStudio_v3.1\C6000\cgtools\lib\rts6400.lib"
Source="..\..\..\..\CCStudio_v3.1\C6000\cgtools\lib\rts6400.lib"
Source="..\..\libspeex\bits.c"
Source="..\..\libspeex\cb_search.c"
Source="..\..\libspeex\exc_10_16_table.c"
......@@ -28,8 +28,6 @@ Source="..\..\libspeex\lpc.c"
Source="..\..\libspeex\lsp.c"
Source="..\..\libspeex\lsp_tables_nb.c"
Source="..\..\libspeex\ltp.c"
Source="..\..\libspeex\math_approx.c"
Source="..\..\libspeex\misc.c"
Source="..\..\libspeex\modes.c"
Source="..\..\libspeex\nb_celp.c"
Source="..\..\libspeex\quant_lsp.c"
......
......@@ -184,10 +184,17 @@ void main()
tmp=1; /* Lowest */
speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
#ifdef DISABLE_HIGHPASS
/* Turn this off if you want to measure SNR (on by default) */
tmp=0;
speex_encoder_ctl(st, SPEEX_SET_HIGHPASS, &tmp);
speex_decoder_ctl(dec, SPEEX_SET_HIGHPASS, &tmp);
#endif
speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
skip_group_delay += tmp;
fprintf (stderr, "decoder lookahead = %d\n", skip_group_delay);
fprintf (stderr, "decoder lookahead = %ld\n", skip_group_delay);
#ifdef DECODE_ONLY
bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
......
......@@ -146,6 +146,13 @@ void main()
tmp=1; /* Lowest */
speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
#ifdef DISABLE_HIGHPASS
/* Turn this off if you want to measure SNR (on by default) */
tmp=0;
speex_encoder_ctl(st, SPEEX_SET_HIGHPASS, &tmp);
speex_decoder_ctl(dec, SPEEX_SET_HIGHPASS, &tmp);
#endif
speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
skip_group_delay += tmp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment