SPRAA56
if(controlVideoProc.frameRateChanged) { txMsg.cmd = FRAMERATECHANGED; txMsg.arg1 = chanNum;
txMsg.arg2 = controlVideoProc.frameRateTarget; controlVideoProc.frameRateChanged = FALSE; MBX_post( &mbxProcess, &txMsg, 0 );
}
While implementing control via the host PC did not specifically require a separate task in the modified application, adding a discrete control task makes the application more scalable. For example, a user interface or communications link from another processor could send control commands to a
The priority of the control TSK is set to a lower level than that of the tskVideoProcess, tskInput, and tskOutput TSKs. This prevents the control task from adding latency or CPU overhead when responding to control commands. The control commands are only serviced at times when the three TSKs in the data stream are all in the blocked state and the processor would normally be running its background loop.
Figure 3 shows the task partitioning added to the application flow in Figure 2.
Device Driver
Buffer 3 frames
| YAfter420 |
| 414 KB |
Y uv |
|
422to |
|
420 | CbAfter420 |
| CrAfter420 |
| 207 KB |
scratch1 |
|
14 KB = 20 lines | |
tskInput |
| bitBuf |
| y |
|
|
| 414 KB |
| |
| 512 KB |
|
| |
|
|
|
| |
|
|
|
| Y uv |
H .263 |
| H .263 | Cr | 422to |
| 420 | |||
enc |
| dec | CbArrau | |
|
|
| ||
| Shared |
|
|
|
| Scratch |
| Cb |
|
6 KB | 92 KB | 1.5 KB | 207 KB |
|
| scratch2 | |||
Instance |
| Instance |
| |
memory |
| memory |
| 14 KB |
tskProcess | tskO utput | |||
tskControl |
|
|
|
Device
Driver
Buffer
3 frames
Figure 3. Task Partitioning in the Modified Application
3.3Querying the H.263 Encoder for Status
The third change made to the base application was the use of a
DSP/BIOS | 9 |