[net.micro.amiga] NTSC decoder for Amiga

stever@videovax.UUCP (Steven E. Rice) (09/18/86)

In article <3702@amdahl.UUCP>, Kim DeVaughn (kim@amdahl.UUCP) writes:

> [ ... go ahead, eat my bits ... ]
> 
> Recently, I purchased a Digi-View for my Amiga, and am now looking
> for some kind of "box" that I can best describe as an "NTSC video
> color filter".  I'm wondering if anyone on the net knows of such a
> device.

> . . .

> What I would also like to do, is digitize images from my VCR (I have a
> Cannon VR-HF600A, which has a "rock-solid" freeze-frame).  As is, this
> works well in producing monochrome images (from either a B&W or color
> source), but needs a "color filter box" between the VCR and the Digi-View
> for color results.
> 
> Conceptually, this box would have red, green, and blue "color-killer"
> switches on it so one could filter out two of the three colors at a
> time.  The output of the box could be either the actual "red image"
> (or green or blue), or the B&W representation of the same ... either
> should work just fine based on my experiments.
> 
> Anyone have any ideas on where to find such an animal, or how one might
> go about building one (I'm a h/w person, but know next to nothing about
> video)?
> 
> I have looked at several of the "special effects" video processors that
> are available.  Lots of nifty and interesting things can be done with
> these, but so far, none do the kind of thing I've described above.  Any
> help would be greatly appreciated.

What you are looking for is an NTSC decoder.  In order to maintain
compatibility with the monochrome television system that already existed
when color was being considered, the color information is processed and
modulated on a subcarrier that is inserted into the video.  This produces
some artifacts (e.g., phantom colors on fine patterns and "dot crawl" on
vertical or near-vertical edges where the color changes abruptly), but
for the most part is quite viewable.

The bad news is that the color is encoded as R-Y ("red minus luminance")
and B-Y ("blue minus luminance"), matrixed into I ("in-phase") and Q
("quadrature") signals and then quadrature modulated onto a 3.579545 MHz
subcarrier.  To decode this signal into the outputs you want requires
several steps:

  1. Pass two copies of the input NTSC video through a pair of filters
     to separate the luminance information (brightness) from the
     chrominance information.

  2. Lock up to horizontal and vertical sync, which form the timing
     references for all that follows.

  3. Phase-lock a crystal oscillator to the "color burst," an
     (approximately) two-microsecond-long segment of subcarrier that
     follows sync on each line (except in the vertical interval).
     The phase of the color burst signal becomes the reference for
     decoding the color information.

  4. Mix a copy of the reference generated in step 3 with one copy of
     the chrominance information (not "mix" as in "stir", but "mix" as
     in "modulate"!).  Filter off the high frequencies (above about
     600 kHz), and you have the I ("in-phase") signal.

  5. Feed a copy of the reference generated in step 3 through a network
     that shifts its phase by 90 degrees.  Mix the phase-shifted result
     with a copy of the chrominance information.  Filter off the high
     frequencies, and you have the Q ("quadrature") signal.

  6. Matrix the I and Q signals to return to the R-Y ("red minus
     luminance") and B-Y ("blue minus luminance") signals.

  7. Add a copy of the Y (luminance) signal to R-Y, producing R (red).

  8. Add a copy of the Y (luminance) signal to B-Y, producing B (blue).

  9. Since Y = R + G + B in the original scene, re-create G (green) by
     subtracting both R and B from Y.

 10. Select one of the four signals (R, G, B, or Y), and pipe to your
     digitizer.  One additional complication is that while the Y
     (luminance) signal has sync present, the R, G, and B signals must
     have sync inserted before they are usable. . .

This is not as bad as it sounds (after all, if it can be done in a TV set
that sells for $200+ it certainly is possible).  However, it is not a
project for the faint-of-heart.

Perhaps it would be cheaper just to buy a VCR that has RGB outputs as well
as the standard composite video output. . .

					Steve Rice

----------------------------------------------------------------------------
{decvax | hplabs | ihnp4 | uw-beaver}!tektronix!videovax!stever