Xcell Journal: The authoritative journal for programmable ... - Xilinx
Xcell Journal: The authoritative journal for programmable ... - Xilinx
Xcell Journal: The authoritative journal for programmable ... - Xilinx
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PPC. This FIFO allows the relatively slow<br />
66 MHz EPB bus to operate at full speed,<br />
without having to implement low-level<br />
hardware handshakes. A high-level handshake<br />
is implemented by making the FIFO’s<br />
fill level available <strong>for</strong> read-back by the PPC.<br />
<strong>The</strong> PPC core can keep track internally<br />
of the FIFO fill level and make decisions as<br />
to whether to work on filling the FIFO or<br />
per<strong>for</strong>m other useful functions. <strong>The</strong> input<br />
buffer also contains an auto-incrementing<br />
register used to generate indirect addresses<br />
<strong>for</strong> rapidly filling tables in other modules,<br />
to keep the decoder’s I/O address range on<br />
the EPB bus small.<br />
<strong>The</strong> variable length (VL) decoder<br />
decodes the Huffman-encoded block coefficients<br />
according to MPEG-2 tables B-14<br />
and B-15. State machines to traverse the<br />
Huffman code trees and a look-up table to<br />
extract run/level value pairs from the leafs<br />
both fit into a single Virtex-II block RAM<br />
configured as 1K deep x 16 bits wide.<br />
We used some extra FPGA fabric <strong>for</strong><br />
shift registers to handle escape codes <strong>for</strong><br />
run/level values not included in the<br />
Huffman code tables. <strong>The</strong> ISDSM block<br />
handles the functions of inverting zigzag<br />
scanning, dequantization, and scaling.<br />
<strong>The</strong> iDCT was the easiest block to<br />
design: it is included as a standard core in the<br />
<strong>Xilinx</strong> ISE CORE Generator package.<br />
<strong>The</strong> <strong>for</strong>mat converter assembles the Y,<br />
Cb, and Cr sample blocks into slices in a<br />
slice-assembly RAM buffer comprising 16<br />
block RAMs. <strong>The</strong> slices are then scanned<br />
out line by line and the lines are wrapped<br />
EPBIn<br />
EPBOut<br />
Input<br />
Buffer<br />
in CCIR-656 start and end active video<br />
(SAV/EAV) marker codes. We used an<br />
address rotation technique so new blocks<br />
can be assembled in the buffer as soon as a<br />
single line is removed, allowing the pipeline<br />
to run continuously without having to<br />
double-buffer the slice assembly RAM.<br />
Results<br />
<strong>The</strong> original unoptimized MPEG-2 codec<br />
chip external to the FPGA had a latency of<br />
~1800 ms. Working with the codec chip<br />
manufacturer, we reduced their latency to<br />
45 ms. <strong>The</strong> I-frame decoder we developed<br />
using the <strong>Xilinx</strong> FPGA and PPC has a<br />
latency of less than 2 ms.<br />
Conclusion<br />
We saved a lot of time and ef<strong>for</strong>t using prebuilt<br />
boards and IP in the development<br />
process. If we had to develop the board, all<br />
VL Decoder<br />
Table Address<br />
If we had to develop the board, all of<br />
the associated software and all of the<br />
IP that went into the low-latency decoder<br />
and display system would have taken<br />
years instead of months.<br />
Controls<br />
Inverse Scan<br />
Dequantization<br />
Saturation<br />
Mismatch<br />
(ISDSM)<br />
Inverse DCT<br />
Figure 5 – I-frame decoder block diagram<br />
DIGITAL SIGNAL PROCESSING<br />
of the associated software and all of the IP<br />
that went into the low-latency decoder and<br />
display system would have taken years<br />
instead of months.<br />
You can rapidly develop other video<br />
processing functions, including:<br />
• Other codecs – H.264, MPEG-4,<br />
Motion JPEG2000<br />
• Enhancement – linear and non-linear<br />
filters, super-resolution, histogram<br />
equalization/specification, de-convolution,<br />
warping<br />
• Stabilization and mosaicing<br />
For more in<strong>for</strong>mation on MPEG-2, read<br />
the book, “MPEG Video Compression<br />
Standard,” edited by Joan L. Mitchell et al.<br />
And <strong>for</strong> more in<strong>for</strong>mation on the<br />
VigraWATCH system, visit www.titan.com,<br />
keyword search “VigraWATCH.”<br />
Format<br />
Converter<br />
To VigraWATCH<br />
CCIR-656 Input<br />
Winter 2004 <strong>Xcell</strong> <strong>Journal</strong> 77