📄 runtestv
字号:
#!/usr/local.1122/bin/ksh# @(#)tv.run 1.7 4/27/92## This is a shell script to do test vector verifiication for the CCITT G.728# 16 kb/s LD-CELP coder.#tv=/usr/kroon/w/standards/g728/testv # directory where test vectors areBIN=. # directory where executables areTOOLS=/usr/kroon/w/standards/g728/verify #tools directory## check if testvectors are available#if [ -d "$tv" ]then## PASS TEST VECTORS THROUGH ENCODER #for j in $tv/in?.bn # ? is 1, 2, 3, 4, 5, or 6do rm -f INPUT cp $j INPUT xd=${j##*/} # xd=in?.bn x=${xd%%.bn} # x=in? y=${j%%.bn} # y=$tv/in? z=${x##in} # z=? print Floating-point encoder encoding $xd $BIN/ccelp INPUT BIT-STREAM $BIN/dcelpnpf BIT-STREAM OUTPUT mv BIT-STREAM $tv/incw$z.tx mv OUTPUT ${y}tx.ddone## PASS TEST VECTORS THROUGH DECODER#for j in $tv/cw?.bn do rm -f BIT-STREAM cp $j BIT-STREAM xd=${j##*/} # xd=cw?.bn x=${xd%%.bn} # x=cw? y=${j%%.bn} # y=$tv/cw? z=${x##cw} # z=? print Floating-point decoder decoding $xd $BIN/dcelpnpf BIT-STREAM OUTPUT mv OUTPUT $tv/outa$z.rxdonerm -f BIT-STREAMcp $tv/cw4.bn BIT-STREAMprint Floating-point decoder + postfilter decoding cw4.bn$BIN/dcelp BIT-STREAM OUTPUTmv OUTPUT $tv/outb4.rpf## VERIFY FLOATING-POINT ENCODER OUTPUTS#rm -f tv.outecho ============================================================== >> tv.outecho Test vector verification results for Floating-Point Encoder: >> tv.outdate >>tv.outecho ============================================================== >> tv.outfor j in $tv/incw[1-4].bn $tv/incw6.bn do xd=${j##*/} # xd=incw?.bn x=${xd%%.bn} # x=incw? echo -------------------------------------------------------------- >> tv.out echo Comparing bit stream files $xd and $x.tx ... >> tv.out $TOOLS/cwcomp $tv/$xd $tv/$x.tx >> tv.outdone## VERIFY FLOATING-POINT DECODER OUTPUTS#echo ============================================================== >> tv.outecho Test vector verification results for Floating-Point Decoder: >> tv.outfor j in $tv/outa?.bndo xd=${j##*/} # xd=outa?.bn x=${xd%%.bn} # x=outa? echo -------------------------------------------------------------- >> tv.out echo SNR of file $x.rx ... >> tv.out $TOOLS/snr $tv/$xd $tv/$x.rx >> tv.outdoneecho --------------------------------------------------------- >> tv.outecho Floating-point decoder + postfilter test: >> tv.outecho SNR of file outb4.rpf ... >> tv.out$TOOLS/snr $tv/outb4.bn $tv/outb4.rpf >> tv.outrm -f *.tmp INPUT BIT-STREAMrm -f $tv/*.d $tv/*.tx $tv/*.rx $tv/*.rpfprint Results have been written to file: tv.outelseprint Testvector directory $tv not foundfi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -