Application Report
SPRAA96A – April 2007
1
Encode Demo for the DVEVM/DVSDK 1.2
Niclas Anderberg SDO Applications
ABSTRACT
The DaVinci Digital Video Evaluation Module (DVEVM) comes with demonstration applications
that illustrate the use of its software and hardware components. This document describes the
design of the “encode” demo application. The encode demo uses the Codec Engine as well as
video and speech algorithms from Texas Instruments to encode video and sound data from
peripheral device drivers to files on the Linux file system.
Contents
1
Overview ..........................................................................................................................................2
2 Application Design..........................................................................................................................3
2.1 Main Thread ............................................................................................................................4
2.2 Control Thread ........................................................................................................................5
2.3 Speech Thread........................................................................................................................6
2.4 Video Thread...........................................................................................................................8
2.4.1 Display Thread.............................................................................................................9
2.4.2 Capture Thread............................................................................................................9
2.4.3 Writer Thread.............................................................................................................10
2.4.4 Video Thread Interaction ...........................................................................................11
3 Adapting the Application..............................................................................................................12
3.1 Speech Only..........................................................................................................................12
3.2 Video Only.............................................................................................................................13
3.3 Exit Cleanly Without Control Thread .....................................................................................13
3.4 Replacing the Encode Algorithms with Other Codecs...........................................................13
4 More Information...........................................................................................................................15
Figures
Figure 1.
Encode Demo Architecture.......................................................................................2
Figure 2. Encode Demo Threads..............................................................................................3
Figure 3. Main Thread Flow ......................................................................................................4
Figure 4. Speech Thread Initialization Flow............................................................................6
Figure 5. Speech Thread Main Loop Flow...............................................................................7
Figure 6. Video Thread Initialization Flow...............................................................................8
Figure 7. Video Thread Interactions.......................................................................................11