On Tue, Jun 28, 2011 at 10:46:31PM -0400, Justin Ruggles wrote:
> ---
> This is not a complete solution, but I thought I would put it out there for
> some suggestions.
>
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -17,13 +17,19 @@ ref=${7:-"${base}/ref/fate/${test}"}
>
> -outdir="tests/data/fate"
> +datadir="tests/data"
> +outdir="${datadir}/fate"
> outfile="${outdir}/${test}"
> errfile="${outdir}/${test}.err"
> cmpfile="${outdir}/${test}.diff"
> repfile="${outdir}/${test}.rep"
>
> +target_datadir="${target_path}/${datadir}"
> +pcm_src="$target_datadir/asynth1.sw"
> +psnr_ref=$ref
The datadir and target_datadir variables are only used in one place and
the former just to define the latter, so they appear redundant to me.
> @@ -36,6 +42,21 @@ do_tiny_psnr(){
>
> +do_tiny_psnr2(){
> + psnr=$(tests/tiny_psnr "$1" "$2" 2 $3 0)
> + psnr1=$(cat $psnr_ref)
> + val=$(expr "$psnr" : ".*$4: *\([0-9.]*\)")
> + ref_val=$(expr "$psnr1" : ".*$4: *\([0-9.]*\)")
> + res=$(echo "if ($val >= $ref_val) { $val - $ref_val } else { $ref_val -
> $val }" | bc)
> + res=$(echo "if ($res <= $5) 1" | bc)
Maybe you can calculate this directly in the shell with $(( )).
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel