heheh.

heheh.

Post by Midnight's Fir » Wed, 02 Dec 1998 04:00:00



Ok This may but off subject but here it is anyway...

I was recently looking through an electronics handbook and noticed a
penciled in not that said "RGB is encoded and then transmitted using only 2
wave forms". this was scrawled in the margin of my elec. text in the TV
Transmission section.

So I ran down to the library and looked up transmission standards in the
Texh. Encyclopedia. in teresting thing I found a referance to the '3 signals
from 2 wafe form', turns out it is 4 from 3.

But all the text said was that it was a mathmatical function of  "R-Y, B-Y,
and the Luminance".

Does anyone know what this means???
Also if you know how this RGB encoding works please either e-mail me or post
back here....

 
 
 

heheh.

Post by Gav » Thu, 03 Dec 1998 04:00:00


I found this page - it has a little bit of info about RGB encoding...

http://lemontree.web2010.com/dvideo/compression/adv02.html

---Gav---

Quote:>But all the text said was that it was a mathmatical function of  "R-Y, B-Y,
>and the Luminance".

>Does anyone know what this means???
>Also if you know how this RGB encoding works please either e-mail me or
post
>back here....


 
 
 

heheh.

Post by Ask » Sat, 05 Dec 1998 04:00:00


On Tue, 1 Dec 1998 04:27:03 -0800, "Midnight's Fire"
RBG in TV's is transmitted using 1 waveform that is made from 2
waveforms. This first is the frame timing...the second is the color
information wich is made from 3 waves(RGB) from the camera tube.

the R-Y/B-Y/Luminance is from a different type of video transmission
standard(kinda like the CYMK of some printers (and monitors))

Quote:>Ok This may but off subject but here it is anyway...

>I was recently looking through an electronics handbook and noticed a
>penciled in not that said "RGB is encoded and then transmitted using only 2
>wave forms". this was scrawled in the margin of my elec. text in the TV
>Transmission section.

>So I ran down to the library and looked up transmission standards in the
>Texh. Encyclopedia. in teresting thing I found a referance to the '3 signals
>from 2 wafe form', turns out it is 4 from 3.

>But all the text said was that it was a mathmatical function of  "R-Y, B-Y,
>and the Luminance".

>Does anyone know what this means???
>Also if you know how this RGB encoding works please either e-mail me or post
>back here....

 
 
 

heheh.

Post by Midnight's Fir » Sat, 05 Dec 1998 04:00:00


actually the closest transmission form is YUV. And it does make 2 wave forms
into the RGB signals...


>On Tue, 1 Dec 1998 04:27:03 -0800, "Midnight's Fire"

>RBG in TV's is transmitted using 1 waveform that is made from 2
>waveforms. This first is the frame timing...the second is the color
>information wich is made from 3 waves(RGB) from the camera tube.

>the R-Y/B-Y/Luminance is from a different type of video transmission
>standard(kinda like the CYMK of some printers (and monitors))
>>Ok This may but off subject but here it is anyway...

>>I was recently looking through an electronics handbook and noticed a
>>penciled in not that said "RGB is encoded and then transmitted using only
2
>>wave forms". this was scrawled in the margin of my elec. text in the TV
>>Transmission section.

>>So I ran down to the library and looked up transmission standards in the
>>Texh. Encyclopedia. in teresting thing I found a referance to the '3
signals
>>from 2 wafe form', turns out it is 4 from 3.

>>But all the text said was that it was a mathmatical function of  "R-Y,
B-Y,
>>and the Luminance".

>>Does anyone know what this means???
>>Also if you know how this RGB encoding works please either e-mail me or
post
>>back here....

 
 
 

heheh.

Post by Matt Timmerman » Wed, 09 Dec 1998 04:00:00


I don't know what you mean by "3 singnals from 2 waveforms", but RGB
encoding in NTSC TV works like this:

The RGB signal is transformed into YCbCr, where Y is luminance, Cb is
approximately B-Y, and Cr is approximately R-Y.  For realistic definitions
of Y, Cb, and Cr, check out the publicly available JPEG source.

This transformation is done for two reasons:

1) Y is much more important than Cb or Cr, so it makes transmission more
efficient to divide the signal this way and give Y more bandwidth.

