README
上传用户:touchwatch
上传日期:2007-01-06
资源大小:168k
文件大小:4k
- This program implements the 16 kb/s Low-Delay CELP algorithm.
- (ITU-T Recommendation G.728)
- Original version by Alex Zatsman, Analog Devices, 1993.
- Revision by Mike Concannon (Columbia University, NY, NY) Summer 1994
- Disclaimer
- ----------
- This software carries no warranty, expressed or implied. The user
- assumes all risks, known or unknown, direct or indirect, which involve
- this software in any way.
- -----------------------------------------------------------------------------
- About version 1.0 (by Alex Zatsman)
- This original version was intended as a demo for EZ-LAB with ADSD21020
- (by Analog Devices, Inc.), using the Analog Devides g21k C compiler (port of
- gcc to 21k).
- It ran on Sparc as encoder (ccelp) and decoder (dcelp). These must be
- built by GNU C compiler (gcc) because the source is written in GNU C
- extension. In particular, the "{( ... )}" construct is used in several
- places (fast.h)
- The Sparc version read inputs from Sun audio files (8-bit u-low
- encoded). It wrote out the indices into a file using 2 bytes for each
- 10-bit index. Thus the reduction in file size is 2.5x (instead of 4x
- for 8-bit source).
- The version 1.0 program has NOT been tested with the official ITU-T test data!
- -----------------------------------------------------------------------------
- About version 2.0 (based on version 1.0 and modified by Mike Concannon)
- All stuff about the sparc audio files have been removed.
- The speech files should be 2-byte per sample and contain no header.
- The input can use the full 16 bit range.
- The bitstreams are written as 2-bytes per 10-bit codeword.
- To create, use make all
- The command 'dcelp' invokes the decoder + postfilter. The postfilter may
- be turned off by changing the variable 'postfiltering_p' in dmain.c from
- 1 to 0.
- The makefile generates a dcelpnpf version which has the postfilter
- turned off.
- The postfilter relies on the coefficients (a10 and k10) calculated in the
- durbin recursion (adapters.c) but is otherwise contained wholly in
- postfil.c.
- To use,
- Encoder:
- ccelp <input speech file> <output bitstream>
- Decoder:
- dcelp <input bitstream> <output speech file>
- The encoder produced bitstreams match all the test vectors exactly while
- the decoder + postfilter output speech files match to between 40
- and 80 dB SNR with the test vector outputs.
- See file tv.out
- This was generated with the script runtestv, which can only be run
- if the testvectors and testprograms are available
- VERIFICATION
- This code was test on SUN and SGI platforms using the gcc and cc compilers.
- In the tdata directory there are a few test files.
- f17.in - inputfile
- f17.bit - bitstream file
- f17.outnpf - output file (no postfiltering)
- f17.outpf - postfiltered outputfile
- If you get sampled data files that are not identical, try to run an
- snr measure on it, and see if you are close. Any SNR > 40 dB would make
- it very likely that what you have is fine.
- List of Sources:
- adapters.c:
- Synthesis Filter Adapter,
- Perceptual Weighting Filter Adapter
- Gain Adapter.
- cmain.c: Main routine for coder.
-
- codebook.c: Function for Codebook Search and Access.
- data.c:
- Codebook (shapes and gains)
- Hybrid Window Coefficients for:
- Gain Adapter
- Perceptual Weighting Filter Adapter
- Synthesis Filter Adapter
- dmain.c: Main routine for decoder.
- filters.c:
- Perceptual Weighting Filter
- Gain Predictor
- Synthesis Filter
- global.c: Variables common for coder and decoder.
- io-sparc.c: Non-21020 (file) I/O routines. Actually NOT specific
- to Sparc machine.
- postfil.c: Postfilter and its Adapter.
- common.h: Common definitions used in most files
- data.h:
- Derivatives from gain codebook.
- Coefficients for low-pass IIR filter (in postfilter)
- fast.h: Some C macros which translate into more efficient code
- for ADSP21000
- parm.h: Various parameters of LD-CELP (vector size, frame
- size, etc)
- prototyp.h: Most function prototypes.
- qsize.h: Size of the I/O buffer (queue). It is separated
- because it is included in some .asm files which don't
- like more sophisticated C macros.