Diego Biurrun <[email protected]> writes:

> On Tue, Jun 28, 2011 at 10:46:31PM -0400, Justin Ruggles wrote:
>> ---
>> @@ -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 $(( )).

The shell only does integer maths.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to