If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Solving a simple equation for resolution?

Hey guys. I need a little bit of your brain power becouse in this case my own is inadequate. I've never really been any good at math, and I really could use some help... Here is the problem, I'm trying to figure out how to solve a problem where everything is constant except the resolution... Maybe this will help better...

Now in order to solve for BPP we have to figure out what the aspect ratio is, and that is simply dividing the width by height. Then we divide the bitrate by the refresh rate by the aspect ratio. The solution is the bits per pixel.

Aspect=Source Width/Source Height

BPP=Bitrate/Refresh/Aspect

Or if we want to solve for the bitrate we can multiply the BPP by the width by the height by the refresh rate. Seems simple enough.

Bitrate=BPP*Source Width*Source Height*Refresh.

...............................

Now where I'm stuck is, assuming that Bitrate, BPP, Refresh, and Aspect are fixed values, how would I solve for the width and height? This has to be done while maintaining the aspect ratio of the original source. I havent been able to figure out how to do it. Anybody have any suggestions?

Assuming BPP stands for bits per pixel: No, Bitrate/Refresh/Aspect does not equal BPP. Bitrate divided by Refresh is bits per frame. Divide that by pixels per frame (width * height) and then you've got BPP.

Assuming BPP stands for bits per pixel: No, Bitrate/Refresh/Aspect does not equal BPP. Bitrate divided by Refresh is bits per frame. Divide that by pixels per frame (width * height) and then you've got BPP.

For example: the number 42 has 2 digits. The number 5 has 1 digit. What number has 0.25 digits?

A normal Bits Per Pixel is 8, 16, or 32. Sometimes it can be 1, 2, 4, or 24. It is never a fraction.

Maybe 0.25 is actually the dot pitch of a CRT monitor or something like that?

EDIT: Oh I see, it's a compressed video stream. Ok, in that case maybe you could have a compression ratio of 4 pixels to 1 bit or 0.25 bits per pixel.

Actually the codec I'm using is x264, so yes it's compressed. I'm not sure how the compression algorithms work though, just that they do it in a way that compares blocks of colors rather then each pixel individually. They call it a quantizer matrix. Chances are likely that multiple pixels side by side will have very similar colors, and what x264 does it it allocates blocks and assigns these blocks the same color in order to save bits. That is why low quality encodes you can actually see blocks in the video. Also instead of using a 24bit RGB value for the color they use a 12bit YUY value that comes pretty dang close to 24bit RGB quality.