SPRAA56
These estimates are fairly accurate for the color conversion functions in the input and display tasks, but the estimates are less accurate for the encoder and decoder algorithms in the processing task. Ideally, the memory bus utilization should be available in the status structure or estimated on the data sheet of an algorithm. It is recommended that you request this information from
The estimates of the memory bus utilization of the algorithms and major functions in the system are defined in rtaVideodebug.h as:
#define EST_ENCODE_BUSUTIL_IN_FRAMES 2.5 #define EST_DECODE_BUSUTIL_IN_FRAMES 2.5 #define EST_CAP_BUSUTIL_IN_FRAMES 3.5 #define EST_DIS_BUSUTIL_IN_FRAMES 3.5
The number 2.5 * frame size (in pixels) was chosen for the encoder and decoder as an estimate of the bus utilization. Actual values may vary, so you can modify this estimate, or can replace it with an actual calculation if the algorithm can provide that data in its status structure.
The bus utilization benchmarks are reset by the benchmarking routines every 30 frames, and are logged to the STS object named sts+”task”+BusUtil for viewing in the DSP/BIOS Statistics View tool. This results in a bus utilization statistic in bytes per second.
4.8Bitrate and Frame Type
Bitrate is important in applications that do encoding or decoding. The bitrate of encoded video often varies greatly with different video content, increasing to high values during periods of high motion and image complexity, and decreasing to low values during relatively still video with less image complexity. Encoder applications must trade off bitrate for quality, so the capability to accurately measure and monitor bitrate is an important tool for video system designers.
This example provides a mechanism for
#ifdef RTA_INCLUDED
while( MBX_pend( &mbxProcess, &rxMsg, 0) ) // poll with zero timeout value, which // returns zero right away if no message is available
{
switch(rxMsg.cmd) { case BITRATECHANGED:
h263encParams.bitRate = rxMsg.arg2; // controlVideoProc.bitRateTarget from GEL
(void *)&h263encParams);
break;
case FRAMERATECHANGED:
frameRateTarget = rxMsg.arg2; // controlVideoProc.bitRateTarget from GEL h263encParams.frameRate = frameRateTarget;
(void *)&h263encParams);
break;
}
}// end polling of MBX #endif // #ifdef RTA_INCLUDED
DSP/BIOS | 17 |