vdecode.f
上传用户:szhypcb168
上传日期:2007-01-06
资源大小:2187k
文件大小:1k
- c==========================================================================
- c
- c ROUTINE
- c vdecode
- c
- c FUNCTION
- c
- c create excitation vector from code book index and decoded gain
- c
- c SYNOPSIS
- c subroutine vdecode(decodedgain, l, vdecoded)
- c
- c formal
- c
- c data I/O
- c name type type function
- c -------------------------------------------------------------------
- c decodedgain r i decoded gain value
- c l i i pitch&code frame length
- c vdecoded r o decoded excitation array
- c
- c==========================================================================
- c
- c
- subroutine vdecode(decodedgain, l, vdecoded)
- implicit undefined(a-z)
- include 'ccsub.com'
- convex #include "ccsub.com"
- c
- integer i, codeword, l
- real vdecoded(l), decodedgain
- c *copy selected vector to excitation array
- cshift1 codeword = maxncsize-cbindex
- cshift2 codeword = 2*(cbindex-1)
- codeword = 2*(maxncsize-cbindex)+1
- if (codeword .lt. 0) then
- print *,' vdecode: cbindex > maxncsize at frame', frame
- codeword = 0
- end if
- do 70 i = 0, l-1
- vdecoded(i+1) = x(i+codeword)*decodedgain
- 70 continue
- return
- end
-