[Ffmpeg-devel] [PATCH] Print KB for 1024 bytes

Michel Bardiaux mbardiaux
Thu Feb 15 14:30:42 CET 2007


Panagiotis Issaris wrote:
> Hi,
> 
> Michel Bardiaux schreef:
>> Panagiotis Issaris wrote:
>>> M?ns Rullg?rd schreef:
>>>> Michel Bardiaux said:
>>>>> For consistency with command line options
>>>> Rejected.  The standard abbreviation for kilo is a lowercase k.
>> For kilo-1000 or kilo-1024? Currently, in the *same* message, k in kB
>> means 1024 and k in kbits/sec means 1000. They cant both be right!
> No, it was intended that k should only mean 1000, not 1024. When 1024 is
> meant, kiB should be used instead.
> 
>     101                 if(next[1] == 'i'){
>     102                     d*= pow( 2, e/0.3);
>     103                     next+=2;
>     104                 }else{
>     105                     d*= pow(10, e);
>     106                     next++;
>     107                 }
> 
> But, this ofcourse only affects input not output... And apparantly you
> are right in that the output of ffmpeg.c is inconsistent.
> 
>>> Yes, and in fact, the command line options use 'k' (although they also
>>> allow 'K').
>> They use k for 1000. I wish they wouldnt allow K for 1000, but at least
>> I have a choice of not using it. Output is another matter.
> Yes, I'd suggest applying one of the attached patches.
> 
I dont like the 1st one much (will be 10 years before I can utter a 
regal "REJECTED!"), when bytes are counted, people *expect* kilos to be 
1024 (except hardware salespersons, whose gigabytes are somewhat rikiki...)

I'd suggest this modif to the 2nd, following Ian's suggestion, for the 
purely pragmatic reason that this will avoid having wikipedia quoted to 
us umpteen times. Wanderer's objections notwithstanding, since he 
accepts this is one case where ambiguity is unacceptable.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg_KB_2.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070215/367472c7/attachment.txt>



More information about the ffmpeg-devel mailing list