View Full Version : Bits and Word Length for Dummies...


Joelc
02-10-08, 03:48 PM
I am following the lead of others that created very helful threads for me with the hope that this will for others...the dummy, in this case, would be me and I am writing this with the hope of no longer being a dummy at the end of this thread...

I am confused about 2 things as it relates to this thread...

1. What video formats can be carried by which video connection...for example I have read DVI is limited to 24 bit RGB, HDMI 1.1 and 1.2 are limited to 24 bit RGB and YCbCY, HDMI 1.3 allows what...in other words, it would be helpful for a listing of which each format allows (and, for simplicity, let's limit this to the digital domain).

2. How -- and I probably wont express this properly -- the various formats are determined to be better than other...for example:

a) 24 bit YCbCr 4:2:2 means -- TO ME -- Y is sampled 4 out of 4 pixels, Cb is sampled 2 out of every 4 pixels (say pixels 1 and 3), Cr is sampled 2 out of every 4 pixels (say pixels 2 and 4) and, because it is 4 bit, Y is 16 bit and Cb and Cr are 8 bit; and

b) 24 bit YCbCr 4:4:4 means -- TO ME -- Y is sampled 4 out of 4 pixels, Cb is sampled 4 out of every 4 pixels , Cr is sampled 4 out of every 4 pixels and, because it is 4 bit, Y = Cb = Cr = 8 bit

The point being...is my understnading of the above correct and how does one tell when comparing formats which of he two is preferred (i.e. should I send my projector RGB, YCbCr 4:2:2 or YCbCr 4:4:4...in other words it would be helpful to confirm my understanding or explain how the 24 bits are divided and how different standards are compared...

I -- probaly others -- would greatly apprecaite and value omeone with the patience to do so would explain this to me with the task of "un-dumming me".

TIA

Glimmie
02-10-08, 05:07 PM
Bit depth and time are two different dimensions. Your sampling theory is correct but not in the way it relates to bit depth.

4:2:2 means Y sampled 4 times at x bits , pB samples 2 times at x bits and pR samples 2 times at x bits. X can be 8, 10, 12, 16 bits or whatever. The more bits, the more gray scale that can be captured. The faster the sampling, the higher the frequencies that can be captured.

In 4:2:2 under SMPTE292 which is a 74.25 sampling clock, the Y bandwidth can be in theory to 37.5mhz. Practically it's limited to about 30mhz. As the pB and pR are samples at half or 31.75mhz, they must be limited to 15.75mhz. On the broadcast side, all HD is allowed 10bits. That means the SMPTE292 distribution format is 10bit. That doesn't mean you get 10 bits. You can easily just carry 8 bits and zero out the other two bits.

Joelc
02-10-08, 05:23 PM
Bit depth and time are two different dimensions. Your sampling theory is correct but not in the way it relates to bit depth.
[quote]

Well 1 for 2 is not bad for a dummy...


[QUOTE=Glimmie;13071746]
4:2:2 means Y sampled 4 times at x bits , pB samples 2 times at x bits and pR samples 2 times at x bits. X can be 8, 10, 12, 16 bits or whatever. The more bits, the more gray scale that can be captured.


The more bits the morr grayscale...does this really mean the more colours/shades which in turn means smoother colour transition.



The faster the sampling, the higher the frequencies that can be captured.

In 4:2:2 under SMPTE292 which is a 74.25 sampling clock, the Y bandwidth can be in theory to 37.5mhz. Practically it's limited to about 30mhz. As the pB and pR are samples at half or 31.75mhz, they must be limited to 15.75mhz. On the broadcast side, all HD is allowed 10bits. That means the SMPTE292 distribution format is 10bit. That doesn't mean you get 10 bits. You can easily just carry 8 bits and zero out the other two bits.


I do not get this last piece...can you try again please...

Also, thanks for getting us started...

Allan Jayne
02-10-08, 07:07 PM
4:x:y
For every 4 luminance pixels in a row, x chrominance (color) pixels or Cb/Cr pairs are kept for odd rows (scan lines) and y chrominance pixels are kept for even rows.

For example: 4:2:0.
For every 4 Y pixels, 2 Cb/Cr pairs are kept for odd scan lines, no Cb/Cr pairs are kept for even scan lines. This means that every 2x2 block of Y pixels share the same coloration.

The actual color may or may not be the average of the luminance pixels in the group. Usually each Y and each Cb and each Cr is eight bits apiece. I have heard of 10 bit processing but am not sure where that is used.

4:X:Y is not used when discussing RGB, or if you insist, RGB is always 4:4:4. A 24 bit RGB has 8 bits for each color, per pixel.

The projector will duplicate, interpolate, synthesize, etc. additional chrominance pixels to create 4:4:4 if the input was lesser. Then the projector will convert it to RGB and create the picture.

A "word" is generally considered a group of ten to thirty bits that stand for one number. (A byte is generally 5 to 9 bits, a nybble is 2 to 4 bits.)

Video hints: http://members.aol.com/ajaynejr/video.htm

Joelc
02-10-08, 07:54 PM
4:x:y
For every 4 luminance pixels in a row, x chrominance (color) pixels or Cb/Cr pairs are kept for odd rows (scan lines) and y chrominance pixels are kept for even rows.

For example: 4:2:0.
For every 4 Y pixels, 2 Cb/Cr pairs are kept for odd scan lines, no Cb/Cr pairs are kept for even scan lines. This means that every 2x2 block of Y pixels share the same coloration.

The actual color may or may not be the average of the luminance pixels in the group. Usually each Y and each Cb and each Cr is eight bits apiece. I have heard of 10 bit processing but am not sure where that is used.

4:X:Y is not used when discussing RGB, or if you insist, RGB is always 4:4:4. A 24 bit RGB has 8 bits for each color, per pixel.

The projector will duplicate, interpolate, synthesize, etc. additional chrominance pixels to create 4:4:4 if the input was lesser. Then the projector will convert it to RGB and create the picture.

A "word" is generally considered a group of ten to thirty bits that stand for one number. (A byte is generally 5 to 9 bits, a nybble is 2 to 4 bits.)

Video hints: http://members.aol.com/ajaynejr/video.htm


Allan:

Appreciate the response...very clear and informative...

As follow up questions:

-- Am I correct to undersatnd that for YCbCr encoding per REC 601 and REC 709 that these are all 24 bit algorithms/matrices which means that no matter the encoding type there are no more than 24 bits to go around?

-- As it realtes to 10, 12 and 16 bit processing I understand this to be part of the expanded color gamut included in HDMI v1.3...that said, am I correct to understand that under 16 bit processing we now have 48 bit words?

-- Finally...how does one determine wehther 4:2:0 vs 4:2:2 versus 4:4:4 is better because, should i undersatnd you correctly, 4:2:0 has better luminance (more bits) and lesser chrominance (fewr bits)relative to 4:4:4?

Thanks a gain..

usualsuspects
02-10-08, 10:22 PM
Something to keep in mind is that all sources (HD and SD) are encoded as 4:2:0 8-bit on the source media for disk based players. HD-DVD, SD-DVD and Blu-Ray are all 4:2:0 on the disk, and either 4:2:2 8-bit or 4:4:4 8-bit after they are decoded, depending on the formats being sent out of the player. Higher bit depths are only useful in two scenarios. 1) you have a source that really has more than 8 bits of real source information (video games or generated images). 2) a scaler is expanding the bit depth as part of its scaling operations / gamma control / etc..

