[Ffmpeg-devel] [PATCH] Allowing (k,M,G and B) unit postfixes
Thu Sep 14 03:29:57 CEST 2006
On Thu, Sep 14, 2006 at 01:12:56AM +0200, Panagiotis Issaris wrote:
> On do, 2006-09-14 at 00:37 +0200, Michael Niedermayer wrote:
> > iam a little unsure about the upper/lowwer case and kibibit (every time i read
> > about these gigibit units i somehow want to vomit ...)
> Personally, I am not to fond of typing uppercase characters on the
> commandline at all. And for some reason, I shiver when hearing the name
> "gigi" and "kibi".
> > 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 ...
> Hmm. I think I am currently following the standards as I am using the
> prefix k, M and G as meaning 1000, 1000000 and 1000000000. For the
> moment I did not implement any ki, Mi or Gi support as in current FFmpeg
> the unit for specifying bitrates is in powers of 10 not 2.
> As in "ffmpeg -i ... -b 800 ..." means a bitrate of 800*1000 bits/s
> and not 800*1024 bits/s.
> I am _not_ following the standards in respect to the fact that I am
> dropping the specification of the type, meaning the "b" for bits. That
> was intentional, to make it shorter to type :)
actually it should be bits/sec for the bitrate if you want to be pedantic
> So, with my current patch:
> "ffmpeg -i ... -b 800000 ..." means 800000 bits/s
> and is equal in meaning to:
> "ffmpeg -i ... -b 800k ..."
> "ffmpeg -i ... -b 100kB ..."
> Am I correct to think that you like the current behavior, as you dislike
> the kibi/gibi units? And as in my patch k=/=1024?
iam not 100% happy with your patch but its ok for the moment, feel free to
apply it (ask diego for a svn account if you dont have one yet)
one thing i dont like is that B(yte) makes no sense if the fundamental
unit isnt bits ...
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