
Brooktree
157
VIDEO INPUT SUBSYSTEM
Line Numbering System
L2166_A
Bt2166
Graphics/Video Controller
Line Numbering System
The VideoStream Decoder’s vertical timing loop allows the number of lines in the
vertical active region to vary if the video chip is decoding a video tape recorder in
any mode other than normal play. As a result, the VideoStream Decoder provides
an accurate leading edge detection of vertical active. However the number of lines
expected may differ, and the actual leading edge of vertical active could be on an
unexpected line.
To make the control structure selection of starting line values work correctly,
the vertical line counter in the byte stream decoder is reloaded with the value 64
whenever the rst vertical active horizontal reset is detected. Normally, active vid-
eo for an NTSC signal starts on line 22. When a video tape recorder is in a mode
other than normal play, the active video may not start until much later (for exam-
ple, line 28). If a capture control structure is coded to start capture on line 22 but
active video does not actually start until line 28, six lines of inactive video would
be captured. When using Brooktree’s ByteStream interface, this problem can be
prevented by loading the line counter with the value 64 on the rst line of active
video. Then the capture structure can be set to capture active video data starting at
line 65.
The VideoStream Decoder has a horizontal and vertical scaling mechanism.
Lines that are decimated must still be processed by the VideoStream Decoder so
that lines coming to the Bt2166 are marked as either present or not. The marking
is done by withholding the start of active pixels from lines that are discarded. The
Bt2166 video input subsystem counts only active lines. Thus the line numbering
system used in the control structures is based on a post scale count not the actual
NTSC or PAL line number. If the DDA scaler included in the video module or the
scaler in the VideoStream Decoder is enabled, then all pixel and line numbering is
performed after the scaling process.
The VideoStream Decoder only scales vertically inside the active vertical re-
gion of the video frame. Consequently, all lines in the inactive region are presented
(and counted) by the Bt2166. This ensures that the closed caption data will always
be available, independent of the scaling set in the VideoStream Decoder. However,
the DDA scaler included in this module does scale the video data from the inactive
region of the display. To capture unscaled closed caption data, set up the capture
structure to disable the DDA for the relevant lines.
The VideoStream Decoder scales horizontally on all lines. Therefore be sure to
account for horizontal scaling in closed caption decoding.
When the VideoStream Decoder or DDA mechanism is set up for scaling, hor-
izontal pixel counts and vertical line counts within the Bt2166 are post-scaled.