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
submult.f
Package: celp_3.2a.tar.gz [view]
Upload User: szhypcb168
Upload Date: 2007-01-06
Package Size: 2187k
Code Size: 2k
Category:
Voice Compress
Development Platform:
Unix_Linux
- program submultiple
- implicit undefined(a-z)
- c
- real pitch(256),quarter,third,half,minpitch
- integer i,j,submult(256,4)
- open (unit=10, file='pdelay.h')
- open (unit=11, status='new', file='submult.h')
- c
- c *read in pitch table pdelay.h
- read (10,*) pitch(1:256)
- c
- minpitch=pitch(1)
- c
- c *look for pitch submultiples
- do 400 i=256,1,-1
- c
- c *look for quarters
- if (pitch(i)/4 .ge. minpitch) then
- quarter=pitch(i)/4.
- do 100 j=2,256
- if (pitch(j) .gt. quarter) then
- submult(i,1)=submult(i,1)+1
- if (pitch(j)-quarter .le. quarter-pitch(j-1)) then
- submult(i,4)=j
- else
- submult(i,4)=j-1
- end if
- goto 101
- end if
- 100 continue
- 101 endif
- c
- c *look for thirds
- if(pitch(i)/3 .ge. minpitch) then
- third=pitch(i)/3.
- do 200 j=2,256
- if (pitch(j) .gt. third) then
- submult(i,1)=submult(i,1)+1
- if (pitch(j)-third .le. third-pitch(j-1)) then
- submult(i,3)=j
- else
- submult(i,3)=j-1
- end if
- goto 201
- end if
- 200 continue
- 201 endif
- c
- c *look for halves
- if(pitch(i)/2 .ge. minpitch) then
- half=pitch(i)/2.
- do 300 j=2,256
- if (pitch(j) .gt. half) then
- submult(i,1)=submult(i,1)+1
- if (pitch(j)-half .le. half-pitch(j-1)) then
- submult(i,2)=j
- else
- submult(i,2)=j-1
- end if
- goto 301
- end if
- 300 continue
- 301 endif
- print *,'index',i,'pitch',pitch(i),'has',submult(i,1),'submultiples'
- print *,'indicies',submult(i,2),submult(i,3),submult(i,4)
- print *,'multiples',pitch(submult(i,2)),pitch(submult(i,3)),
- & pitch(submult(i,4))
- print *,'----------------------------------------------------------'
- 400 continue
- do 500 i=1,256
- submult(i,2) = submult(i,2) - 1
- submult(i,3) = submult(i,3) - 1
- submult(i,4) = submult(i,4) - 1
- write (11,69)submult(i,1:4)
- 69 format (4i5)
- 500 continue
- close(10)
- close(11)
- stop
- end