Glimmie
02-11-08, 12:58 AM
Allan:

Appreciate the response...very clear and informative...

As follow up questions:

-- Am I correct to undersatnd that for YCbCr encoding per REC 601 and REC 709 that these are all 24 bit algorithms/matrices which means that no matter the encoding type there are no more than 24 bits to go around?

-- As it realtes to 10, 12 and 16 bit processing I understand this to be part of the expanded color gamut included in HDMI v1.3...that said, am I correct to understand that under 16 bit processing we now have 48 bit words?

-- Finally...how does one determine wehther 4:2:0 vs 4:2:2 versus 4:4:4 is better because, should i undersatnd you correctly, 4:2:0 has better luminance (more bits) and lesser chrominance (fewr bits)relative to 4:4:4?

Thanks a gain..

--Both REC601 and 709 are 10bit capable. That doesn't mean however they must be ten bits - 8 bit is still commen and the two LSB's are set to zero.

--HDMI 1.3 has a dirty little secret. There is no current plan on the mastering side to go above 10 bits for home or even broadcast video. Mainly because the primary studio transport stream SMPTE292 doesn't support it. Digital Cinema does use high bit depths but these aren't comming to a BluRay or HDDVD anytime soon. As stated above, 8 bits is what you get for now.

--4:4:4, 4:2:2, and 4:2:0 all have the same luminance luminance sampling rate. The bit depth is what ever it is and all components have the same bit depth as the luminance. Sub sampling the chroma does not reduce the bit depth directly. Now once inside a compression engine, bit depth reductions do occur based on the compression algorithm.

Joelc
02-11-08, 06:17 AM
Something to keep in mind is that all sources (HD and SD) are encoded as 4:2:0 8-bit on the source media for disk based players. HD-DVD, SD-DVD and Blu-Ray are all 4:2:0 on the disk, and either 4:2:2 8-bit or 4:4:4 8-bit after they are decoded, depending on the formats being sent out of the player. Higher bit depths are only useful in two scenarios. 1) you have a source that really has more than 8 bits of real source information (video games or generated images). 2) a scaler is expanding the bit depth as part of its scaling operations / gamma control / etc..


Got it...but to confirm in my own words you are saying that it is -- at least for now -- a 4:2:0 world other than what goes on in a scaler which presumably would have the added benefit of smoother colour transitions...did i get thhis right?

