discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Comb Filter


From: Martin Dvh
Subject: Re: [Discuss-gnuradio] Comb Filter
Date: Wed, 05 Jan 2005 04:24:06 +0100
User-agent: Mozilla Thunderbird 0.9 (X11/20041124)

The comb filter is not essential. If you do not have it, the color information in the signal will give you some distortion (moire pattern) but you will be able to get a picture.

The simplest form of an black and white NTSC (or PAL) receiver would be:
RF front-end to IF of 36 MHz or 38.9 Mhz
ADC
a synchronous AM detector.( You might even get away with an envelope detector.)
a signal inverter (PAL and NTSC are different here, one of the two has its 
signal inverted)
Now you have simple composite NTSC signal
from here you need:
a sync detector
code which takes all samples between two horizontal sync pulses and put it in a 
line.
code which starts a new field after a vertical sync pulse

also you probably want a DC restorer and AGC.

a DC restorer (have black allways at the same level) can be build using the vertical or horizontal blanking interval.(time between sync pulse and start of the real Y-signal)

just wait a few samples after the end of the horizontal sync pulse and get the average of a few samples and compare it to a fixed black level (for example 42)
offset=blanking level-42
add this offset to the signal.

AGC: get the maximum sample per field and average this over a few fields
multiply the signal with 255/maxaverage
now you have an Y signal which is allways between 42 and 255
this Y-signal is your black-and white signal.

for color you need a lot more.
(at least a band or comb filter at 3.58 Mhz followed by another AM detector 
with seperate I and Q outputs)

The sync pulses are there because the horizontal and vertical refresh frequency 
may have a slight variation.
Unfortunately if you digitize the signal this means not every line has exactly 
the same amount of pixels.
This can be solved by oversampling the signal (higher samplerate then neccesary) and resizing each line (all pixels betweeen two sync pulses) to the same amount of pixels.
In a real television this variation is solved by a Phased locked loop.

I found all this information out because I am trying to use a bttv TV-capture 
card with a bt878 chipset for non-TV signals (for gnuradio)
So I read the whole bt878 datasheets and several other sources several times.
This might be a good read for you too. It has a lot of information about sync 
pulses, comb filters, PAL/NTSC/SECAM. DC-restoration and more.
http://www.conexant.com/servlets/DownloadServlet/100600B.pdf?FileId=443
Also I found some information in the datasheet for the philips FI1226 tuner 
(which is found in many TV-cards)
http://www.gdv.uni-hannover.de/~hunold1/linux/saa7146/specs/fi1216mk2.pdf

A synchronous AM detector can be build using the following.
a PLL locked to the carrier of the (TV)signal
multiply the signal with the (complex) output of the PLL.

For decoding television the follwing information sources might come in handy:
Nice page about all kind of radio and TV signals:
http://www.st-andrews.ac.uk/~www_pa/Scots_Guide/RadCom/intro.html

For decoding PAL you could take a look at cabletv
http://sector17.tvand.net/cabletv/

cabletv is an opensource realtime PAL decoder.
It is meant to be able to do this in absence of sync pulses (cablecrypt 
encoded), but it will still work with sync pulses
All the stuff to decode PAL is in there (in plain C as well as mmx assembler)
NTSC is not that different from PAL. The main differences are: different number of lines, different number of pisels in a line. Different frequency of color signal, modulation is inverted, color signal is changed every line (you need the previous line) in PAL and it is not in NTSC
different audio system.


I hope this helps you further.
Greetings,
Martin



Daniel O'Connor wrote:
On Wed, 5 Jan 2005 07:43, Prateek Dayal wrote:

Thanks .. my concern right now is to get a video decoding system
working. Speed is not the issue. Once I am able to do this, I can fine
tune different modules. I also have to find out how to convert the
decoded intensity (Y) values to something that can be displayed by the
display driver ....


If/when you get colour you could use the XVideo extension to have your video card do the YUV -> RGB colour space conversion ;)

(Actually you could do it in just B&W but it would be more complex than it's worth..)



------------------------------------------------------------------------

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]