[Ffmpeg-devel] [PATCH] Allowing (k,M,G and B) unit postfixes

Michael Niedermayer michaelni
Thu Sep 14 00:37:08 CEST 2006


Hi

On Wed, Sep 13, 2006 at 01:52:26PM +0200, Panagiotis Issaris wrote:
> Hi,
> 
> The attached patch allows parameter values (AVOptions) to use the 'k', 'M', 'G'
> and 'B' postfixes. Specifying '700k' would mean 700 kbits, while '700kB' would
> mean 700 kbytes. This eases using the -bit_rate parameter which uses bits as
> its unit. I've used the SI units, keeping the case intact. If someone prefers
> all lowercase postfixes, similar to the option names, I can ofcourse adapt this.
> 
> Furthermore, I've used the SI unit values, k==1000 and not k==1024. I wasn't sure
> about this, as I thought for networking and bitrates that was a good idea, but
> for storage sizes, I think the Ki==1024 ("kibi") units are also being used.

iam a little unsure about the upper/lowwer case and kibibit (every time i read
about these gigibit units i somehow want to vomit ...)

maybe we could have lowwer case for one and upper case for the other
or we just follow all the standard comitees and add kiB, MiB and GiB
after all using k to mean 2 things is just wrong and theres no real standard
which say k=1024 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list