ptdcode.f
上传用户:szhypcb168
上传日期:2007-01-06
资源大小:2187k
文件大小:1k
- c==========================================================================
- c
- c ROUTINE
- c pitchdecode
- c
- c FUNCTION
- c
- c decode pitch gain (bb(3)) from pitch index and bit
- c index (bits)
- c
- c SYNOPSIS
- c subroutine pitchdecode(pindex, bits, type, pitch)
- c
- c formal
- c
- c data I/O
- c name type type function
- c -------------------------------------------------------------------
- c pindex i i pitch index value
- c bits i i # bits for encode
- c type c i type of quantization
- c pitch r o pitch gain decoded
- c
- C==========================================================================
- C
- C INPUT FILES
- C pgain.tbl pitch gain gain coding
- C
- c==========================================================================
- c
- c
- subroutine pitchdecode(pindex, bits, type, pitch)
- implicit undefined(a-z)
- c
- integer pindex,bits
- real pitch
- character*10 type
- integer i
- real pitch2max5(32)
- c
- include './pgain.tbl'
- convex #include "./pgain.tbl"
- c
- c *** Choose appropriate pitch
- c
- if (bits .eq. 5) then
- if (type .eq. 'max2') then
- pitch=pitch2max5(pindex+1)
- else
- print *,' pitchdecode: unquantized pgain'
- end if
- else
- print *,' pitchdecode: unquantized pgain'
- end if
- return
- end