constant.h
上传用户:csczyc
上传日期:2021-02-19
资源大小:1051k
文件大小:4k
- /*
- 2.4 kbps MELP Proposed Federal Standard speech coder
- Fixed-point C code, version 1.0
- Copyright (c) 1998, Texas Instruments, Inc.
- Texas Instruments has intellectual property rights on the MELP
- algorithm. The Texas Instruments contact for licensing issues for
- commercial and non-government use is William Gordon, Director,
- Government Contracts, Texas Instruments Incorporated, Semiconductor
- Group (phone 972 480 7442).
- The fixed-point version of the voice codec Mixed Excitation Linear
- Prediction (MELP) is based on specifications on the C-language software
- simulation contained in GSM 06.06 which is protected by copyright and
- is the property of the European Telecommunications Standards Institute
- (ETSI). This standard is available from the ETSI publication office
- tel. +33 (0)4 92 94 42 58. ETSI has granted a license to United States
- Department of Defense to use the C-language software simulation contained
- in GSM 06.06 for the purposes of the development of a fixed-point
- version of the voice codec Mixed Excitation Linear Prediction (MELP).
- Requests for authorization to make other use of the GSM 06.06 or
- otherwise distribute or modify them need to be addressed to the ETSI
- Secretariat fax: +33 493 65 47 16.
- */
- /* */
- /* constant.h: include file for constant definitions */
- /* */
- #ifndef _constant_h
- #define _constant_h_
- #define ONE_Q8 256 /* (1<<8) */
- #define ONE_Q9 512 /* (1<<9) */
- #define ONE_Q11 2048 /* (1<<11) */
- #define ONE_Q12 4096 /* (1<<12) */
- #define ONE_Q13 8192 /* (1<<13) */
- #define ONE_Q14 16384 /* (1<<14) */
- #define ONE_Q15 32767 /* ((1<<15)-1) */
- #define ONE_Q19 524288L /* (1<<19) */
- #define ONE_Q25 33554432L /* (1<<25) */
- #define ONE_Q26 67108864L /* (1<<26) */
- #define ONE_Q28 268435456L /* (1<<28) */
- #define TWO_Q3 16 /* (2*(1<<3)) */
- #define TWO_Q19 1048576L /* (2*(1<<19)) */
- #define THREE_Q8 768 /* (3*(1<<8)) */
- #define SIX_Q8 1536 /* (6*(1<<8)) */
- #define SIX_Q12 24576 /* (6*(1<<12)) */
- #define EIGHT_Q11 16384 /* (8*(1<<11)) */
- #define TEN_Q11 20480 /* (10 * (1<<11)) */
- #define X0001_Q8 0 /* (0.001*(1<<8)) */
- #define X005_Q19 26214 /* (0.05*(1<<19)) */
- #define X01_Q14 1638 /* (0.1*(1<<14)) */
- #define X016_Q15 5242 /* (0.16*(1<<15)) */
- #define X05_Q6 32 /* (0.5 * (1<<6)) */
- #define X05_Q7 64 /* (0.5*(1<<7)) */
- #define X05_Q13 4096 /* (0.5*(1<<13)) */
- #define X05_Q14 8192 /* (0.5*(1<<14)) */
- #define X05_Q15 16384 /* (0.5*(1<<15)) */
- #define X064_Q15 20971 /* (0.64*(1<<15)) */
- #define X069_Q15 22609 /* (0.69*(1<<15)) */
- #define X14_Q14 22937 /* (1.4*(1<<14)) */
- #define X1_732_Q14 28377 /* (1.732*(1<<14)) */
- #define X12_Q8 3072 /* (12.0*(1<<8)) */
- #define X25_Q6 1600 /* (25*(1<<6)) */
- #define X30_Q8 7680 /* (30.0*(1<<8)) */
- #define X60_Q9 30720 /* (60*(1<<9)) */
- #define X75_Q8 19200 /* (75*(1<<8)) */
- #define X117_Q5 3744 /* (117*(1<<5)) */
- #define XN03_Q15 -9830 /* (-0.3*(1<<15)) */
- #define N2_Q11 -4096 /* (-2*(1<<11)) */
- #define M01_Q15 -3276 /* (-0.1*(1<<15)) */
- #define M10_Q11 -20480 /* (-10*(1<<11)) */
- #define MONE_Q15 -32768 /* (-(1<<15)) */
- #endif