SPRAA56
Figure 1 shows a simplified view of the sequential flow of capture, processing, and display tasks in the application.
Camera
TSK
tskInput
Device
Driver
TSK
tskVideoProcess
SCOM
TSK
tskOutput
Device Driver
Figure 1. Basic Data Flow of the Video Application
Before video data reaches the first stage, it must be converted to digital data, a process that is managed by the input device driver. Analog video input is converted by an
In Figure 1, TSK refers to a DSP/BIOS task, which is described in detail in the DSP/BIOS User's Guide and the DSP/BIOS API Reference. Tasks support blocking calls, which are used to synchronize the application and the video data stream. The main data flow then has three stages: capture, processing, and display. Each stage has its own task object.
•The example’s first stage is a task called tskInput, which runs the tskVideoInput function. The task receives digital video buffers from the device driver. It then converts the buffers to the 4:2:0 format from the 4:2:2 formatted data it receives from the driver.
•The next stage, the tskVideoProcess task, which runs the tskProcess function. The task includes algorithms that require input data in the 4:2:0 format. The tskInput task sends a message to the tskVideoProcess task with pointers to the newly formatted data buffers. The tskVideoProcess task then calls an
•The tskOutput task runs the tskVideoOutput function. It converts the data back to 4:2:2 format as required by the output driver and the NTSC encoder chip, and calls the driver with the data buffer for display. The output driver is also an eXpressDSP compliant device driver with the same API interface as the input driver.
Data is passed between the tasks using SCOM messaging objects to pass the pointers and synchronization semaphore required to ready the output task. The SCOM module is from Reference Framework 5, which is described in the next section.
4 | DSP/BIOS |