/************************************************************************
European digital cellular telecommunications system
5600 bps speech codec for
half rate speech traffic channels
Bit-Exact C Simulation Code
Version 10.0.0
Original created on November 8, 1996
*************************************************************************/
These files represent the Half-Rate GSM Speech Coder Bit Exact
C simulation. All code is written in ANSI-C. The system is called
from a single program named "gsm_hr" which can operate in one of two
modes:
(0) encoding only
(1) decoding only
For encoding, the input is a binary speech file (*.inp) and the
output is a binary encoded parameter file (*.cod). For decoding, the
input is a binary parameter file (*.dec) and the output is a binary
synthesized speech file (*.out). Note that the format for the parameter
input file required for decoding (*.dec) is not the same as the format of
the parameter file generated by encoding (*.cod). The "reid" program will
translate an *.cod file into an *.dec file (select error-free mode, EP0).
The complete package consists of one DS-HD 3.5" disk. The top directory
contains this readme.txt file, a readme2.txt file, and four
subdirectories:
* \c (contains all C files and header files)
* \d (contains example binary data input and output files)
* \exec (contains the executables and makefiles)
* \utils (contains various utility programs including the "reid" program)
FILE FORMATS:
=============
File formats are important in the installation process. If a text
file such as the makefile or a table is in the wrong format, the
program will either not compile, or give incorrect results.
All data on this disk are in "pc" format. This means that the text
files are intended to be read only by the pc, and that the binary
data files are byte ordered such that they will be read correctly by
a pc. This means if the software is to be run on some other platform,
such as a VAX (VMS) or a Sun, then some files will need to be modified
before compilation and execution. The necessary modifications are
described for the VAX (VMS) and Sun platforms below.
There is more information below on file formats.
INSTALLING THE SOFTWARE
=======================
Installing the software on the Sun:
-----------------------------------
1. Getting files from pc disk:
There are two ways of extracting the files off of the disk:
a. Using FTP
b. Mounting the disks and copying the files directly.
Either way, it is imperative that the directory structure
be copied as it appears on the pc disk, i.e., 4 directories:
./c, ./d, ./exec, ./utils.
If using FTP:
First copy directories c, exec, and utils using the default
(i.e. not binary) transfer mode. Second copy directory d
using the binary mode (by typing bin). Copying
c, exec, and utils with the default mode will automatically
convert all text files to the Sun's file format.
If copying the files directly:
No special instructions. Be aware though that the text files
on the Sun will still be in "pc" format.
2. Before you make:
It is assumed that on the Sun the compiler is "acc". If
This is not the case modify the symbols:
CC=acc
CAlsoDef= -O4 -Xc
CDefault=-vc $(CAlsoDef)
to appropriate settings in makefile
3. Make: to make cd to the ./exec directory and type:
make install
Installing the software on the VAX (under VMS):
-----------------------------------------------
1. Getting files from pc disk:
I assume you are using FTP. We have no other way of transferring
the files, so no other methods were tested.
Either way, it is imperative that the directory structure
be copied as it appears on the pc disk, i.e., 4 directories:
./c, ./d, ./exec, ./utils.
First copy directories c, exec, and utils using the default
(i.e. not binary) transfer mode. Second copy directory
d using the binary mode (by typing bin).
Copying c, exec, and utils with the default mode will
automatically convert all text files to the VAX's file format.
If not using FTP you may need to convert the text files to the
VAX's text file format.
2. Make: in the [.exec] directory:
rename or copy file:
make.vax to makevax.com
then type:
@makevax.com
Installing the software on the PC:
----------------------------------
1. Getting files from pc disk:
From the directory where you want the files installed
(and assuming the diskette is in drive b), type:
xcopy b:\ /s
2. Before you make, cd to the .\exec directory.
Rename the UNIX makefile so that it does not interfere:
ren makefile makefile.unx
3. Make: to make type (while in the .\exec directory):
make install
RUNNING THE SOFTWARE
====================
The usage of the "gsm_hr" program is as follows:
Usage:
gsm_hr option inputFileName outputFileName <number of frames> <dtx|nodtx>
or
gsm_hr option inputFileName outputFileName <dtx|nodtx> <number of frames>
Options: enc inputFileName: speech --> outputFileName: encoder output
dec inputFileName: decoder input --> outputFileName: speech
Note that running the "gsm_hr" program without any command line arguments
will cause it to print out the above Usage message.
The usage of the "reid" program is as follows:
Usage: REID input output EPx
EPx: EP0
EP1 (not implemented)
EP2 (not implemented)
EP3 (not implemented)
Note that running the "reid" program without any command line arguments
will cause it to print out the above Usage message.
Processing the example files on the Sun:
----------------------------------------
First, use the "swapbin" utility prgram to swap the bytes in the
example files from pc to Sun byte order. To do this, switch to the
./exec directory and type:
swapbin ../d/short.inp ../d/short_sun.inp
swapbin ../d/short.cod ../d/short_sun.cod
swapbin ../d/short.dec ../d/short_sun.dec
swapbin ../d/short.out ../d/short_sun.out
Then, from the exec directory type:
gsm_hr enc ../d/short_sun.inp ../d/short_tst.cod nodtx
reid ../d/short_tst.cod ../d/short_tst.dec EP0
gsm_hr dec ../d/short_tst.dec ../d/short_tst.out nodtx
To verify, switch to the d directory and type:
cmp short_tst.cod short_sun.cod
cmp short_tst.dec short_sun.dec
cmp short_tst.out short_sun.out
all of these compare commands should yield no differences.
Processing the example files on the VAX:
----------------------------------------
Running a program with command line arguments under VMS (VAX)
requires creating an alias. From the exec directory,
define symbols to represent the gsm_hr and reid executables.
The exact path must be specified. For example:
$ cmdgsm_hr :== USER$DISK1:[jasiuk.mark.exec]:gsm_hr.exe
$ cmdreid :== USER$DISK1:[jasiuk.mark.exec]:reid.exe
$ cmdgsm_hr enc [-.d]short.inp [-.d]short_tst.cod nodtx
$ cmdreid [-.d]short_tst.cod [-.d]short_tst.dec EP0
$ cmdgsm_hr dec [-.d]short_tst.dec [-.d]short_tst.out nodtx
Verification (in the d directory):
$ diff short_tst.cod short.cod