⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read.me

📁 这是G.723和G.729的音频编解码的源代码
💻 ME
字号:
/* Version 2.0    Last modified: 6/30/95 */

TITLE
-----
Annex to Draft Recommendation G.729

Coding of Speech at 8 kbit/s using Conjugate-Structure
Algebraic-Code-Excited Linear-Prediction (CS-ACELP)

SOFTWARE AND INTELLECTUAL PROPERTY
----------------------------------
This software package is provided as a part of the proposed
ITU-T G.729 speech coder recommendation.
This version of the software is distributed for evaluations purposes only.
Many parts of the information contained in this software package are 
protected by patents and cannot be used for others purposes than ITU-T G.729
speech coder evaluation or real-time implementations.

 Copyright (c) 1995, AT&T, France Telecom, NTT, Universite de Sherbrooke.
 All rights reserved.

VERSION
-------
This version is a 16 bit fixed-point implementation of the floating point
that was tested in January 1995. The algorithm is described in the
draft  recommendation, which is included as a postscript file g729.ps.

COMPILATION
-----------
Edit the file typedef.h to comply to your target platform

For UNIX systems the following makefiles are provided

 codec.mak
    coder.mak
    decoder.mak

Edit the makefiles coder.mak and decoder.mak
to set the proper options for your system.
The command to compile and link all code on a UNIX system is

     make -f codec.mak

For other platforms, the *.mak files can be used to work out the
compilation procedures.

This code has been successfully compiled and run on the following
platforms:

Platform                   Operating System      Compiler
-----------------------------------------------------------------------------
Silicon Graphics R4400     Unix 5.2              cc
Silicon Graphics R4400     Unix 5.2              gcc 2.6.3
DEC ALPHA                  OSF/1                 DEC OSF/1 cc
HP                         Unix                  c89
PC                         DOS 6.21              Microsoft QuickC
                                                 Borland 3.1
                                                 Watcom 9.5
                                                 Zortec 3.1
                                                 Microsoft 8
                                                 MS Visual C++ 1.5

USAGE
-----
The following files are used or generated
  inputfile    8 kHz sampled data file 16 bit PCM  (binary)
  outputfile   8 kHz sampled data file 16 bit PCM (binary)
  bitstreamfile  binary file containing bitstream

coder  inputfile bitstreamfile
decoder bitstreamfile outputfile

VERIFICATION
------------
To verify correct compilation and execution on your target machine
the following test files can be obtained from  ftp.research.att.com

speech.in    - source speech signal
speech.bit   - bit stream
speech.bix   - first 300 frames of speech.bit corrupted with frame erasures
speech.biy   - first 300 frames of speech.bit corrupted with parity errors
speech.pst   - output from speech.bit
speech.psx   - output from speech.bix
speech.psy   - output from speech.biy

these files were generated by executing:

coder speech.in speech.bit
decoder speech.bit speech.pst
decoder speech.bix speech.psx
decoder speech.biy speech.psy

