unpack_g722_1_data.sh 1.9 KB

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