# [MPlayer-users] non-mod16 resolutions

D Richard Felker III dalias at aerifal.cx
Thu Sep 16 05:44:22 CEST 2004

```On Wed, Sep 15, 2004 at 09:43:17PM -0400, Matthew W. Miller wrote:
> On Wed, Sep 15, 2004 at 04:37:36AM -0400, D Richard Felker III wrote:
> >On Wed, Sep 15, 2004 at 08:42:25AM +0100, Martin Collins wrote:
> >> Interesting that the bitrate increases linearly with the resolution
> >> rather than as the square as one would (naiively) expect.
> >yes, very interesting since i hypothesized this in the draft encoding
> >guide, i.e. that bits_per_pixel should not be used, but instead
> >bits_squared_per_pixel, for the purpose of scaling image size versus
> >quality. it's nice to see it backed up by data.
>
> Okay.  In  DOCS/tech/encoding-tips.txt  Mosu suggests the formula
> 	bpp = (vbitrate * 1000) / (width * height * fps)
> or to solve for vbitrate,
> 	vbitrate = bpp * width * height * fps / 1000

if you use this formula with some real world examples you'll very
quickly see it's nonsense. :) it tells you 320x240 needs almost no
bits... :)

> So if I'm reading Loren and Martin and Rich (oh my!)'s findings here, a
> better formula would be
> 	vbitrate = bpsp * sqrt(width * height) * fps / 1000
> where bpsp is the desired Bits Per Square root of Pixel-count.

yes, i agree totally!

> Note that this calculates vbitrate in kbit/sec.  To calculate it in
> bit/sec, leave out the "/ 1000".  Of course, MPlayer will make an
> educated guess about which one you're using. :)
>
> Is anyone feeling daring enough to throw out a few approximately 'good
> enough' bpsp levels?

my guess is 100-130 bpsp for really good quality. maybe 80 is
half-decent.

> Of course "You're going about this all wrong, the bitrate to use depends
> on what you need for a particular movie" is a perfectly acceptable
> response as well.

well that's true too. :)
the main intended use of bpp (and now of bpsp) is for scaling your
movie. i.e. if you want to use a fixed bitrate to fit on a cdrom, how
much should you downscale to make sure the quality doesn't suck?

rich

```

More information about the MPlayer-users mailing list