Home | History | Annotate | Download | only in QA
      1 #!/bin/bash
      2 (set -o igncr) 2>/dev/null && set -o igncr; # force bash to ignore \r character
      3 
      4 
      5 
      6 if  [ "$1" = "x64" ] || [ "$2" = "x64" ] || [ "$#" -eq 0 ]
      7     then
      8     PLATFORM=_X64
      9     ISAC=../x64/Release/ReleaseTest-API_2005.exe
     10 elif [ "$1" = "LINUX" ] || [ "$2" = "LINUX" ]
     11     then
     12     PLATFORM=_linux
     13     ISAC=../ReleaseTest-API/isacswtest
     14 else
     15     PLATFORM=_2005
     16     ISAC=../win32/Release/ReleaseTest-API_2005.exe
     17 fi
     18 
     19 if  [ "$#" -eq 0 ] || [ "$1" = "all" ] || [ "$1" = "wb" ]
     20     then
     21     LOGFILE=logNormal"$PLATFORM".txt
     22     echo "START ISAC WB TEST" > $LOGFILE
     23     echo >> $LOGFILE
     24 
     25     INFILES=$(cat InputFiles.txt)
     26     SUBSET=$(cat InputFilesFew.txt)
     27     CHANNELFILES=$(cat ChannelFiles.txt)
     28     CHANNELLIST=($(cat ChannelFiles.txt))
     29     INDIR=../data/orig
     30     OUTDIR=../dataqa"$PLATFORM"
     31     mkdir -p $OUTDIR
     32     rm -f $OUTDIR/*
     33     
     34     idx=0
     35     RATE=10000
     36     FRAMESIZE=30
     37     
     38 
     39     for file in $INFILES # loop over all input files
     40       do
     41       
     42       echo "Input file: " $file
     43       echo "-----------------------------------"
     44       echo "Instantaneous with RATE " $RATE ", and Frame-size " $FRAMESIZE
     45       $ISAC -I -B $RATE -FL $FRAMESIZE -FS 16 $INDIR/"$file" $OUTDIR/i_"$FRAMESIZE"_"$RATE"_"$file" >> $LOGFILE
     46       echo
     47       
     48       name="${CHANNELLIST[$idx]}"
     49       echo "Adaptive with channel file: " $name 
     50       
     51       $ISAC -B $INDIR/${CHANNELLIST[$idx]} -FS 16 $INDIR/"$file" $OUTDIR/a_${name%.*}_"$file" >> $LOGFILE
     52       
     53       echo
     54       echo
     55       
     56 #     alternate between 30 & 60 ms.
     57       if [ $FRAMESIZE -eq 30 ]
     58 	  then
     59 	  FRAMESIZE=60
     60       else
     61 	  FRAMESIZE=30
     62       fi
     63       
     64 #     rate between 10000 to 32000 bits/sec
     65       if [ $RATE -le 30000 ]
     66 	  then
     67 	  let "RATE=RATE+2000"
     68       else
     69 	  let "RATE=10000"
     70       fi
     71       
     72 #     there are only three channel file
     73       if [ $idx -ge 2 ]; then
     74 	  idx=0
     75       else
     76 	  let "idx=idx+1"
     77       fi
     78       
     79     done
     80 
     81     idx=0
     82     
     83 #   loop over the subset of input files
     84     for file in $SUBSET 
     85       do
     86       
     87       if [ $idx -eq 0 ]; then
     88 	  $ISAC -B $INDIR/${CHANNELLIST[0]} -FL 30 -FIXED_FL -FS 16 $INDIR/"$file" $OUTDIR/a30_"$file" >> $LOGFILE
     89 	  idx=1
     90       else
     91 	  $ISAC -B $INDIR/${CHANNELLIST[0]} -FL 60 -FIXED_FL -FS 16 $INDIR/"$file" $OUTDIR/a60_"$file" >> $LOGFILE
     92 	  idx=0
     93       fi
     94     done
     95 
     96     $ISAC -B $INDIR/${CHANNELLIST[0]} -INITRATE 25000 -FL 30 -FS 16 $INDIR/"$file" $OUTDIR/a60_Init25kbps_"$file" >> $LOGFILE
     97 
     98     echo
     99     echo WIDEBAND DONE!
    100     echo
    101     echo
    102 fi
    103 
    104 if  [ "$#" -eq 0 ] || [ "$1" = "all" ] || [ "$1" = "swb" ]
    105     then
    106 
    107     LOGFILE=logNormal_SWB"$PLATFORM".txt
    108     echo "START ISAC SWB TEST" > $LOGFILE
    109     echo >> $LOGFILE
    110 
    111     echo STARTING TO TEST SUPER-WIDEBAND
    112     
    113     INFILES=$(cat InputFilesSWB.txt)
    114     INDIR=../data/origswb
    115     OUTDIR=../dataqaswb"$PLATFORM"
    116     mkdir -p $OUTDIR
    117     rm -f $OUTDIR/*
    118     
    119     for file in $INFILES
    120       do
    121       echo
    122       echo "Input file: " $file
    123       echo "--------------------------------"
    124       for RATE in 12000 20000 32000 38000 45000 50000 56000  
    125 	do
    126 	
    127 	echo "Rate " $RATE
    128 	$ISAC -I -B $RATE -FL 30 -FS 32 $INDIR/"$file" $OUTDIR/swb_"$RATE"_"$file" >> $LOGFILE
    129 	echo
    130 	
    131       done
    132   
    133     done
    134 fi
    135 
    136 if  [ "$#" -eq 0 ] || [ "$1" = "all" ] || [ "$1" = "API" ]
    137     then
    138 
    139     LOGFILE_API=logNormal_API"$PLATFORM".txt
    140     echo
    141     echo
    142     echo "START ISAC API TEST" > $LOGFILE_API
    143     echo >> $LOGFILE_API
    144     idx=1
    145     echo "                            Test Enforcement of frame-size"
    146     echo "========================================================================================"
    147     mkdir -p ../FrameSizeLim"$PLATFORM"
    148     rm -f ../FrameSizeLim"$PLATFORM"/*
    149     echo
    150     echo "-- No enforcement; BN 10000"
    151     echo
    152     $ISAC -B 10000 -FS 16 ../data/orig/speech_and_misc_WB.pcm \
    153 	../FrameSizeLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    154     let "idx=idx+1"
    155     echo
    156     echo
    157     echo "-- Now Enforce 30 ms frame size with the same bottleneck"
    158     echo "There should not be any 60 ms frame"
    159     echo
    160     $ISAC -B 10000 -FL 30 -FIXED_FL -FS 16 ../data/orig/speech_and_misc_WB.pcm \
    161 	../FrameSizeLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    162     let "idx=idx+1"
    163     echo
    164     echo
    165     echo "-- No enforcement; BN 32000"
    166     echo
    167     $ISAC -B 32000 -FS 16 ../data/orig/speech_and_misc_WB.pcm \
    168 	../FrameSizeLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    169     let "idx=idx+1"
    170     echo
    171     echo
    172     echo "-- Now Enforce 60 ms frame size with the same bottleneck"
    173     echo "There should not be any 30 ms frame"
    174     echo 
    175     $ISAC -B 32000 -FL 60 -FIXED_FL -FS 16 ../data/orig/speech_and_misc_WB.pcm \
    176 	../FrameSizeLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    177     let "idx=idx+1"
    178     echo
    179     echo
    180     echo
    181     echo
    182     echo
    183 
    184     echo "                           Test Limiting of Payload Size and Rate"
    185     echo "========================================================================================"
    186     mkdir -p ../PayloadLim"$PLATFORM"
    187     rm -f ../PayloadLim"$PLATFORM"/*
    188     echo
    189     echo
    190     echo "-- No Limit, frame-size 60 ms, WIDEBAND"
    191     echo 
    192     $ISAC -I -B 32000 -FL 60 -FS 16                ../data/orig/speech_and_misc_WB.pcm \
    193 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    194     let "idx=idx+1"
    195     echo
    196     echo
    197     echo "-- Payload-size limit of 250, frame-size 60 ms, WIDEBAND"
    198     echo 
    199     $ISAC -I -B 32000 -FL 60 -FS 16 -MAX 250       ../data/orig/speech_and_misc_WB.pcm \
    200 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    201     let "idx=idx+1"
    202     echo
    203     echo
    204     echo "-- Rate limit of 33 kbps for 60 ms frame-size"
    205     echo
    206     $ISAC -I -B 32000 -FL 60 -FS 16 -MAXRATE 33000 ../data/orig/speech_and_misc_WB.pcm \
    207 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    208     let "idx=idx+1"
    209     echo 
    210     echo "________________________________________________________"
    211     echo
    212     echo
    213 
    214     echo "-- No Limit, frame-size 30 ms, WIDEBAND"
    215     echo 
    216     $ISAC -I -B 32000 -FL 30 -FS 16                ../data/orig/speech_and_misc_WB.pcm \
    217 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    218     let "idx=idx+1"
    219     echo
    220     echo    
    221     echo "-- Payload-size limit of 130, frame-size 30 ms, WIDEBAND"
    222     echo 
    223     $ISAC -I -B 32000 -FL 30 -FS 16 -MAX 130       ../data/orig/speech_and_misc_WB.pcm \
    224 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    225     let "idx=idx+1"
    226     echo
    227     echo
    228     echo "-- Rate limit of 33 kbps for 30 ms frame-size, wideband"
    229     echo
    230     $ISAC -I -B 32000 -FL 30 -FS 16 -MAXRATE 33000 ../data/orig/speech_and_misc_WB.pcm \
    231 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    232     let "idx=idx+1"
    233     echo
    234     echo "________________________________________________________"
    235     echo
    236     echo
    237 
    238     echo "-- No limit for 32 kbps, 30 ms, SUPER-WIDEBAND"
    239     echo
    240     $ISAC -I -B 32000 -FL 30 -FS 32          ../data/origswb/jstest_32.pcm \
    241 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    242     let "idx=idx+1"
    243     echo
    244     echo
    245     echo "-- Payload limit of 130 bytes for 32 kbps, 30 ms, SUPER-WIDEBAND"
    246     echo
    247     $ISAC -I -B 32000 -FL 30 -FS 32 -MAX 130 ../data/origswb/jstest_32.pcm \
    248 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    249     let "idx=idx+1"
    250     echo
    251     echo "________________________________________________________"
    252     echo
    253     echo
    254 
    255     echo "-- No limit, Rate 45 kbps, 30 ms, SUPER-WIDEBAND, 12 kHz"
    256     echo
    257     $ISAC -I -B 45000 -FL 30 -FS 32               ../data/origswb/jstest_32.pcm \
    258 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    259     let "idx=idx+1"
    260     echo
    261     echo
    262     echo "-- Rate limit of 46 kbps for 42 kbps, 30 ms, SUPER-WIDEBAND, 12 kHz"
    263     echo
    264     $ISAC -I -B 45000 -FL 30 -FS 32 -MAXRATE 46000 ../data/origswb/jstest_32.pcm \
    265 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    266     let "idx=idx+1"
    267     echo
    268     echo
    269     echo "-- Payload limit of 170 bytes for 45 kbps, 30 ms, SUPER-WIDEBAND, 12 kHz"
    270     echo
    271     $ISAC -I -B 45000 -FL 30 -FS 32 -MAX 170       ../data/origswb/jstest_32.pcm \
    272 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    273     let "idx=idx+1"
    274     echo
    275     echo "________________________________________________________"
    276     echo
    277     echo
    278   
    279     echo "-- No limit for 56 kbps, 30 ms, SUPER-WIDEBAND, 16 kHz"
    280     echo
    281     $ISAC -I -B 56000 -FL 30 -FS 32                ../data/origswb/jstest_32.pcm \
    282 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    283     let "idx=idx+1"
    284     echo
    285     echo
    286     echo "-- Payload limit of 200 bytes for 56 kbps 30 ms, SUPER-WIDEBAND, 16 kHz"
    287     echo
    288     $ISAC -I -B 56000 -FL 30 -FS 32 -MAX 200       ../data/origswb/jstest_32.pcm \
    289 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    290     let "idx=idx+1"
    291     echo
    292     echo
    293     echo "-- Rate limit of 57 kbps for 56 kbps 30 ms, SUPER-WIDEBAND, 16 kHz"
    294     echo
    295     $ISAC -I -B 56000 -FL 30 -FS 32 -MAXRATE 57000 ../data/origswb/jstest_32.pcm \
    296 	../PayloadLim"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    297     let "idx=idx+1"
    298     echo
    299     echo "________________________________________________________"
    300     echo
    301     echo
    302     echo
    303     echo
    304     echo
    305     
    306     echo "                                    Test Trans-Coding"
    307     echo "========================================================================================"
    308     mkdir -p ../Transcoding"$PLATFORM"
    309     rm -f ../Transcoding"$PLATFORM"/*
    310     echo
    311     echo
    312     echo "-- 20 kbps, 30 ms, WIDEBAND"
    313     echo
    314     $ISAC -I -B 20000 -FL 30 -FS 16          ../data/orig/speech_and_misc_WB.pcm \
    315 	../Transcoding"$PLATFORM"/APITest_refTrans20WB.pcm >> $LOGFILE_API
    316     let "idx=idx+1"
    317     echo
    318     echo
    319     
    320     echo "-- 32 kbps trans-coding to 20 kbps, 30 ms, WIDEBAND"
    321     echo
    322     $ISAC -I -B 32000 -FL 30 -FS 16  -T 20000  ../Transcoding"$PLATFORM"/APITest_32T20.pcm \
    323 	../data/orig/speech_and_misc_WB.pcm ../Transcoding"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    324     let "idx=idx+1"
    325     echo
    326     echo "________________________________________________________"
    327 
    328     echo
    329     echo
    330     echo "-- 38 kbps, 30 ms, SUPER-WIDEBAND"
    331     echo
    332     $ISAC -I -B 38000 -FL 30 -FS 32          ../data/origswb/jstest_32.pcm \
    333 	../Transcoding"$PLATFORM"/APITest_refTrans38.pcm >> $LOGFILE_API
    334     let "idx=idx+1"
    335     echo
    336     echo
    337     
    338     echo "-- 45 kbps trans-coding to 38 kbps, 30 ms, SUPER-WIDEBAND"
    339     echo
    340     $ISAC -I -B 45000 -FL 30 -FS 32  -T 38000  ../Transcoding"$PLATFORM"/APITest_45T38.pcm \
    341 	../data/origswb/jstest_32.pcm ../Transcoding"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    342     let "idx=idx+1"
    343  
    344     echo
    345     echo
    346     echo "-- 20 kbps, 30 ms, SUPER-WIDEBAND"
    347     echo
    348     $ISAC -I -B 20000 -FL 30 -FS 32          ../data/origswb/jstest_32.pcm \
    349 	../Transcoding"$PLATFORM"/APITest_refTrans20SWB.pcm >> $LOGFILE_API
    350     let "idx=idx+1"
    351 
    352     echo
    353     echo
    354     
    355     echo "-- 45 kbps trans-coding to 20 kbps, 30 ms, SUPER-WIDEBAND"
    356     echo
    357     $ISAC -I -B 45000 -FL 30 -FS 32  -T 20000  ../Transcoding"$PLATFORM"/APITest_45T20.pcm \
    358 	../data/origswb/jstest_32.pcm ../Transcoding"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    359     let "idx=idx+1"
    360     echo
    361     echo "________________________________________________________"
    362     echo
    363     echo
    364     echo "-- 50 kbps, 30 ms, SUPER-WIDEBAND"
    365     echo
    366     $ISAC -I -B 50000 -FL 30 -FS 32          ../data/origswb/jstest_32.pcm \
    367 	../Transcoding"$PLATFORM"/APITest_refTrans50.pcm >> $LOGFILE_API
    368     let "idx=idx+1"
    369     echo
    370     echo
    371     
    372     echo "-- 56 kbps trans-coding to 50 kbps, 30 ms, SUPER-WIDEBAND"
    373     echo
    374     $ISAC -I -B 56000 -FL 30 -FS 32  -T 50000  ../Transcoding"$PLATFORM"/APITest_56T50.pcm \
    375 	../data/origswb/jstest_32.pcm ../Transcoding"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    376     let "idx=idx+1"
    377     echo
    378     echo
    379     
    380     echo "-- 56 kbps trans-coding to 20 kbps, 30 ms, SUPER-WIDEBAND"
    381     echo
    382     $ISAC -I -B 56000 -FL 30 -FS 32  -T 20000 ../Transcoding"$PLATFORM"/APITest_56T20.pcm \
    383 	../data/origswb/jstest_32.pcm ../Transcoding"$PLATFORM"/APITest_"$idx".pcm >> $LOGFILE_API
    384     let "idx=idx+1"
    385     echo
    386     echo "________________________________________________________"
    387     echo
    388     echo
    389     echo 
    390     echo
    391     echo
    392     
    393     echo "                                         Test FEC"
    394     echo "========================================================================================"
    395     mkdir -p ../FEC"$PLATFORM"
    396     rm -f ../FEC"$PLATFORM"/*
    397     echo
    398     echo
    399     echo "-- 32 kbps with transcoding to 20kbps, 30 ms, WIDEBAND, 10% packet loss"
    400     $ISAC -I -B 32000 -FL 30 -FS 16 -PL 10 -T 20000 ../FEC"$PLATFORM"/APITest_PL10_WB30_T20.pcm \
    401 	../data/orig/speech_and_misc_WB.pcm ../FEC"$PLATFORM"/APITest_PL10_WB30.pcm >> $LOGFILE_API
    402     let "idx=idx+1"
    403     echo
    404     echo
    405     
    406     echo "-- 32 kbps, 60 ms, WIDEBAND, 10% packet loss"
    407     $ISAC -I -B 32000 -FL 60 -FS 16 -PL 10 ../data/orig/speech_and_misc_WB.pcm \
    408 	../FEC"$PLATFORM"/APITest_PL10_WB60.pcm >> $LOGFILE_API
    409     let "idx=idx+1"
    410     echo
    411     echo
    412     
    413     echo "-- 32 kbps with transcoding to 20 kbps, 30 ms, SUPER-WIDEBAND, 10% packet loss"
    414     $ISAC -I -B 32000 -FL 30 -FS 32 -PL 10 -T 20000 ../FEC"$PLATFORM"/APITest_PL10_SWB_8kHz_T20.pcm \
    415 	../data/origswb/jstest_32.pcm ../FEC"$PLATFORM"/APITest_PL10_SWB_8kHz.pcm >> $LOGFILE_API
    416     let "idx=idx+1"
    417     echo
    418     echo
    419 
    420     echo "-- 45 kbps with Trascoding to 38 kbps, 30 ms, SUPER-WIDEBAND, 10% packet loss"
    421     $ISAC -I -B 45000 -FL 30 -FS 32 -PL 10 -T 38000 ../FEC"$PLATFORM"/APITest_PL10_SWB_12kHz_T38.pcm \
    422 	../data/origswb/jstest_32.pcm ../FEC"$PLATFORM"/APITest_PL10_SWB_12kHz.pcm >> $LOGFILE_API
    423     let "idx=idx+1"
    424     echo
    425     echo
    426 
    427     echo "-- 56 kbps with transcoding to 50 kbps, 30 ms, SUPER-WIDEBAND, 10% packet loss"
    428     $ISAC -I -B 56000 -FL 30 -FS 32 -PL 10 -T 50000 ../FEC"$PLATFORM"/APITest_PL10_SWB_16kHz_T50.pcm \
    429 	../data/origswb/jstest_32.pcm ../FEC"$PLATFORM"/APITest_PL10_SWB_16kHz.pcm >> $LOGFILE_API
    430     let "idx=idx+1"
    431     echo
    432     echo
    433 fi
    434