![Texas Instruments DM365 Скачать руководство пользователя страница 45](http://html.mh-extra.com/html/texas-instruments/dm365/dm365_user-manual_1094517045.webp)
Sample Usage
3-11
3.4 Sample Test Application
The test application exercises the
IVIDENC1
base class of the H.264
Encoder.
Table 3-1. process () Implementation
/* Main Function acting as a client for Video encode Call*/
/* Acquiring and intializing the resources needed to run the
encoder */
iresStatus = (IRES_Status) RMAN_init();
iresStatus = (IRES_Status) RMAN_register(&IRESMAN_EDMA3CHAN,
(IRESMAN_Params *)&configParams);
/*---------------- Encoder creation -----------------*/
handle = H264VENC_create(&fxns, ¶ms)
/*Getting instance of algorithms that implements IALG and
IRES functions*/
iErrorFlag = RMAN_assignResources((IALG_Handle)handle,
&H264VENC_TI_IRES, /* IRES_Fxns* */
1 /* scratchId */);
/* Get Buffer information */
iErrorFlag = H264VENC_control(
handle, // Instance Handle
XDM_GETSTATUS, // Command
&dynamicparams, // Pointer to Dynamicparam structure
&status // Pointer to the status structure
);
/*SET BASIC INPUT PARAMETERS */
iErrorFlag = H264VENC_control(
handle, // Instance Handle
XDM_GETSTATUS, // Command
&dynamicparams, // Pointer to Dynamicparam structure
&status // Pointer to the status structure
);
/* Based on the Num of buffers requested by the algorithm,
the application will allocate for the same here
*/
AllocateH264IOBuffers(
status, // status structure
&inobj, // Pointer to Input Buffer Descriptor
&outobj) // Pointer to Output Buffer Descriptor
);
/*Set Dynamic input parameters */
iErrorFlag = H264VENC_control(
handle, // Instance Handle
XDM_GETSTATUS, // Command
&dynamicparams, // Pointer to Dynamicparam structure
&status // Pointer to the status structure
);
/* for Loop for encode Call for a given no of frames */
For(;;)
/* Read the input frame in the Application Input Buffer */
ReadInputData (inFile);
/*----------------------------------------------------*/
/* Start the process : To start Encoding a frame */
/* This will always follow a H264VENC_encode_end call */
Содержание DM365
Страница 10: ...x This page is intentionally left blank ...
Страница 12: ...xii This page is intentionally left blank ...
Страница 24: ...Introduction 1 12 This page is intentionally left blank ...
Страница 34: ...Installation Overview 2 10 This page is intentionally left blank ...
Страница 116: ...API Reference 4 70 This page is intentionally left blank ...
Страница 120: ...Error Description B 2 This page is intentionally left blank ...
Страница 124: ...ARM926 TCM Buffer Usage By Codec D 2 This page is intentionally left blank ...
Страница 126: ...Simple Two pass Encoding Sample Usage E 2 Case 1 Case 2 Case 3 Case 4 Frame Skip ...
Страница 130: ...Simple Two pass Encoding Sample Usage E 6 This page is intentionally left blank ...