SPRAA56
This call returns a status structure of type IH263ENC_Status that contains the number of bits sent to the encoder, the frame type, and other data.
The features implemented in the control API can vary widely from one algorithm to another. The bitrate and frame type measured by this API may not be available with all
3.4Controlling the Frame Rate
The final structural change made to the base example was the addition of a mechanism for controlling the processing frame rate of the application. This change required the introduction of some counters and a conditional statement to measure the number of frames skipped during the last 30. The conditional statement is shown here:
if(
// Tell the capture routine we're done
SCOM_putMsg(fromProctoInput,&(thrProcess.scomMsgRx)); continue;
}
The condition requires that the ratio of the target frame rate to the display frame rate be the same as the ratio of the number of frames currently shown to the number that should be shown at the set target frame rate. If the counters indicate that the ratio is exceeded, then the current captured frame will not be processed or displayed, prompting the display driver to
The capture frame rate and display frame rate are left unchanged at DISPLAYRATE, which is set to 30 frames for second in NTSC applications or 25 frames per second in PAL applications. Because the capture driver is using external memory bandwidth to copy unused frames from the video port FIFO to external buffers, it may be desirable or necessary to control the frame rate at the driver to eliminate this overhead. The frame rate control allows you to quickly evaluate the visual quality of an encoder and decoder when using a lower frame rate.
The frame rate target can be controlled at runtime from a GEL script. Code Composer Studio’s General Extension Language (GEL) provides a message for
The GEL file included with the modified application is h263rateControl.gel. It provides sliders and dialog boxes to control bitrate, frame rate, and other application parameters. Its control is implemented by manipulating flags and variables in a global structure visible to the tskVideoProcess and tskControl tasks. The control task passes bitrate and frame rate control messages to the processing task, while other manipulations are handled directly by tskVideoProcess.
The remaining changes to the application are not structural in nature. Instead, they consist of short API calls added for
10DSP/BIOS