Joelc
02-11-08, 06:23 AM
--Both REC601 and 709 are 10bit capable. That doesn't mean however they must be ten bits - 8 bit is still commen and the two LSB's are set to zero.


Thanks...what are LSb's other than the 9th and 10th bits?



--4:4:4, 4:2:2, and 4:2:0 all have the same luminance luminance sampling rate. The bit depth is what ever it is and all components have the same bit depth as the luminance. Sub sampling the chroma does not reduce the bit depth directly. Now once inside a compression engine, bit depth reductions do occur based on the compression algorithm.


Can you please explain:

1. The last sentence; and

2. The pros / cons then of 4:2:0 vs 4:2:2 vs 4:4:4

Thanks so much.

usualsuspects
02-11-08, 09:05 AM
You won't see 4:2:0 come out of a disk player. The minimum you will get is 4:2:2 (post decoded). There are really three formats that can come out of disk players: 4:2:2 YCbCr, 4:4:4 YCbCr, and 4:4:4 RGB. Some players can send 10 (or 12?) bits out, but as the source is 8-bits, the last two/four bits will likely be zeroed.

Glimmie
02-11-08, 03:01 PM
Thanks...what are LSb's other than the 9th and 10th bits?

Can you please explain:

1. The last sentence; and

2. The pros / cons then of 4:2:0 vs 4:2:2 vs 4:4:4

Thanks so much.

Actually the 9th and 10th bits are the MSB. For example here is code value 128

in an 8bit system: 1000 0000
in a 10bit system 00 1000 0000

However when we map 8 bits into a 10bit word we shift the 8 bit value up by 2 bits resulting in 1000 0000 00 so it's no longer 128 but becomes 512.

As for the pros anc cons of 4:4:4, 4:2:2, and 4:2:0, it's all about chroma bandwidth which equates to resolution detail. The higher the sampling of the chroma channels, the more high frequency information we can carry in the chroma channels.

PooperScooper
02-11-08, 04:30 PM
You won't see 4:2:0 come out of a disk player. The minimum you will get is 4:2:2 (post decoded). There are really three formats that can come out of disk players: 4:2:2 YCbCr, 4:4:4 YCbCr, and 4:4:4 RGB. Some players can send 10 (or 12?) bits out, but as the source is 8-bits, the last two/four bits will likely be zeroed. IIRC there are some players that send out real 10bit YCbCr 4:2:2 after scaling to 720/1080i/1080p. Denon 5910 rings a bell and maybe some of the other Reon/Realta and ABT based players.

larry

Joelc
02-11-08, 07:52 PM
Actually the 9th and 10th bits are the MSB. For example here is code value 128

in an 8bit system: 1000 0000
in a 10bit system 00 1000 0000

However when we map 8 bits into a 10bit word we shift the 8 bit value up by 2 bits resulting in 1000 0000 00 so it's no longer 128 but becomes 512.

As for the pros anc cons of 4:4:4, 4:2:2, and 4:2:0, it's all about chroma bandwidth which equates to resolution detail. The higher the sampling of the chroma channels, the more high frequency information we can carry in the chroma channels.

Thanks for the clarification...

Among the many things that have been established so far are:

1. We live in an 8-bit world meaning that YCbCr 4:2:0 (encoding only), YCbCr 4:2:2 (decoding only), YCbCr 4:4:4 (decoding only) and RGB 4:4:4 (although this nomencalture is non-standard let's just use it for now) (decoding only) are all 8-bit (abscence any scaling).

2. Scaling engines can (and sometimes do) convert YCbCr 4:2:2 or RGB 4:4:4 to YCbCr 4:4:4.

Now the questions....is it not the case that scaling can also convert 8-bit t- 10-bit and even 12-bit?

Thanks.

Glimmie
02-11-08, 08:08 PM
Thanks for the clarification...

Among the many things that have been established so far are:

1. We live in an 8-bit world meaning that YCbCr 4:2:0 (encoding only), YCbCr 4:2:2 (decoding only), YCbCr 4:4:4 (decoding only) and RGB 4:4:4 (although this nomencalture is non-standard let's just use it for now) (decoding only) are all 8-bit (abscence any scaling).

2. Scaling engines can (and sometimes do) convert YCbCr 4:2:2 or RGB 4:4:4 to YCbCr 4:4:4.

Now the questions....is it not the case that scaling can also convert 8-bit t- 10-bit and even 12-bit?

Thanks.

1) Consumer TV lives in an 8 bit world. Production mastering and some internal broadcast is 10bit. Digital Cinema can go to 16bits.

2) Yes scalers can interpolate bit depth just as they can interpolate missing pixels when converting SD to HD. But as always interepolation will never be as good as having the information there in the first place. Once you quantize at 8 bits or reduce to 8 bits, the additional bits are lost forever. A scaler putting them back is only a guess as to what they really were.