Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
DE_ACELP.C
Package: G711-729.rar [view]
Upload User: meifeng08
Upload Date: 2013-06-18
Package Size: 5304k
Code Size: 2k
Category:
Voice Compress
Development Platform:
C/C++
- /* Version 3.3 Last modified: December 26, 1995 */
- /*-----------------------------------------------------------*
- * Function Decod_ACELP() *
- * ~~~~~~~~~~~~~~~~~~~~~~~ *
- * Algebraic codebook decoder. *
- *----------------------------------------------------------*/
- #include "typedef.h"
- #include "basic_op.h"
- #include "ld8k.h"
- void Decod_ACELP(
- Word16 sign, /* (i) : signs of 4 pulses. */
- Word16 index, /* (i) : Positions of the 4 pulses. */
- Word16 cod[] /* (o) Q13 : algebraic (fixed) codebook excitation */
- )
- {
- Word16 i, j;
- Word16 pos[4];
- /* Decode the positions */
- i = index & (Word16)7;
- pos[0] = add(i, shl(i, 2)); /* pos0 =i*5 */
- index = shr(index, 3);
- i = index & (Word16)7;
- i = add(i, shl(i, 2)); /* pos1 =i*5+1 */
- pos[1] = add(i, 1);
- index = shr(index, 3);
- i = index & (Word16)7;
- i = add(i, shl(i, 2)); /* pos2 =i*5+1 */
- pos[2] = add(i, 2);
- index = shr(index, 3);
- j = index & (Word16)1;
- index = shr(index, 1);
- i = index & (Word16)7;
- i = add(i, shl(i, 2)); /* pos3 =i*5+3+j */
- i = add(i, 3);
- pos[3] = add(i, j);
- /* decode the signs and build the codeword */
- for (i=0; i<L_SUBFR; i++) {
- cod[i] = 0;
- }
- for (j=0; j<4; j++)
- {
- i = sign & (Word16)1;
- sign = shr(sign, 1);
- if (i != 0) {
- cod[pos[j]] = 8191; /* Q13 +1.0 */
- }
- else {
- cod[pos[j]] = -8192; /* Q13 -1.0 */
- }
- }
- return;
- }