Erik de Castro Lopo | 1a7c3fa | 2014-11-27 13:03:13 +1100 | [diff] [blame] | 1 | #!/bin/sh -e |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 2 | |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 3 | # FLAC - Free Lossless Audio Codec |
Erik de Castro Lopo | b1982fb | 2013-05-25 17:11:19 +1000 | [diff] [blame] | 4 | # Copyright (C) 2001-2009 Josh Coalson |
Erik de Castro Lopo | 1437391 | 2014-11-24 22:07:15 +1100 | [diff] [blame] | 5 | # Copyright (C) 2011-2014 Xiph.Org Foundation |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 6 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 7 | # This file is part the FLAC project. FLAC is comprised of several |
Ulrich Klauer | cd4ddab | 2013-05-26 22:53:43 +0200 | [diff] [blame] | 8 | # components distributed under different licenses. The codec libraries |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 9 | # are distributed under Xiph.Org's BSD-like license (see the file |
| 10 | # COPYING.Xiph in this distribution). All other programs, libraries, and |
| 11 | # plugins are distributed under the GPL (see COPYING.GPL). The documentation |
| 12 | # is distributed under the Gnu FDL (see COPYING.FDL). Each file in the |
| 13 | # FLAC distribution contains at the top the terms under which it may be |
| 14 | # distributed. |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 15 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 16 | # Since this particular file is relevant to all components of FLAC, |
| 17 | # it may be distributed under the Xiph.Org license, which is the least |
| 18 | # restrictive of those mentioned above. See the file COPYING.Xiph in this |
| 19 | # distribution. |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 20 | |
Erik de Castro Lopo | 1a7c3fa | 2014-11-27 13:03:13 +1100 | [diff] [blame] | 21 | . ./common.sh |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 22 | |
Josh Coalson | b43d3cb | 2004-11-09 01:28:05 +0000 | [diff] [blame] | 23 | PATH=../src/flac:$PATH |
| 24 | PATH=../src/test_streams:$PATH |
Erik de Castro Lopo | 85d5c53 | 2013-01-02 22:37:42 +1100 | [diff] [blame] | 25 | PATH=../objs/$BUILD/bin:$PATH |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 26 | |
Josh Coalson | 4ac9fdb | 2006-11-02 01:38:55 +0000 | [diff] [blame] | 27 | if [ x"$FLAC__TEST_LEVEL" = x ] ; then |
| 28 | FLAC__TEST_LEVEL=1 |
| 29 | fi |
| 30 | |
Erik de Castro Lopo | a9712a2 | 2013-09-16 19:55:11 +1000 | [diff] [blame] | 31 | flac${EXE} --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" |
Josh Coalson | bc86950 | 2002-06-14 06:36:16 +0000 | [diff] [blame] | 32 | |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 33 | run_flac () |
| 34 | { |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 35 | if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then |
Martijn van Beurden | f6585b0 | 2013-04-21 23:12:16 +0200 | [diff] [blame] | 36 | echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=50 flac $*" >>test_streams.valgrind.log |
Erik de Castro Lopo | d06d985 | 2013-08-01 23:02:26 +1000 | [diff] [blame] | 37 | valgrind --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=4 flac --no-error-on-compression-fail $* 4>>test_streams.valgrind.log |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 38 | else |
Erik de Castro Lopo | a9712a2 | 2013-09-16 19:55:11 +1000 | [diff] [blame] | 39 | flac${EXE} --no-error-on-compression-fail $* |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 40 | fi |
| 41 | } |
| 42 | |
Josh Coalson | f6237c8 | 2001-02-28 23:43:29 +0000 | [diff] [blame] | 43 | echo "Generating streams..." |
Josh Coalson | d3fe728 | 2002-12-10 06:42:15 +0000 | [diff] [blame] | 44 | if [ ! -f wacky1.wav ] ; then |
Erik de Castro Lopo | bb6f643 | 2015-09-09 15:49:11 +1000 | [diff] [blame] | 45 | test_streams || die "ERROR: missing files" |
Josh Coalson | 9bcf9e8 | 2002-08-07 17:07:37 +0000 | [diff] [blame] | 46 | fi |
| 47 | |
Josh Coalson | 9bcf9e8 | 2002-08-07 17:07:37 +0000 | [diff] [blame] | 48 | # |
Josh Coalson | d3fe728 | 2002-12-10 06:42:15 +0000 | [diff] [blame] | 49 | # single-file test routines |
Josh Coalson | 9bcf9e8 | 2002-08-07 17:07:37 +0000 | [diff] [blame] | 50 | # |
| 51 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 52 | test_file () |
| 53 | { |
| 54 | name=$1 |
| 55 | channels=$2 |
| 56 | bps=$3 |
| 57 | encode_options="$4" |
| 58 | |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 59 | echo $ECHO_N "$name (--channels=$channels --bps=$bps $encode_options): encode..." $ECHO_C |
Josh Coalson | 5ebd693 | 2006-11-17 06:03:18 +0000 | [diff] [blame] | 60 | cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding $name.raw" |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 61 | echo "### ENCODE $name #######################################################" >> ./streams.log |
| 62 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 63 | $cmd 2>>./streams.log || die "ERROR during encode of $name" |
| 64 | |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 65 | echo $ECHO_N "decode..." $ECHO_C |
Josh Coalson | 439367c | 2005-02-03 04:20:16 +0000 | [diff] [blame] | 66 | cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --output-name=$name.cmp $name.flac" |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 67 | echo "### DECODE $name #######################################################" >> ./streams.log |
| 68 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 69 | $cmd 2>>./streams.log || die "ERROR during decode of $name" |
| 70 | |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 71 | ls -1l $name.raw >> ./streams.log |
| 72 | ls -1l $name.flac >> ./streams.log |
| 73 | ls -1l $name.cmp >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 74 | |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 75 | echo $ECHO_N "compare..." $ECHO_C |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 76 | cmp $name.raw $name.cmp || die "ERROR during compare of $name" |
| 77 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 78 | echo OK |
| 79 | } |
| 80 | |
Josh Coalson | a59ff6f | 2002-06-10 18:24:51 +0000 | [diff] [blame] | 81 | test_file_piped () |
| 82 | { |
| 83 | name=$1 |
| 84 | channels=$2 |
| 85 | bps=$3 |
| 86 | encode_options="$4" |
| 87 | |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 88 | if [ `env | grep -ic '^comspec='` != 0 ] ; then |
| 89 | is_win=yes |
| 90 | else |
| 91 | is_win=no |
| 92 | fi |
| 93 | |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 94 | echo $ECHO_N "$name: encode via pipes..." $ECHO_C |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 95 | if [ $is_win = yes ] ; then |
Josh Coalson | 5ebd693 | 2006-11-17 06:03:18 +0000 | [diff] [blame] | 96 | cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding --stdout $name.raw" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 97 | echo "### ENCODE $name #######################################################" >> ./streams.log |
| 98 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 99 | $cmd 1>$name.flac 2>>./streams.log || die "ERROR during encode of $name" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 100 | else |
Josh Coalson | 5ebd693 | 2006-11-17 06:03:18 +0000 | [diff] [blame] | 101 | cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding --stdout -" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 102 | echo "### ENCODE $name #######################################################" >> ./streams.log |
| 103 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 104 | cat $name.raw | $cmd 1>$name.flac 2>>./streams.log || die "ERROR during encode of $name" |
Josh Coalson | a59ff6f | 2002-06-10 18:24:51 +0000 | [diff] [blame] | 105 | fi |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 106 | echo $ECHO_N "decode via pipes..." $ECHO_C |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 107 | if [ $is_win = yes ] ; then |
Josh Coalson | 439367c | 2005-02-03 04:20:16 +0000 | [diff] [blame] | 108 | cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --stdout $name.flac" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 109 | echo "### DECODE $name #######################################################" >> ./streams.log |
| 110 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 111 | $cmd 1>$name.cmp 2>>./streams.log || die "ERROR during decode of $name" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 112 | else |
Josh Coalson | 439367c | 2005-02-03 04:20:16 +0000 | [diff] [blame] | 113 | cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --stdout -" |
Josh Coalson | d57c8d3 | 2002-06-11 06:15:28 +0000 | [diff] [blame] | 114 | echo "### DECODE $name #######################################################" >> ./streams.log |
| 115 | echo "### cmd=$cmd" >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 116 | cat $name.flac | $cmd 1>$name.cmp 2>>./streams.log || die "ERROR during decode of $name" |
Josh Coalson | a59ff6f | 2002-06-10 18:24:51 +0000 | [diff] [blame] | 117 | fi |
| 118 | ls -1l $name.raw >> ./streams.log |
| 119 | ls -1l $name.flac >> ./streams.log |
| 120 | ls -1l $name.cmp >> ./streams.log |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 121 | |
Erik de Castro Lopo | efaab3c | 2015-10-04 09:43:33 +1100 | [diff] [blame] | 122 | echo $ECHO_N "compare..." $ECHO_C |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 123 | cmp $name.raw $name.cmp || die "ERROR during compare of $name" |
| 124 | |
Josh Coalson | a59ff6f | 2002-06-10 18:24:51 +0000 | [diff] [blame] | 125 | echo OK |
| 126 | } |
| 127 | |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 128 | if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 129 | max_lpc_order=32 |
| 130 | else |
| 131 | max_lpc_order=16 |
| 132 | fi |
| 133 | |
Josh Coalson | a59ff6f | 2002-06-10 18:24:51 +0000 | [diff] [blame] | 134 | echo "Testing noise through pipes..." |
| 135 | test_file_piped noise 1 8 "-0" |
| 136 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 137 | echo "Testing small files..." |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 138 | test_file test01 1 16 "-0 -l $max_lpc_order --lax -m -e -p" |
| 139 | test_file test02 2 16 "-0 -l $max_lpc_order --lax -m -e -p" |
| 140 | test_file test03 1 16 "-0 -l $max_lpc_order --lax -m -e -p" |
| 141 | test_file test04 2 16 "-0 -l $max_lpc_order --lax -m -e -p" |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 142 | |
Josh Coalson | 574dc9c | 2007-01-19 05:33:30 +0000 | [diff] [blame] | 143 | for bps in 8 16 24 ; do |
| 144 | echo "Testing $bps-bit full-scale deflection streams..." |
| 145 | for b in 01 02 03 04 05 06 07 ; do |
| 146 | test_file fsd$bps-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e -p" |
| 147 | done |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 148 | done |
Josh Coalson | f6237c8 | 2001-02-28 23:43:29 +0000 | [diff] [blame] | 149 | |
Josh Coalson | d041849 | 2001-03-27 23:58:23 +0000 | [diff] [blame] | 150 | echo "Testing 16-bit wasted-bits-per-sample streams..." |
| 151 | for b in 01 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 152 | test_file wbps16-$b 1 16 "-0 -l $max_lpc_order --lax -m -e -p" |
Josh Coalson | d041849 | 2001-03-27 23:58:23 +0000 | [diff] [blame] | 153 | done |
| 154 | |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 155 | for bps in 8 16 24 ; do |
Josh Coalson | f6237c8 | 2001-02-28 23:43:29 +0000 | [diff] [blame] | 156 | echo "Testing $bps-bit sine wave streams..." |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 157 | for b in 00 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 158 | test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=48000" |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 159 | done |
| 160 | for b in 01 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 161 | test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=96000" |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 162 | done |
| 163 | for b in 02 03 04 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 164 | test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e" |
Josh Coalson | f6237c8 | 2001-02-28 23:43:29 +0000 | [diff] [blame] | 165 | done |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 166 | for b in 10 11 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 167 | test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=48000" |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 168 | done |
| 169 | for b in 12 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 170 | test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=96000" |
Josh Coalson | 9fb180b | 2002-08-22 07:26:06 +0000 | [diff] [blame] | 171 | done |
| 172 | for b in 13 14 15 16 17 18 19 ; do |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 173 | test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e" |
Josh Coalson | f6237c8 | 2001-02-28 23:43:29 +0000 | [diff] [blame] | 174 | done |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 175 | done |
| 176 | |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 177 | echo "Testing blocksize variations..." |
| 178 | for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do |
| 179 | for blocksize in 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do |
| 180 | for lpc_order in 0 1 2 3 4 5 7 8 9 15 16 17 31 32 ; do |
| 181 | if [ $lpc_order = 0 ] || [ $lpc_order -le $blocksize ] ; then |
Josh Coalson | 574dc9c | 2007-01-19 05:33:30 +0000 | [diff] [blame] | 182 | test_file noise8m32 1 8 "-8 -p -e -l $lpc_order --lax --blocksize=$blocksize $disable" |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 183 | fi |
| 184 | done |
| 185 | done |
| 186 | done |
| 187 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 188 | echo "Testing some frame header variations..." |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 189 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b $max_lpc_order" |
| 190 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b 65535" |
| 191 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9" |
| 192 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90" |
| 193 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90000" |
Josh Coalson | e2281f3 | 2002-09-11 00:31:47 +0000 | [diff] [blame] | 194 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9" |
| 195 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90" |
| 196 | test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90000" |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 197 | |
| 198 | echo "Testing option variations..." |
| 199 | for f in 00 01 02 03 04 ; do |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 200 | for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 201 | if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 202 | for opt in 0 1 2 4 5 6 8 ; do |
| 203 | for extras in '' '-p' '-e' ; do |
| 204 | if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 205 | test_file sine16-$f 1 16 "-$opt $extras $disable" |
| 206 | fi |
| 207 | done |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 208 | done |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 209 | if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 210 | test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable" |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 211 | fi |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 212 | fi |
Josh Coalson | 29b4af8 | 2001-02-08 22:00:05 +0000 | [diff] [blame] | 213 | done |
| 214 | done |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 215 | |
| 216 | for f in 10 11 12 13 14 15 16 17 18 19 ; do |
| 217 | for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 218 | if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 219 | for opt in 0 1 2 4 5 6 8 ; do |
| 220 | for extras in '' '-p' '-e' ; do |
| 221 | if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 222 | test_file sine16-$f 2 16 "-$opt $extras $disable" |
| 223 | fi |
| 224 | done |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 225 | done |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 226 | if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 227 | test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable" |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 228 | fi |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 229 | fi |
| 230 | done |
| 231 | done |
| 232 | |
| 233 | echo "Testing noise..." |
| 234 | for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 235 | if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 236 | for channels in 1 2 4 8 ; do |
| 237 | if [ $channels -le 2 ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 238 | for bps in 8 16 24 ; do |
| 239 | for opt in 0 1 2 3 4 5 6 7 8 ; do |
| 240 | for extras in '' '-p' '-e' ; do |
| 241 | if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 242 | for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do |
| 243 | if [ -z "$blocksize" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then |
| 244 | test_file noise $channels $bps "-$opt $extras $blocksize $disable" |
| 245 | fi |
| 246 | done |
| 247 | fi |
| 248 | done |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 249 | done |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 250 | if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then |
Josh Coalson | d0edb97 | 2006-10-07 06:50:08 +0000 | [diff] [blame] | 251 | test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable" |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 252 | fi |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 253 | done |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 254 | fi |
| 255 | done |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 256 | fi |
Josh Coalson | 94b22e0 | 2002-10-11 06:22:30 +0000 | [diff] [blame] | 257 | done |