NOTE:
These files need byte swapping for some platforms (such as DEC machines
or PC's). This can be done with for example the unix dd command:
 dd if=inputfile of=outputfile conv=swab
and login as anonymous. 

The files are in the directory dist/itu8.
Make sure that you copy these files in binary mode.

The session might look like this:

ftp ftp.research.att.com
Name: anonymous
Password:
cd dist/itu8
binary
prompt
mget speech.*
bye

Once these files have been obtained. One could use the makefile to
run the verification.

   make -f codec.mak tst

This command will generate a tmp.bit, tmp.pst, tmp.psx and tmp.psy
file and use the Unix cmp command to compare it against the reference
files.
If any of the comparisons is not correct, please follow the procedure
outlined in the section "PROBLEM REPORT"

PROBLEM REPORT
--------------
If you find problems for a given combination of platform, compiler
or data file please report this to the address below.

In your report, provide as many details as possible. If possible
provide suggestions for improvements or fixes. Complaints related to
obscure compilers, old versions of compilers etc, are not appreciated.

Gerhard Schroeder  Rapporteur SG15/Q12

Deutsche Telekom AG, Postfach 100003, 64276 Darmstadt, Germany
Phone: +49 6151 83 3973, Fax: +49 6151 83 7828,
Email: gerhard.schroeder@fz13.fz.dbp.de

With a carbon copy to: 
Peter Kroon   kroon@research.att.com      FAX: 908 582 7308


BITSTREAM FORMAT
----------------

The bitstreamfile contains for each 10 ms speech frame,
82 16-bit words.
The first word is the syncword SYNC_WORD
The second word is the framesize and contains the fixed value 80
The next 80 words contain the following parameters:

01      LPC1-   MA predictor switch
02      LPC1-   1st codebook           7 bit
03      LPC1-
04      LPC1-
05      LPC1-
06      LPC1-
07      LPC1-
08      LPC1-
09      LPC2-   2nd codebook  low         5 bit
10      LPC2-
11      LPC2-
12      LPC2-
13      LPC2-
14      LPC2-   2nd codebook  high         5 bit
15      LPC2-
16      LPC2-
17      LPC2-
18      LPC2-
19      M_1     pitch period                8 bit
20      M_1
21      M_1
22      M_1
23      M_1
24      M_1
25      M_1
26      M_1
27              parity check on 1st period  1 bit
28      CB_1    codebook pulse positions    13 bit
29      CB_1
30      CB_1
31      CB_1
32      CB_1
33      CB_1
34      CB_1
35      CB_1
36      CB_1
37      CB_1
38      CB_1
39      CB_1
40      CB_1
41      S_1     codebook pulse signs       4 bit
42      S_1
43      S_1
44      S_1
45      G_1     pitch and codebook gains  3 bit stage 1
46      G_1
47      G_1
48      G_1     pitch and codebook gains  4 bit stage 2
49      G_1
50      G_1
51      G_1
52      M_2     pitch period (relative)     5 bit
53      M_2
54      M_2
55      M_2
56      M_2
57      CB_2    codebook pulse positions    13 bit
58      CB_2
59      CB_2
60      CB_2
61      CB_2
62      CB_2
63      CB_2
64      CB_2
65      CB_2
66      CB_2
67      CB_2
68      CB_2
69      CB_2
70      S_2     codebook pulse signs       4 bit
71      S_2
72      S_2
73      S_2
74      G_2     pitch and codebook gains  3 bit stage 1
75      G_2
76      G_2
77      G_2     pitch and codebook gains  4 bit stage 2
78      G_2
79      G_2
80      G_2

Bitstream information - all parameters start with msb
The bits are defined as follows:

#define SYNC_WORD (short)0x6b21 
#define BIT_0     (short)0x007f /* definition of zero-bit in bit-stream       */
#define BIT_1     (short)0x0081 /* definition of one-bit in bit-stream      */

if the BFI != SYNC_WORD the frame is labeled as a bad frame, and the error
concealment will become active

DIAGNOSTICS
-----------
This program uses the ETSI basic operators augmented with counters to
keep track of the calling statistics. This allows on-line calculation
of the complexity. To provide an accurate count it is necessary to
count all data moves as well. Throughout the software this is
accomplished by calling accounting routines like move32(), move16()
etc. This accounting software was included for evaluation purposes
only and no guarantees are given with regard to its correctness.

CONTRIBUTIONS WANTED
--------------------
ITU-T is looking for contributions related to this coder.

Examples of topics of interest:

1) Integration of this coder with voice activity detectors.

2) Bit error sensitivity studies.

3) Generation of test-sequences for validation of implementation.

Any organization that has results concerning these topics is asked to
make formal or informal contributions to ITU-T SG15. Please
contact Gerhard Schroeder (see PROBLEM REPORT section).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -