[xiph-commits] r14280 - in trunk/speex: libspeex ti ti/speex_C54_test ti/speex_C55_test ti/speex_C64_test

jm at svn.xiph.org jm at svn.xiph.org
Fri Dec 7 19:42:19 PST 2007


Author: jm
Date: 2007-12-07 19:42:18 -0800 (Fri, 07 Dec 2007)
New Revision: 14280

Modified:
   trunk/speex/libspeex/os_support.h
   trunk/speex/ti/config.h
   trunk/speex/ti/speex_C54_test/speex_C54_test.pjt
   trunk/speex/ti/speex_C55_test/speex_C55_test.pjt
   trunk/speex/ti/speex_C64_test/speex_C64_test.pjt
   trunk/speex/ti/testenc-TI-C5x.c
   trunk/speex/ti/testenc-TI-C64x.c
Log:
Patch by Jim Crichton updating TI DSP support for the library split.


Modified: trunk/speex/libspeex/os_support.h
===================================================================
--- trunk/speex/libspeex/os_support.h	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/libspeex/os_support.h	2007-12-08 03:42:18 UTC (rev 14280)
@@ -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

Modified: trunk/speex/ti/config.h
===================================================================
--- trunk/speex/ti/config.h	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/config.h	2007-12-08 03:42:18 UTC (rev 14280)
@@ -1,69 +1,73 @@
-/* Copyright (C) 2005 Psi Systems, Inc.
-   File: config.h
+/* Copyright (C) 2005 Psi Systems, Inc.
+   File: config.h
    Main Speex option include file for TI C64xx, C54xx and C55xx processors
-   for use with TI Code Composer (TM) DSP development tools.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   
-   - Neither the name of the Xiph.org Foundation nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-   
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
+   for use with TI Code Composer (TM) DSP development tools.
 
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+   
+   - Neither the name of the Xiph.org Foundation nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
 #define FIXED_POINT
 #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)

Modified: trunk/speex/ti/speex_C54_test/speex_C54_test.pjt
===================================================================
--- trunk/speex/ti/speex_C54_test/speex_C54_test.pjt	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/speex_C54_test/speex_C54_test.pjt	2007-12-08 03:42:18 UTC (rev 14280)
@@ -1,7 +1,7 @@
 ; 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\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"

Modified: trunk/speex/ti/speex_C55_test/speex_C55_test.pjt
===================================================================
--- trunk/speex/ti/speex_C55_test/speex_C55_test.pjt	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/speex_C55_test/speex_C55_test.pjt	2007-12-08 03:42:18 UTC (rev 14280)
@@ -1,7 +1,7 @@
 ; 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\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"

Modified: trunk/speex/ti/speex_C64_test/speex_C64_test.pjt
===================================================================
--- trunk/speex/ti/speex_C64_test/speex_C64_test.pjt	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/speex_C64_test/speex_C64_test.pjt	2007-12-08 03:42:18 UTC (rev 14280)
@@ -1,7 +1,7 @@
 ; 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="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\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"

Modified: trunk/speex/ti/testenc-TI-C5x.c
===================================================================
--- trunk/speex/ti/testenc-TI-C5x.c	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/testenc-TI-C5x.c	2007-12-08 03:42:18 UTC (rev 14280)
@@ -184,11 +184,18 @@
    tmp=1;  /* Lowest */
    speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
 
-   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);
+#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 = %ld\n", skip_group_delay);
+
 #ifdef DECODE_ONLY
    bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
    fbits = fopen(bitsFile, "rb");

Modified: trunk/speex/ti/testenc-TI-C64x.c
===================================================================
--- trunk/speex/ti/testenc-TI-C64x.c	2007-12-08 03:41:52 UTC (rev 14279)
+++ trunk/speex/ti/testenc-TI-C64x.c	2007-12-08 03:42:18 UTC (rev 14280)
@@ -1,39 +1,39 @@
-/* Copyright (C) 2005 Psi Systems, Inc.
-   Author:  Jean-Marc Valin 
-   File: testenc-TI-C64x.c
+/* Copyright (C) 2005 Psi Systems, Inc.
+   Author:  Jean-Marc Valin 
+   File: testenc-TI-C64x.c
    Encoder/Decoder Loop Main file for TI TMS320C64xx processor
-   for use with TI Code Composer (TM) DSP development tools.
+   for use with TI Code Composer (TM) DSP development tools.
    Modified from speexlib/testenc.c
 
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   
-   - Neither the name of the Xiph.org Foundation nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-   
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
 
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+   
+   - Neither the name of the Xiph.org Foundation nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -146,9 +146,16 @@
    tmp=1;  /* Lowest */
    speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
 
-   speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
-   speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
-   skip_group_delay += 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);
 
 #ifdef DECODE_ONLY



More information about the commits mailing list