Mercurial > mplayer.hg
view TOOLS/countquant.pl @ 17067:2f4f6c278741
AMD's Family 6 CPUs come with two flavors: one that supports SSE and
one that dosen't. However, they're not easily distinguishible from
their signature (family, model and stepping). Original configure might
set -march=athlon-4 for a CPU that dosen't support SSE and causes gcc
to generate code that won't run on the target machine.
Closes bug #267.
patch by Zuxy Meng zuxy -- dot -- meng -- at -- gmail -- dot -- com
author | diego |
---|---|
date | Thu, 01 Dec 2005 02:51:22 +0000 |
parents | 85ebbeeb913b |
children | 32725ca88fed |
line wrap: on
line source
#!/usr/bin/perl -w sub display_quants { $frames = 0; foreach $key (sort(keys(%quants))) { $frames += $quants{$key}; } foreach $key (sort({ $a <=> $b } keys(%quants))) { printf("q=%d:\t% 6d, % 6.2f%%\n", $key, $quants{$key}, $quants{$key} * 100 / $frames); } print("$lines lines processed, $frames frames found\n"); printf("average quant. is: %f\n", $quant_total/$frames); } $lines = 0; $thislines = 0; $quant_total = 0; while (<STDIN>) { $lines++; $thislines++; if (/ q:([0-9]+) /) { $quants{$1}++; } elsif (/ q:(([0-9]+)\.[0-9]+) /) { $quants{$2}++; $quant_total += $1; } if ((scalar(@ARGV) > 0) && ($thislines > $ARGV[0])) { display_quants(); $thislines = 0; } } display_quants();