2) The signal was built in such a way that old B&W televisions saw the Y
signal and some "distortion" because of the way Cb and Cr are encoded.

To encode the three components of the TV signal:

First, Y is bandwidth-limited to 4MHz or so.

Then, Cb and Cr are used to modulate 3.58MHz carrier signals, each 90
degrees out of phase with the other.

Then the signals are added together to make TV.  This discussion ignores
sync pulses, blanking intervals, porches, colorbursts, and interlacing.

The usual explanation of the Cb/Cr encoding is that because the Cb and Cr
signals are 90 degrees out of phase, they are mathematically orthogonal, and
each can be separately detected from the 3.58MHz carrier.  This is untrue,
however, because the signals are modulated, and the modulations on one will
interfere with the other to a significant extent.

The more satisfying explanation is that the quadrature (90 degrees out of
phase) encoding of Cb/Cr makes the magnitude of the 3.58MHz carrier
proportional to the saturation and its phase representative of the hue.
This gives a clear picture of bandwidth allocation in NTSC:  Y is important,
and it gets lots of bandwidth.  Saturation is less important and it gets
less bandwidth.  Hue is much less important and it gets much less
bandwidth -- it can take several cycles before phase is accurately
detectable.

 
 
 

heheh.

Post by Midnight's Fir » Thu, 10 Dec 1998 04:00:00


Thanx, I have read all the nfo I could find on this. how does it apply if
you use a static luminance?

 
 
 

heheh.

Post by Walter Robers » Thu, 10 Dec 1998 04:00:00



:Thanx, I have read all the nfo I could find on this. how does it apply if
:you use a static luminance?

A static luminance would be rather uncommon in real life, except perhaps
at the end of a 'fade to black'.

The luminance is normalized relative to the level of the sync pulses,
and you have to wait for a sync pulse before you can start displaying
anyhow, so a constant luminance presents no special problem for YCrCb
systems.

If you know that you have a constant luminance, you could compress
"better" than YCrCb. YCrCb is, though, a lossy compression in its
usual form. YCrCb gives higher signal weight to components that the
human eye finds to be important, and truncates components the human
eye will tend to notice less.

On the other hand, if you know you have a constant luminance, you
could also compress RGB -- knowing the luminance and knowing
the R and G components, you could calculate the B component. This would
be lossless if the luminance is known to enough decimal places, but
could loss up to two bits if the luminance is given as an integer,
since the unequal weightings of the components can map several different
RGB combinations to the same integer luminance.

 
 
 

heheh.

Post by Midnight's Fir » Thu, 10 Dec 1998 04:00:00


This is what I have been looking for... so who know how to get that B signal
out of the Static luminance and R and G signals? ? ?



>:Thanx, I have read all the nfo I could find on this. how does it apply if
>:you use a static luminance?

>A static luminance would be rather uncommon in real life, except perhaps
>at the end of a 'fade to black'.

>The luminance is normalized relative to the level of the sync pulses,
>and you have to wait for a sync pulse before you can start displaying
>anyhow, so a constant luminance presents no special problem for YCrCb
>systems.

>If you know that you have a constant luminance, you could compress
>"better" than YCrCb. YCrCb is, though, a lossy compression in its
>usual form. YCrCb gives higher signal weight to components that the
>human eye finds to be important, and truncates components the human
>eye will tend to notice less.

>On the other hand, if you know you have a constant luminance, you
>could also compress RGB -- knowing the luminance and knowing
>the R and G components, you could calculate the B component. This would
>be lossless if the luminance is known to enough decimal places, but
>could loss up to two bits if the luminance is given as an integer,
>since the unequal weightings of the components can map several different
>RGB combinations to the same integer luminance.

 
 
 

heheh.

Post by Walter Robers » Fri, 11 Dec 1998 04:00:00



:This is what I have been looking for... so who know how to get that B signal
:out of the Static luminance and R and G signals? ? ?

Just go back a little further to the YCrCb equations recently posted,
which are available from the Color FAQ,
http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html .

Y = 0.2125 R + 0.7154 G + 0.0721 B     [Equation 1]

so by simple algebra,

B = (Y - 0.2125 R - 0.7154 G) / 0.0721

which expands to:

B = 13.87 Y - 2.947 R - 9.922 G        [Equation 2]

For example, if  Y -> 25, R -> 36, G -> 14, then B -> 101.725 .

