PDA

View Full Version : How much bitrate do the black bars take up?


Matthew
18th January 2002, 00:13
And please don't say, "not much" :p

I'm looking for a kilobits per second figure if possible.

The reason I'm interested is that a 2:35:1 movie does not require as high an average bitrate to get the same quality as a 1.85:1 movie because the black bars are larger and they don't take up much bitrate, leaving more for the viewable part. (At least that's how I belive it works).

Now if I know the amount of bitrate used by the black bars, I can mathematically calculate (using simple arithmatic) the comparable average bitrates across the different (original cinema) aspect ratios. At least I think I can :p

For example, the viewable area of a 2.35:1 films is 78.72 percent of that of a 1.85:1 film. Therefore the required bitrate for a 2.35:1 film would be equal to:

[(average bitrate for 1.85:1 film) - (bitrate used for black bars in 1.85:1 film)] * 0.7872 + (bitrate used for black bars in 2.35:1 film)

Or maybe this is just total BS :p

Anyway, assuming my logic is correct, four values are required (for my purposes anyway) - the bitrate used for black bars in:
#non-anamorphic 16:9 DVDs with aspect ratio of 1.85
#non-anamorphic 16:9 DVDs with aspect ratio of 2.35
#anamorphic 16:9 DVDs with aspect ratio of 1.85 which are encoded using 16:9.
#anamorphic 16:9 DVDs with aspect ratio of 2.35 which are encoded using 16:9.

Assuming the size of black bars and the bitrate required is a proportional relationship then only one of the above values is required as the others can easily be calculated from it.

Kedirekin
18th January 2002, 02:37
This is actually a complicated question to answer.

First, lets assume the black bars are perfectly black (use Crop somewhere in your avs to be sure).

For complete macroblocks that are black, I believe the bitrate is so close to zero that you don't even need to worry about it. For example, if your movie has top and bottom borders of 60 (standard for 16:9), then the top 3 macroblock rows (480x48) and the bottom 3 macroblock rows (also 480x48) will be zeros.

After that, you get a series of macroblocks that are partially black (from the example above, 30 macroblocks top border that are 16x4 pixels of picture and 16x12 pixels of black - ditto on the bottom border). I'd say the portion that is black uses very close to zero bitrate as well, except that the abrupt transition from picture to black probably uses a larger portion of bitrate than you might expect. Without rigourous analysis (which would require tools I don't posses, and you probably don't either), I'd say you probably need to use an approximation for these.

First approximation would be to simly ignore the black in partial macroblocks - for your calculations, just treat them as if they were all picture.

A good second approximation might be to assume you save half the bitrate of the black portion. In other words, if the border macroblocks are half black (8x16), then you save half of the half, or equivalent to 4 pixels of zero bitrate. [hope that made sense].

Beyond that, I wouldn't care to speculate. Further refinement of your calculations probably wouldn't gain you much, and would probably disappear in copmarison to the compressibility difference between movies in any case.

Matthew
19th January 2002, 05:05
Thanks for the response.

Well due to my technical inepitude in these matters most of that went over my head :p Here was me hoping that it would be simple.

And from what you say it does seem that the relationship between the size of the black bars and the bitrate used is not proportional, making things even more difficult.

Is it possible to easily estimate even a crude upper limit for the difference between the bitrate required for 2.35:1 movies and that for 1.85:1, e.g. 100 kilobits per second?

Kedirekin
19th January 2002, 14:18
Sure, I like this sort of thing.

First, a simple assumption: for equal quality, we'll assume we just want to achieve an equal number of bits per macroblock.

Let stick with the first approximate to keep things simple - we'll ignore macroblocks that are only partially black.

Terms:
xblk: macroblock
bl_abr: baseline average bitrate

First, the baseline (assuming full screen -> (480/16) * (480/16) = 900 xblk):
top border: 0 xblk
bottom border: 0 xblk
picture: 900 - 0 - 0 = 900 xblk
baseline bits per macroblock: bl_abr/900

NON-ANAMORPHIC

1.77:1 (16:9) - black bars ~60 and ~60 (480*(1-1.333/1.777)/2)
top border: trunc(60/16) * 480/16 = 90 xblk
bottom border: trunc(60/16) * 480/16 = 90 xblk
picture: 900 - 90 - 90 = 720 xblk
total bitrate: 720 * bl_abr/900= 0.8 bl_abr


1.85:1 - black bars ~67 and ~67 (480*(1-1.333/1.85)/2)
top border: trunc(67/16) * 480/16 = 120 xblk
bottom border: trunc(67/16) * 480/16 = 120 xblk
picture: 900 - 120 - 120 = 660 xblk
total bitrate: 660 * bl_abr/900= 0.7333 bl_abr


2.35:1 - black bars ~104 and ~104 (480*(1-1.333/2.35)/2)
top border: trunc(104/16) * 480/16 = 180 xblk
bottom border: trunc(104/16) * 480/16 = 180 xblk
picture: 900 - 180 - 180 = 540 xblk
total bitrate: 540 * bl_abr/900 = 0.6 bl_abr

ANAMORPHIC

1.77:1
...same as full screen...
total bitrate: 1 bl_abr

1.85:1 - black bars ~19 and ~19 (480*(1-1.777/1.85)/2)
top border: trunc(19/16) * 480/16 = 30 xblk
bottom border: trunc(19/16) * 480/16 = 30 xblk
picture: 900 - 30 - 30 = 840 xblk
total bitrate: 840 * bl_abr/900 = 0.9333 bl_abr


2.35:1 - black bars ~58 and ~58 (480*(1-1.777/2.35)/2)
top border: trunc(58/16) * 480/16 = 90 xblk
bottom border: trunc(58/16) * 480/16 = 90 xblk
picture: 900 - 90 - 90 = 720 xblk
total bitrate: 720 * bl_abr/900 = 0.8 bl_abr

So, to boil it down, assuming we want to get encodes equivalent to a full screen encode with a 2000 kbps average bitrate.
#non-anamorphic 1.77: 0.8 * 2000 = 1600 kbps
#non-anamorphic 1.85: 0.7333 * 2000 = 1467 kbps
#non-anamorphic 2.35: 0.6 * 2000 = 1200 kbps
#anamorphic 1.77: 1.0 * 2000 = 2000 kbps
#anamorphic 1.85: 0.9333 * 2000 = 1867 kbps
#anamorphic 2.35: 0.8 * 2000 = 1600 kbps

Matthew
21st January 2002, 03:58
Thanks a bunch. The calculations went right over my head but the end result didn't :D

The calculations seem to refer to NTSC resolution - 480 x 480. Would using the PAL resolution of 480 x 576 lead to different results?

Kedirekin
21st January 2002, 12:30
Yes, probably, because the top and bottom borders will be taller, and might kick one macroblock higher in height. I don't have time right now to play with the numbers. Maybe when I get home tonight.

Kedirekin
23rd January 2002, 00:30
Sorry I didn't post last night. I got caught up playing with the new decomb filter and lost track of time.

Anyway, I've come up with this generalized forumla to calculate the 'factor' that'll give you the same bits-per-macroblock as a full-screen encode.

1 - trunc(tb/16)*16/h - trunc(bb/16)*16/h


Where
tb == top border height
bb == bottom border height
h == total height (480 for NTSC, 576 for PAL)

For PAL, the border figures are as follows (in these, I'm assuming the top and bottom borders are equal size).

PAL non-anamorphic 1.77: 72 and 72 (576*(1-1.333/1.777)/2)
PAL non-anamorphic 1.85: 80 and 80 (576*(1-1.333/1.85)/2)
PAL non-anamorphic 2.35: 124 and 124 (576*(1-1.333/2.35)/2)
PAL anamorphic 1.77: 0 and 0 (576*(1-1.777/1.777)/2)
PAL anamorphic 1.85: 11 and 11 (576*(1-1.777/1.85)/2)
PAL anamorphic 2.35: 70 and 70 (576*(1-1.777/2.35)/2)

So for PAL, the factors become:
#non-anamorphic 1.77: 0.777
#non-anamorphic 1.85: 0.722
#non-anamorphic 2.35: 0.611
#anamorphic 1.77: 1.0
#anamorphic 1.85: 1.0
#anamorphic 2.35: 0.777

I'll let you calculate the equivalent bitrates.

PS. I made an error in my calculation for NTSC anamorphic 1.85:1. The borders should be 9 and 9, not 19 and 19, and the factor then becomes 1.0

red321
23rd January 2002, 14:05
Probably a newbie question, but if you use the letterbox(top,bottom) command, does setting the bars to multiples of 16 reduce the bitrate ,
so that a top bottom bar of 64 requires noticably less encoding than 60, as you have 2 less rows of macroblocks to encode rather than 8 less pixel rows ?