OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
| 3 # Copyright (c) 2011-2012 Jean-Marc Valin |
| 4 # |
| 5 # This file is extracted from RFC6716. Please see that RFC for additional |
| 6 # information. |
| 7 # |
| 8 # Redistribution and use in source and binary forms, with or without |
| 9 # modification, are permitted provided that the following conditions |
| 10 # are met: |
| 11 # |
| 12 # - Redistributions of source code must retain the above copyright |
| 13 # notice, this list of conditions and the following disclaimer. |
| 14 # |
| 15 # - Redistributions in binary form must reproduce the above copyright |
| 16 # notice, this list of conditions and the following disclaimer in the |
| 17 # documentation and/or other materials provided with the distribution. |
| 18 # |
| 19 # - Neither the name of Internet Society, IETF or IETF Trust, nor the |
| 20 # names of specific contributors, may be used to endorse or promote |
| 21 # products derived from this software without specific prior written |
| 22 # permission. |
| 23 # |
| 24 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 25 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 26 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 27 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER |
| 28 # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 29 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 30 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 31 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 32 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 33 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 34 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 35 |
3 rm logs_mono.txt | 36 rm logs_mono.txt |
4 rm logs_stereo.txt | 37 rm logs_stereo.txt |
5 | 38 |
6 if [ "$#" -ne "3" ]; then | 39 if [ "$#" -ne "3" ]; then |
7 echo "usage: run_vectors.sh <exec path> <vector path> <rate>" | 40 echo "usage: run_vectors.sh <exec path> <vector path> <rate>" |
8 exit 1 | 41 exit 1 |
9 fi | 42 fi |
10 | 43 |
11 CMD_PATH=$1 | 44 CMD_PATH=$1 |
12 VECTOR_PATH=$2 | 45 VECTOR_PATH=$2 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 exit 1 | 120 exit 1 |
88 fi | 121 fi |
89 echo | 122 echo |
90 done | 123 done |
91 | 124 |
92 | 125 |
93 | 126 |
94 echo All tests have passed successfully | 127 echo All tests have passed successfully |
95 grep quality logs_mono.txt | awk '{sum+=$4}END{print "Average mono quality is",
sum/NR, "%"}' | 128 grep quality logs_mono.txt | awk '{sum+=$4}END{print "Average mono quality is",
sum/NR, "%"}' |
96 grep quality logs_stereo.txt | awk '{sum+=$4}END{print "Average stereo quality i
s", sum/NR, "%"}' | 129 grep quality logs_stereo.txt | awk '{sum+=$4}END{print "Average stereo quality i
s", sum/NR, "%"}' |
OLD | NEW |