Kenji Chan
2004-Aug-06 15:01 UTC
[speex-dev] [ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
I emailed Jean-Marc the arch.h about one week ago, not quite sure whether he actually received that email. Anyway, here I have an improved version of arch.h that I believe that it would be better, to use __int64 only if compiling on eMbedded Visual C++ compiler, so for any other compiler, keep it the same (use long long) ---------------------------------- Chan Kei Yuen (Kenji) -----Original Message----- From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf Of Asheesh Vashishtha Sent: Monday, May 31, 2004 11:05 PM To: speex-dev@xiph.org Cc: Jean-Marc.Valin@USherbrooke.ca; Varun Sharma; Sanjeev Jagtap Subject: [speex-dev] [ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code Hi Jean-Marc, Based on the wonderful Speex project, I've created SpeexOutLoud, essentially a Speex codec port for Windows Mobile 2003 devices. I've included a sample project intended to show the usage of SpeexOutLoud codec in a Pocket PC application based on .NET Compact Framework. I'd request you to please go through the attached build, and include it as a contribution to the ever-increasing group of people making use of Speex. If you feel the code is OK; it should probably go somewhere beneath the win32 directory within speex-1.1.x, and with the speex sample code. Please let me know if you have any queries/comments/suggestions. The attached README has compile/usage/bug-notes. Thanks & regards, Asheesh (asheeshv@grapecity.com) <<PocketPCPortRelease.zip>> <<arch.h>> <p><p> -------------- next part -------------- /* Copyright (C) 2003 Jean-Marc Valin */ /** @file arch.h @brief Various architecture definitions Speex */ /* 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. */ #ifndef ARCH_H #define ARCH_H #define ABS(x) ((x) < 0 ? (-(x)) : (x)) #ifdef FIXED_POINT typedef signed short spx_word16_t; typedef signed int spx_word32_t; /*long long is not recognized by eMbedded Visual C++ compiler; so use MS's __int64 instead of long long, if compiling on that compiler */ #if defined(_WIN32_WCE) && defined(_MSC_VER) typedef __int64 spx_word64_t; #else typedef long long spx_word64_t; #endif typedef spx_word32_t spx_mem_t; typedef spx_word16_t spx_coef_t; typedef spx_word16_t spx_lsp_t; typedef spx_word32_t spx_sig_t; #define LPC_SCALING 8192 #define SIG_SCALING 16384 #define LSP_SCALING 8192. #define GAMMA_SCALING 32768. #define GAIN_SCALING 64 #define GAIN_SCALING_1 0.015625 #define LPC_SHIFT 13 #define SIG_SHIFT 14 #define VERY_SMALL 0 #ifdef ARM_ASM #include "fixed_arm.h" #elif defined (FIXED_DEBUG) #include "fixed_debug.h" #else #include "fixed_generic.h" #endif #else typedef float spx_mem_t; typedef float spx_coef_t; typedef float spx_lsp_t; typedef float spx_sig_t; typedef float spx_word16_t; typedef float spx_word32_t; typedef float spx_word64_t; #define LPC_SCALING 1. #define SIG_SCALING 1. #define LSP_SCALING 1. #define GAMMA_SCALING 1. #define GAIN_SCALING 1. #define GAIN_SCALING_1 1. #define LPC_SHIFT 0 #define SIG_SHIFT 0 #define VERY_SMALL 1e-30 #define PSHR(a,shift) (a) #define SHR(a,shift) (a) #define SHL(a,shift) (a) #define SATURATE(x,a) (x) #define ADD16(a,b) ((a)+(b)) #define SUB16(a,b) ((a)-(b)) #define ADD32(a,b) ((a)+(b)) #define SUB32(a,b) ((a)-(b)) #define ADD64(a,b) ((a)+(b)) #define MULT16_16_16(a,b) ((a)*(b)) #define MULT16_16(a,b) ((a)*(b)) #define MAC16_16(c,a,b) ((c)+(a)*(b)) #define MULT16_32_Q11(a,b) ((a)*(b)) #define MULT16_32_Q13(a,b) ((a)*(b)) #define MULT16_32_Q14(a,b) ((a)*(b)) #define MULT16_32_Q15(a,b) ((a)*(b)) #define MAC16_32_Q11(c,a,b) ((c)+(a)*(b)) #define MAC16_32_Q15(c,a,b) ((c)+(a)*(b)) #define MAC16_16_Q11(c,a,b) ((c)+(a)*(b)) #define MULT16_16_Q11(a,b) ((a)*(b)) #define MULT16_16_Q13(a,b) ((a)*(b)) #define MULT16_16_Q14(a,b) ((a)*(b)) #define MULT16_16_Q15(a,b) ((a)*(b)) #define DIV32_16(a,b) ((a)/(b)) #define DIV32(a,b) ((a)/(b)) #endif #endif
Asheesh Vashishtha
2004-Aug-06 15:02 UTC
[speex-dev] [ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
Hi Jean-Marc, Based on the wonderful Speex project, I've created SpeexOutLoud, essentially a Speex codec port for Windows Mobile 2003 devices. I've included a sample project intended to show the usage of SpeexOutLoud codec in a Pocket PC application based on .NET Compact Framework. I'd request you to please go through the attached build, and include it as a contribution to the ever-increasing group of people making use of Speex. If you feel the code is OK; it should probably go somewhere beneath the win32 directory within speex-1.1.x, and with the speex sample code. Please let me know if you have any queries/comments/suggestions. The attached README has compile/usage/bug-notes. Thanks & regards, Asheesh (asheeshv@grapecity.com) <<PocketPCPortRelease.zip>> <<arch.h>> <p><p> -------------- next part -------------- A non-text attachment was scrubbed... Name: PocketPCPortRelease.zip Type: application/x-zip-compressed Size: 288996 bytes Desc: PocketPCPortRelease.zip Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040531/0a5e26f1/PocketPCPortRelease-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: arch.h Type: application/octet-stream Size: 3809 bytes Desc: arch.h Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040531/0a5e26f1/arch-0001.obj
Jean-Marc Valin
2004-Aug-06 15:02 UTC
[speex-dev] [ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
Actually, the best thing do to would be to use __int64 *unless* it's not supported. So there needs to be a configure check... Jean-Marc Le mar 01/06/2004 à 14:50, Kenji Chan a écrit :> I emailed Jean-Marc the arch.h about one week ago, not quite sure > whether he actually received that email. > > > > Anyway, here I have an improved version of arch.h that I believe that > it would be better, to use __int64 only if compiling on eMbedded > Visual C++ compiler, so for any other compiler, keep it the same (use > long long) > > > > > > ---------------------------------- > > Chan Kei Yuen (Kenji) > > > > > > -----Original Message----- > From: owner-speex-dev@xiph.org[mailto:owner-speex-dev@xiph.org] On > Behalf Of Asheesh Vashishtha > Sent: Monday, May 31, 2004 11:05 PM > To: speex-dev@xiph.org > Cc: Jean-Marc.Valin@USherbrooke.ca; Varun Sharma; Sanjeev Jagtap > Subject: [speex-dev] [ANNOUNCE] PocketPC Port for speex-1.1.5 with > sample code > > > > Hi Jean-Marc, > > Based on the wonderful Speex project, I've created SpeexOutLoud, > essentially a Speex codec port for Windows Mobile 2003 devices. > > I've included a sample project intended to show the usage of > SpeexOutLoud codec in a Pocket PC application based on .NET Compact > Framework. > > I'd request you to please go through the attached build, and include > it as a contribution to the ever-increasing group of people making use > of Speex. > > If you feel the code is OK; it should probably go somewhere beneath > the win32 directory within speex-1.1.x, and with the speex sample > code. > > Please let me know if you have any queries/comments/suggestions. The > attached README has compile/usage/bug-notes. > > Thanks & regards, > Asheesh > > (asheeshv@grapecity.com) > > <<PocketPCPortRelease.zip>> <<arch.h>>-- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée. Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040601/d9156db5/signature-0001.pgp