![]() |
![]() |
Typedefs | |
typedef struct Venc1_Object * | Venc1_Handle |
Handle through which to reference a Video Encode algorithm. | |
Functions | |
Venc1_Handle | Venc1_create (Engine_Handle hEngine, Char *codecName, VIDENC1_Params *params, VIDENC1_DynamicParams *dynParams) |
Creates a Video Encode (XDM 0.9) algorithm instance. | |
Int | Venc1_process (Venc1_Handle hVe, Buffer_Handle hInBuf, Buffer_Handle hOutBuf) |
Encodes a video buffer. | |
Int | Venc1_delete (Venc1_Handle hVe) |
Deletes a Video Encode algorithm instance. | |
Int32 | Venc1_getInBufSize (Venc1_Handle hVe) |
After a Venc1_create call is made, this function can be called to figure out the total size of the required input buffer. | |
Int32 | Venc1_getOutBufSize (Venc1_Handle hVe) |
After a Venc1_create call is made, this function can be called to figure out the min total size of the required output buffers. | |
VIDENC1_Handle | Venc1_getVisaHandle (Venc1_Handle hVe) |
Get the VIDENC1 handle from the Venc module instance. | |
IVIDEO1_BufDesc * | Venc1_getReconBufs (Venc1_Handle hVe) |
Get the reconstructed frame buffers created during the call to Venc1_process. | |
Buffer_Handle | Venc1_getFreeBuf (Venc1_Handle hVe) |
After a Venc1_process call is made, this function should be called to obtain the freed raw buffers. | |
Void | Venc1_setBufTab (Venc1_Handle hVe, BufTab_Handle hBufTab) |
After a Venc1_create call is made, this function should be called to hand a BufTab_Handle to the video encoder instance. Because of B-frames, the input buffer given may not be the same as the input buffer returned, so the Venc1 class needs a full array of input buffers to work with. | |
BufTab_Handle | Venc1_getBufTab (Venc1_Handle hVe) |
Get the BufTab previously set using Venc1_setBufTab. | |
Int | Venc1_flush (Venc1_Handle hVe) |
Flushes the codec. Call Venc1_process after this call. | |
Variables | |
const VIDENC1_Params | Venc1_Params_DEFAULT |
Default XDM parameters for a Video Encode algorithm. | |
const VIDENC1_DynamicParams | Venc1_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Video Encode algorithm. |
typedef struct Venc1_Object* Venc1_Handle |
Handle through which to reference a Video Encode algorithm.
Venc1_Handle Venc1_create | ( | Engine_Handle | hEngine, | |
Char * | codecName, | |||
VIDENC1_Params * | params, | |||
VIDENC1_DynamicParams * | dynParams | |||
) |
Creates a Video Encode (XDM 0.9) algorithm instance.
[in] | hEngine | An opened engine containing the algorithm to create. |
[in] | codecName | The name of the algorithm to open. Corresponds to the string name given in the .cfg file. |
[in] | params | XDM parameters to use while creating the codec. |
[in] | dynParams | XDM dynamic parameters to use while creating the codec. |
Handle | for use in subsequent operations (see Venc1_Handle). | |
NULL | for failure. |
Int Venc1_process | ( | Venc1_Handle | hVe, | |
Buffer_Handle | hInBuf, | |||
Buffer_Handle | hOutBuf | |||
) |
Encodes a video buffer.
[in] | hVe | The Venc1_Handle to use for encoding. |
[in] | hInBuf | The Buffer_Handle for the buffer containing the raw data. |
[in] | hOutBuf | The Buffer_Handle for the buffer to fill with encoded data. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
The lineLength setting in the input buffer will be passed as the framePitch in the IVIDEO1_BufDescIn parameter to VIDENC1_process. However, not the codecs may not recognize or use this framePitch setting. See IVIDENC1_DynamicParams::captureWidth for setting the frame pitch, and refer to your encoder user's guide for more information on area encode operations.
Int Venc1_delete | ( | Venc1_Handle | hVe | ) |
Deletes a Video Encode algorithm instance.
[in] | hVe | The Venc1_Handle to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int32 Venc1_getInBufSize | ( | Venc1_Handle | hVe | ) |
After a Venc1_create call is made, this function can be called to figure out the total size of the required input buffer.
[in] | hVe | The Venc1_Handle to get the size for. |
Size | in bytes of the input buffer. |
Int32 Venc1_getOutBufSize | ( | Venc1_Handle | hVe | ) |
After a Venc1_create call is made, this function can be called to figure out the min total size of the required output buffers.
[in] | hVe | The Venc1_Handle to get the size for. |
Bytes | in total for all output planes. |
VIDENC1_Handle Venc1_getVisaHandle | ( | Venc1_Handle | hVe | ) |
Get the VIDENC1 handle from the Venc module instance.
[in] | hVe | The Venc1_Handle for which to get the VIDENC1 handle. |
Handle | to the audio decode algorithm, see the XDM documentation for VIDENC1. |
IVIDEO1_BufDesc* Venc1_getReconBufs | ( | Venc1_Handle | hVe | ) |
Get the reconstructed frame buffers created during the call to Venc1_process.
[in] | hVe | The Venc1_Handle for which to get the VIDENC1 handle. |
Pointer | to the IVIDEO1_BufDesc object that contains information about reconstructed frames. This is equivalent to the outArgs.reconBufs member created during VIDENC1_process. |
Buffer_Handle Venc1_getFreeBuf | ( | Venc1_Handle | hVe | ) |
After a Venc1_process call is made, this function should be called to obtain the freed raw buffers.
[in] | hVe | The Venc1_Handle to obtain display buffers from. |
Handle | to a free Buffer (see Buffer_Handle). | |
NULL | if no more Buffers are available. |
Venc1_process must be called before this function.
Void Venc1_setBufTab | ( | Venc1_Handle | hVe, | |
BufTab_Handle | hBufTab | |||
) |
After a Venc1_create call is made, this function should be called to hand a BufTab_Handle to the video encoder instance. Because of B-frames, the input buffer given may not be the same as the input buffer returned, so the Venc1 class needs a full array of input buffers to work with.
[in] | hVe | The Venc1_Handle to set the BufTab for. |
[in] | hBufTab | The BufTab_Handle to give to the video encoder. |
BufTab_Handle Venc1_getBufTab | ( | Venc1_Handle | hVe | ) |
Get the BufTab previously set using Venc1_setBufTab.
[in] | hVe | The Venc1_Handle for which to get the BufTab. |
Handle | to the BufTab managing the codec buffers (see BufTab_Handle). |
Venc1_setBufTab must be called before this function.
Int Venc1_flush | ( | Venc1_Handle | hVe | ) |
Flushes the codec. Call Venc1_process after this call.
[in] | hVe | The Venc1_Handle to the encoder to flush. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
const VIDENC1_Params Venc1_Params_DEFAULT |
Default XDM parameters for a Video Encode algorithm.
size = sizeof(VIDENC1_Params),
encodingPreset = XDM_DEFAULT,
rateControlPreset = IVIDEO_LOW_DELAY,
maxHeight = 720,
maxWidth = 1280,
maxFrameRate = 30000,
maxBitRate = 6000000,
dataEndianness = XDM_BYTE,
maxInterFrameInterval = 0,
inputChromaFormat = XDM_YUV_420P,
inputContentType = IVIDEO_PROGRESSIVE,
reconChromaFormat = XDM_CHROMA_NA
const VIDENC1_DynamicParams Venc1_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Video Encode algorithm.
size = sizeof(IVIDENC1_DynamicParams),
inputHeight = 720,
inputWidth = 1280,
refFrameRate = 30000,
targetFrameRate = 30000,
targetBitRate = 6000000,
intraFrameInterval = 30,
generateHeader = XDM_DECODE_AU,
captureWidth = 0,
forceFrame = IVIDEO_NA_FRAME,
interFrameInterval = 1,
mbDataFlag = 0