![background image](http://html.mh-extra.com/html/texas-instruments/dsp-bios-real-time-analysis/dsp-bios-real-time-analysis_user-manual_1097127008.webp)
SPRAA56
8
DSP/BIOS Real-Time Analysis (RTA) and Debugging Applied to a Video Application
Device
Driver
Buffer
3 frames
Device
Driver
Buffer
3 frames
Device
Driver
Buffer
3 frames
YAfter420
414 KB
C rAfter420
Y uv
422to
420
C bAfter420
Y uv
422to
420
207 KB
y
414 KB
C b
C bArrau
207 KB
C r
bitBuf
512 KB
720x576
92 KB
6 KB
1.5 KB
scratch2
14 KB
scratch1
14 KB = 20 lines
Shared
Scratch
Instance
m em ory
Instance
m em ory
H .263
dec
H .263
enc
Internal Memory
External Memory
DSP CPU Function
CPU Read/W rite
DMA Read/W rite (background)
K ey
Internal Memory
External Memory
DSP CPU Function
CPU Read/W rite
DMA Read/W rite (background)
K ey
Figure 2. Detailed Application Data Flow Showing Memory Buffers
Note:
The dotted lines in Figure 2 indicate EDMA moves, and the solid lines indicate CPU
reads/writes. The application performs only CPU reads/writes from mapped internal memory,
relying on the EDMA to copy working data into internal scratch buffers.
3.1 Splitting the Encode and Decode CELLs
In the base example, the H.263 encoder and decoder are wrapped in sequential CELLs in a
single channel. This is suitable for an example application, but in actual video systems the input
to the decoder would be an encoded bitstream from an external source, and the output from the
encoder would be sent to an external source such as a network stream or a hard disk drive.
Splitting the encoder and decoder into separate channels better supports external sourcing or
transport of the encoded bitstream. Additionally, splitting the encoder and decoder allows them
to be benchmarked separately for execution time.
A separate CHAN was created and initialized for the H.263 encoder and the H.263 decoder. At
run-time, a separate CHAN_execute command can be executed for each channel.
3.2 Adding the Control TSK and MBX Communication
The second change to the base example was the addition of a control TSK to send control
commands to the process TSK using the MBX module from DSP/BIOS. A MBX object,
mbxProcess, was added in the DSP/BIOS text-based configuration file appThread.tci. That MBX
object transmits control commands to the tskVideoProcess TSK to change run-time parameters
such as the video frame rate and the encoder bitrate.