*********************************************************************************************************
CONTENT of the MPEG-2 application distribution
*********************************************************************************************************
 * ./monolithic -- the sequential version of the application, written in C
 * ./examplempeg -- the parallel version of the application specified in a DOL format:
   * ./examplempeg/examplempeg.xml -- parallel version in XML
   * ./examplempeg/examplempeg.dot -- the task graph of the application in dot format 
   				      (use the dotty tool to visualize the graph). 
                                      This file is present here just for illustration; 
                                      Normally it is automatically generated during 
                                      DOL execution (http://www.tik.ee.ethz.ch/~shapes/dol.html). 
   * ./examplempeg/src -- code of the different parallel processes, written in C


*********************************************************************************************************
HOW TO COMPILE and RUN the MPEG-2 application
*********************************************************************************************************
TEST MOVIE: For the MPEG-2 example, the test movie is provided as an external file (test.m2v),
            included in this distribution.

I. The sequential version
*************************
cd ./monolithic
make
./mpeg2decode -o2 test%02d -b test.m2v

II. The parallel version
*************************
1. Install the DOL package from http://www.tik.ee.ethz.ch/~shapes/dol.html. 
In the package you can find: 
 * installation instructions, 
 * a few basic examples of parallel applications coded in DOL, 
 * and directions how to synthesie and execute DOL parallel applications in different environments. 

The first step is to functionally execute the application in a SystemC functional simulation, which is 
automatically generated by the DOL environment starting from the (DOL) parallel application description.

2. The MPEG-2 application can be scaled in the DOL environment. 
In /examplempeg two .dot files are provided, containing a non-scaled and a scaled version, respectively. 
The scaling can be done by changing just three parameters in the XML file, as follows 
(this example is for the scaled version):
  <!-- N1 is the number of GOPs processed in parallel -->
  <variable name="N1" value="1"/>
  <!-- N2 is the number of macroblocks processed in parallel -->  
  <variable name="N2" value="2"/>
  <!-- N3 is the number of blocks processed in parallel -->
  <variable name="N3" value="2"/>  

Note that the parameters should corespond with the values in the /examplempeg/src/global.h
#define NUM_OF_GOP_PORTS    1
#define NUM_OF_MB_PORTS     2
#define NUM_OF_BLOCK_PORTS  2

In order to visualize the results after the MPEG-2 application execution, 
make sure that the test file (test.m2v) is in the same directory where you execute the application.

 
*********************************************************************************************************
CONTACT
*********************************************************************************************************
Please feel free to contact any of the following persons 
for questions about the benchmarks, the DOL, or other related activities:

 * Iuliana Bacivarov (bacivarov@tik.ee.ethz.ch)
 * Wolfgang Haid (haid@tik.ee.ethz.ch)
 * Kai Huang (huang@tik.ee.ethz.ch)
