Venc

Provides a simple interface to VIDENC (XDM 0.9) based algorithms. For typical usage see the video_encode_io app. More...

Typedefs

typedef struct Venc_Object * Venc_Handle
 Handle through which to reference a Video Encode algorithm.

Functions

Venc_Handle Venc_create (Engine_Handle hEngine, Char *codecName, VIDENC_Params *params, VIDENC_DynamicParams *dynParams)
 Creates a Video Encode (XDM 0.9) algorithm instance.
Int Venc_process (Venc_Handle hVe, Buffer_Handle hInBuf, Buffer_Handle hOutBuf)
 Encodes a video buffer.
Int Venc_delete (Venc_Handle hVe)
 Deletes a Video Encode algorithm instance.
Int32 Venc_getInBufSize (Venc_Handle hVe)
 After a Venc_create call is made, this function can be called to figure out the min total size of the required input buffers.
Int32 Venc_getOutBufSize (Venc_Handle hVe)
 After a Venc_create call is made, this function can be called to figure out the min total size of the required output buffers.
VIDENC_Handle Venc_getVisaHandle (Venc_Handle hVe)
 Get the VIDENC handle from the Venc module instance.

Variables

const VIDENC_Params Venc_Params_DEFAULT
 Default XDM parameters for a Video Encode algorithm.
const VIDENC_DynamicParams Venc_DynamicParams_DEFAULT
 Default XDM dynamic parameters for a Video Encode algorithm.

Detailed Description

Provides a simple interface to VIDENC (XDM 0.9) based algorithms. For typical usage see the video_encode_io app.


Typedef Documentation

typedef struct Venc_Object* Venc_Handle

Handle through which to reference a Video Encode algorithm.


Function Documentation

Venc_Handle Venc_create ( Engine_Handle  hEngine,
Char *  codecName,
VIDENC_Params *  params,
VIDENC_DynamicParams *  dynParams 
)

Creates a Video Encode (XDM 0.9) algorithm instance.

Parameters:
[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.
Return values:
Handle for use in subsequent operations (see Venc_Handle).
NULL for failure.

Int Venc_process ( Venc_Handle  hVe,
Buffer_Handle  hInBuf,
Buffer_Handle  hOutBuf 
)

Encodes a video buffer.

Parameters:
[in] hVe The Venc_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.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Venc_create must be called before this function.

Due to the design of IVIDENC the lineLength setting in the input buffer will be ignored. The frame pitch has to be set using IVIDENC_DynamicParams::captureWidth instead.

Int Venc_delete ( Venc_Handle  hVe  ) 

Deletes a Video Encode algorithm instance.

Parameters:
[in] hVe The Venc_Handle to delete.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Venc_create must be called before this function.

Int32 Venc_getInBufSize ( Venc_Handle  hVe  ) 

After a Venc_create call is made, this function can be called to figure out the min total size of the required input buffers.

Parameters:
[in] hVe The Venc_Handle to get the size for.
Return values:
Bytes in total for all input planes.
Remarks:
Venc_create must be called before this function.

Int32 Venc_getOutBufSize ( Venc_Handle  hVe  ) 

After a Venc_create call is made, this function can be called to figure out the min total size of the required output buffers.

Parameters:
[in] hVe The Venc_Handle to get the size for.
Return values:
Bytes in total for all output planes.
Remarks:
Venc_create must be called before this function.

VIDENC_Handle Venc_getVisaHandle ( Venc_Handle  hVe  ) 

Get the VIDENC handle from the Venc module instance.

Parameters:
[in] hVe The Venc_Handle for which to get the VIDENC handle.
Return values:
Handle to the audio decode algorithm, see the XDM documentation for VIDENC.
Remarks:
Venc_create must be called before this function.


Variable Documentation

const VIDENC_Params Venc_Params_DEFAULT

Default XDM parameters for a Video Encode algorithm.

     size                     = sizeof(VIDENC_Params),
     encodingPreset           = XDM_DEFAULT,
     rateControlPreset        = IVIDEO_NONE,
     maxHeight                = 576,
     maxWidth                 = 720,
     maxFrameRate             = 30000,
     maxBitRate               = 0,
     dataEndianness           = XDM_BYTE,
     maxInterFrameInterval    = 0,
     inputChromaFormat        = XDM_YUV_422ILE,
     inputContentType         = IVIDEO_PROGRESSIVE

const VIDENC_DynamicParams Venc_DynamicParams_DEFAULT

Default XDM dynamic parameters for a Video Encode algorithm.

     size                     = sizeof(VIDENC_DynamicParams),
     inputHeight              = 576,
     inputWidth               = 720,
     refFrameRate             = 30000,
     targetFrameRate          = 30000,
     targetBitRate            = 0,
     intraFrameInterval       = 30,
     generateHeader           = XDM_ENCODE_AU,
     captureWidth             = 0,
     forceIFrame              = 0


Copyright 2011, Texas Instruments Incorporated