If we backsubstitute these values into Equation 1, we see
{R -> 36, G -> 14, B -> 101} => {Y -> 24.95}
{R -> 36, G -> 14, B -> 102} => {Y -> 25.02}   depending how we round B

On the other hand if we presume that Y -> 25 is an integral approximation
of the true Y but that R and G are "really" integers, then the
possible ranges for B are:

{Y -> 24.5,  R -> 36, G -> 14} => {B -> 94.79}
{Y -> 25.49, R -> 36, G -> 14} => {B -> 108.5}

so as should be expected from Equation 2, the value for B has an error
range of 13.87 if Y is input as an integral approximation of the true
luminance; and if one refers back to Equation 2, one can see that Y
needs to be known to within +/- (0.0721 / 2) in order to select a
specific integral B. That works out to about 4 bits of fractional
precision.

 
 
 

heheh.

Post by Midnight's Fir » Fri, 11 Dec 1998 04:00:00


here this is really my last stupid question. . .

What is an valid range for Y?   R? G? B?

 
 
 

heheh.

Post by Walter Robers » Fri, 11 Dec 1998 04:00:00



:here this is really my last stupid question. . .
:What is an valid range for Y?   R? G? B?

If you look back at the equation, you can see that the three
coeffecients for R, G, and B, sum to 1.0, and that there is no constant
term in the equation. This means that Y will be 0 when R, G, and B are
zero, and that Y has as its maximum whatever the maximum you fix
for R, G, and B. You can use whatever range you like for R, G, and B,
and Y will come out in exactly the same range. [R, G, and B do
need to be normalized to the same range as each other though.]

 
 
 

heheh.

Post by Midnight's Fir » Sun, 13 Dec 1998 04:00:00


ok now I ask for an example...

suppose R G B all have  Min=1, Max = 8
make Y anything you like.
Then what a tranmitted values when

1. R=1 G=1 B=1
2. R=3 G=5 B=8
3. R=7 G=7 B=7
4. R=8 G=2 B=6

Thanx for helping me out... once I understand this then I will reveal
practicle applications to this NG.




>:here this is really my last stupid question. . .
>:What is an valid range for Y?   R? G? B?

>If you look back at the equation, you can see that the three
>coeffecients for R, G, and B, sum to 1.0, and that there is no constant
>term in the equation. This means that Y will be 0 when R, G, and B are
>zero, and that Y has as its maximum whatever the maximum you fix
>for R, G, and B. You can use whatever range you like for R, G, and B,
>and Y will come out in exactly the same range. [R, G, and B do
>need to be normalized to the same range as each other though.]

 
 
 

heheh.

Post by Walter Robers » Tue, 15 Dec 1998 04:00:00



:ok now I ask for an example...
:suppose R G B all have  Min=1, Max = 8
:make Y anything you like.
:Then what a tranmitted values when
:1. R=1 G=1 B=1
:2. R=3 G=5 B=8
:3. R=7 G=7 B=7
:4. R=8 G=2 B=6

Using the equation shown before,

Y = 0.2125 R + 0.7154 G + 0.0721 B

R=1 G=1 B=1 => Y=1
R=3 G=5 B=8 => Y=4.7913
R=7 G=7 B=7 => Y=7
R=8 G=2 B=6 => Y=3.5634

As the weights sum to 1, any time the R G and B are equal, the Y will
be the same value.

Note that having a min of 1 and a max of 8 is a range of only 7 values,
not 8. And note that the weight for B, 0.0721, is less than 1/8th
so if you define the maximum to be 8, then the entire range of B will
make a Y difference of less than 1.0; indeed, when your range is so narrow,
the full range of B results in a change in Y of only 0.5047.

Similarily, the weight for R is about 1 / 4.7, so R is compressible too.

Your equation [when you are using such narrow weights] if you are rounding
starts looking something like (but not exactly like)

Y <- Round[0.7154 * G]
If R between 2 and 6 then Y += 1 else If R > 6 then Y += 2
If B == 8 then Y += 1

: Thanx for helping me out... once I understand this then I will reveal
: practicle applications to this NG.

If you actually are working with such a restricted range for R, G, and B,
then unless you are working to at least 3 decimals of accuracy on the Y,
you are losing precision and so the compression is not lossless.