-
Notifications
You must be signed in to change notification settings - Fork 4
/
unpack_g722_1_data.sh
executable file
·85 lines (80 loc) · 1.92 KB
/
unpack_g722_1_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
#
# g722_1 - a library for the G.722.1 and Annex C codecs
#
# unpack_g722_1_data.sh
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 2.1,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ITUDATA="../../../T-REC-G.722.1-200505-I!!SOFT-ZST-E.zip"
cd test-data/itu
if [ -d g722_1 ]
then
cd g722_1
else
mkdir g722_1
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo Cannot create test-data/itu/g722_1!
exit $RETVAL
fi
cd g722_1
fi
if [ -d fixed ]
then
cd fixed
rm -rf *
cd ..
else
mkdir fixed
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo Cannot create test-data/itu/g722_1/fixed!
exit $RETVAL
fi
fi
if [ -d floating ]
then
cd floating
rm -rf *
cd ..
else
mkdir floating
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo Cannot create test-data/itu/g722_1/floating!
exit $RETVAL
fi
fi
rm -rf T*
rm -rf Software
rm -rf G722-1E-200505+Cor1.pdf
rm -rf G722-1E-200505+Cor1.DOC
rm -rf Software
unzip ${ITUDATA} >/dev/null
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo Cannot unpack the ITU test vectors for G.722.1!
exit $RETVAL
fi
#rm ${ITUDATA}
mv ./Software/Fixed-200505-Rel.2.1/vectors/* ./fixed
mv ./Software/Floating-200806-Rel.2.1/vectors/* ./floating
rm -rf Software
rm -rf G722-1E-200505+Cor1.pdf
rm -rf G722-1E-200505+Cor1.DOC
echo The ITU test vectors for G.722.1 should now be in the g722_1 directory