1 |
2 |
petebleack |
README for the Dirac video codec hardware implementation
|
2 |
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3 |
|
|
|
4 |
|
|
by Thomas Davies and Peter Bleackley, BBC R&D (dirac@rd.bbc.co.uk)
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
1. Executive Summary
|
8 |
|
|
~~~~~~~~~~~~~~~~~~~~
|
9 |
|
|
|
10 |
|
|
Dirac is an open source video codec. It uses a traditional hybrid video codec
|
11 |
|
|
architecture, but with the wavelet transform instead of the usual block
|
12 |
|
|
transforms. Motion compensation uses overlapped blocks to reduce block
|
13 |
|
|
artefacts that would upset the transform coding stage.
|
14 |
|
|
|
15 |
|
|
Dirac can code just about any size of video, from streaming up to HD and
|
16 |
|
|
beyond, although certain presets are defined for different applications and
|
17 |
|
|
standards. These cover the parameters that need to be set for the encoder to
|
18 |
|
|
work, such as block sizes and temporal prediction structures, which must
|
19 |
|
|
otherwise be set by hand.
|
20 |
|
|
|
21 |
|
|
Dirac is intended to develop into real coding and decoding software and hardware, capable of plugging
|
22 |
|
|
into video processing applications and media players that need compression. It is intended to develop
|
23 |
|
|
into a simple set of reliable but effective coding tools that work over a wide variety of content and
|
24 |
|
|
formats, using well-understood compression techniques, in a clear and accessible software or hardware
|
25 |
|
|
structure. It is not intended as a demonstration or reference coder.
|
26 |
|
|
|
27 |
|
|
This release of the hardware implementation comprises VHDL modules for a prototype arithmetic coder
|
28 |
|
|
and decoder. These implement a fixed probability model.
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
2. Documentation
|
32 |
|
|
~~~~~~~~~~~~~~~~
|
33 |
|
|
|
34 |
|
|
A user guide and a guide to the software is in progress. More details on
|
35 |
|
|
running the codec can be found at http://dirac.sourceforge.net/
|
36 |
|
|
Documentation specific to the hardware will be posted the directory /docs.
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
3. Synthesis
|
40 |
|
|
~~~~~~~~~~
|
41 |
|
|
|
42 |
|
|
All modules are built in RTL style, and are synthesizable. Modules common to
|
43 |
|
|
the encoder and the decoder are in /src/common. Modules specific to the encoder are in /src/encoder
|
44 |
|
|
and those specific to the decoder are in /src/decoder.
|
45 |
|
|
|
46 |
|
|
Alongside each vhdl module (.vhd) is a .prj file. This specifies the compilation sequence for the
|
47 |
|
|
module.
|
48 |
|
|
|
49 |
|
|
The initial development of the vhdl was done with Xilinx ISE Webpack.
|
50 |
|
|
|
51 |
|
|
4. Simulation
|
52 |
|
|
~~~~~~~~~~~
|
53 |
|
|
The encoder may run at clock rates of up to 100MHz, and process an input symbol every 4 clock cycles,
|
54 |
|
|
thus giving a possible troughput of 25 Msymbol/second. The decoder can run at the same clock rate as
|
55 |
|
|
the encoder, and decode the encoded stream at the same rate that it is produced by the encoder.
|
56 |
|
|
|
57 |
|
|
A testbench is provided in /src/testbench, together with a test input file /src/rawdata. This
|
58 |
|
|
testbench provides an end-to end simulation of the encoding and decoding process, for a data stream
|
59 |
|
|
with a fixed source entropy of 0.498 bits/symbol. The testbench also provides a process that counts
|
60 |
|
|
the number of bits produced by the encoder.
|
61 |
|
|
|
62 |
|
|
Simulations have been perfomed with Modelsym XE.
|