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
cor.c
Package: celp32c.rar [view]
Upload User: tsjrly
Upload Date: 2021-02-19
Package Size: 107k
Code Size: 2k
Category:
Voice Compress
Development Platform:
C/C++
- /**************************************************************************
- *
- * NAME
- * cor
- *
- * FUNCTION
- *
- * compute auto-correlation coefficients by direct multiplication
- *
- * SYNOPSIS
- *
- * subroutine cor(rar, idim, n, c0, c)
- *
- * formal
- * data I/O
- * name type type function
- * -------------------------------------------------------------------
- * rar float i Input data frame
- * idim int i frame size
- * n int i Number of correlation terms,
- * exclusive C0
- * c0 float o C(0)
- * c float o Auto correlation terms C(i), i=1,n
- *
- ***************************************************************************
- *
- * DESCRIPTION
- *
- * COR computes the autocorrelation coefficients of the data
- * sequence rar according to the following formula:
- *
- * idim
- * C(i) = SUM rar(k) * rar(k-i) , where i = 0, ..., n lags
- * k=i+1
- *
- * c0 = C(0)
- *
- * NOTE: rar(k-i) is truncated, so C(i) are true autocorrelations.
- *
- ***************************************************************************
- *
- * CALLED BY
- *
- * autohf distortion
- *
- * CALLS
- *
- *
- *
- **************************************************************************/
- cor(rar, idim, n, c0, c)
- int idim, n;
- float *rar, *c0, *c;
- {
- int i, k;
- for (*c0 = 0.0, i = 0; i < idim; i++)
- *c0 += *(rar+i) * *(rar+i);
- for (i = 0; i < n; i++)
- {
- for (*(c+i) = 0.0, k = i+1; k < idim; k++)
- *(c+i) += *(rar+k) * *(rar+k-i-1);
- }
- }