Discussion:
NTSC/PAL Encoder using FPGA and DAC
(too old to reply)
wallge
2009-06-12 15:58:15 UTC
Permalink
I am looking into putting a triple video DAC (eg ADV7123, ADV7125)
onto an FPGA board that I am building to do VGA component output.

If I wanted to have an NTSC composite output, rather than RGB
component VGA style outputs, could I repurpose one of my DACs and use
it for NTSC?

I know that there are some ICs that will take in bt601/bt656 and turn
it into NTSC/PAL for me, but these will typically not support the
range of VGA output resolutions that I would also like to support.

It seems that there are quite a few signal processing stages necessary
for getting from 24-bit RGB to composite NTSC, including: RGB to YUV,
Oversampling, Multi-tap LPFs,
Quadrature subcarrier generation, channel summation.

Do you think this can all be done in the digital domain, and then sent
out of the FPGA to the video DAC at the last step? It's just that I
would like to be able to use a single IC to generate VGA outputs as
well as NTSC outputs (although not both at the same time).

Does anyone have experience with implementing the algorithm to go from
RGB to NTSC/PAL? Are there any tricky things that I need to be careful
about?

Is anyone aware of a free/open implementation of this algorithm, or
parts of it, out there on the internets? I have been able to find a
rough description of most of the parts, but not a complete and
detailed narrative of the workings of each of the components.
Does ITU-R BT.470-7 describe the algorithm in detail? I have not been
able to find this document on the web anywhere, but have seen plenty
of places that reference it...

thanks,
Pete Fraser
2009-06-12 16:41:50 UTC
Permalink
Post by wallge
If I wanted to have an NTSC composite output, rather than RGB
component VGA style outputs, could I repurpose one of my DACs and use
it for NTSC?
Sure.
Post by wallge
Do you think this can all be done in the digital domain, and then sent
out of the FPGA to the video DAC at the last step?
Sure. It's relatively straightforward to do it in the digital domain.
I didn't use an FPGA (this was over thirty years ago) but it's
a fun project.
Post by wallge
Does anyone have experience with implementing the algorithm to go from
RGB to NTSC/PAL?
http://www.bbc.co.uk/rd/pubs/reports/1980s/reports1986.shtml

Download RD 1986/2
Colour encoding and decoding techniques for line-locked sample
PAL and NTSC television signals. C.K.P. Clarke
Post by wallge
Does ITU-R BT.470-7 describe the algorithm in detail?
No, just the signal format.
Post by wallge
I have not been
able to find this document on the web anywhere,
It's a free download from the ITU.

http://www.itu.int/rec/R-REC-BT.470-7-200502-I/en

Have fun

Pete
Curt Johnson
2009-06-12 17:49:24 UTC
Permalink
Post by wallge
Do you think this can all be done in the digital domain, and then sent
out of the FPGA to the video DAC at the last step? It's just that I
would like to be able to use a single IC to generate VGA outputs as
well as NTSC outputs (although not both at the same time).
I did it with an ADV7123, although I only encoded NTSC & PAL S-Video
digitally and used an FMS6410 to generate composite color.
I used Keith Jack's Video Demystified as a reference. It was pretty
straightforward.

A phase accumulator driving a 1/4 wave sine/cosine ROM gives you the
quadrature subcarrier. Some KCMs for the color space converter and LPFs.
Two multipliers. Ended up being about 500 lines of VHDL.

Now decoding; that was hard.

Curt
glen herrmannsfeldt
2009-06-12 18:55:57 UTC
Permalink
wallge <***@gmail.com> wrote:
< I am looking into putting a triple video DAC (eg ADV7123, ADV7125)
< onto an FPGA board that I am building to do VGA component output.

< If I wanted to have an NTSC composite output, rather than RGB
< component VGA style outputs, could I repurpose one of my DACs and use
< it for NTSC?

< I know that there are some ICs that will take in bt601/bt656 and turn
< it into NTSC/PAL for me, but these will typically not support the
< range of VGA output resolutions that I would also like to support.

If you make the bit clock a multiple of the subcarrier
frequency, it takes much less logic. That trick has been used
for many years, including the ever popular CGA board for the
IBM PC and the Apple II.

< It seems that there are quite a few signal processing stages necessary
< for getting from 24-bit RGB to composite NTSC, including: RGB to YUV,
< Oversampling, Multi-tap LPFs,
< Quadrature subcarrier generation, channel summation.

If you don't do the above, but make the ratio of dot clock to
subcarrier a simple fraction, only a small sine table is needed.
If you use BRAM, you can have fairly large sine tables.

It is somewhat harder if you want to generate true I/Q subcarriers
for NTSC, but pretty much nobody does that except broadcasters, and
pretty much nobody decodes it.

Why does this post come on the day that broadcast analog NTSC
is gone forever (in the US)?

-- glen
whygee
2009-06-12 20:44:01 UTC
Permalink
Post by glen herrmannsfeldt
< I am looking into putting a triple video DAC (eg ADV7123, ADV7125)
< onto an FPGA board that I am building to do VGA component output.
< If I wanted to have an NTSC composite output, rather than RGB
< component VGA style outputs, could I repurpose one of my DACs and use
< it for NTSC?
<snip>
Post by glen herrmannsfeldt
Why does this post come on the day that broadcast analog NTSC
is gone forever (in the US)?
don't know.... maybe it's not for broadcast.

Anyway, I just found these eBay items (I am just a customer, not a seller,
and the seller is is getting rid of his stock so the prices are event better)

50 pcs. CRYSTAL# CS4955-CQ, SIX 10-BIT DACS NTSC/PAL DG
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=110290947458
(4 available, $89,99 per lot, could be a bit lower)

100 pcs. ANALOG DEVICE# ADV7175KS, DAC VIDEO ENC NTSC 4
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=110293276171
3 available, $99.99 each, could be half less ?

I have not carefully read the datasheets (I'm looking for VGA out)
so I'm not sure it fits the exact purpose of the OP
but at least it may help make a few prototypes :-)
Post by glen herrmannsfeldt
-- glen
yg
--
http://ygdes.com / http://yasep.org
-jg
2009-06-12 22:38:37 UTC
Permalink
Post by glen herrmannsfeldt
Why does this post come on the day that broadcast analog NTSC
is gone forever (in the US)?
Perhaps:
a) The USA is only a small market
b) New Standards Conversion to NTSC is likely to be a major market
c) NTSC/PAL are going to exist in security/automotive cameras
for a very long time.

-jg
gabor
2009-06-16 14:20:18 UTC
Permalink
Post by -jg
Post by glen herrmannsfeldt
Why does this post come on the day that broadcast analog NTSC
is gone forever (in the US)?
a) The USA is only a small market
b) New Standards Conversion to NTSC is likely to be a major market
c) NTSC/PAL are going to exist in security/automotive cameras
   for a very long time.
-jg
One more point. More US TV viewers get their video from a cable
than over the air. So the broadcast NTSC market is almost as big
as it ever was, only now it's no longer wireless.

Cheers,
Gabor

Loading...