![]() |
![]() |
Typedefs | |
typedef struct Vdec2_Object * | Vdec2_Handle |
Handle through which to reference a Video Decode algorithm. | |
Functions | |
Vdec2_Handle | Vdec2_create (Engine_Handle hEngine, Char *codecName, VIDDEC2_Params *params, VIDDEC2_DynamicParams *dynParams) |
Creates a Video Decode (XDM 1.2) algorithm instance. | |
Int | Vdec2_flush (Vdec2_Handle hVd) |
Flushes the codec. Call Vdec2_process (hInBuf is ignored) after this call and then Vdec2_getDisplayBuf to obtain display buffers display, and Vdec2_getFreeBuf to obtain buffers to free. | |
Int | Vdec2_process (Vdec2_Handle hVd, Buffer_Handle hInBuf, Buffer_Handle hDstBuf) |
Decodes a video buffer. Call Vdec2_getDisplayBuf after this call to obtain buffers to display, and Vdec2_getFreeBuf to obtain buffers to free. | |
Int | Vdec2_delete (Vdec2_Handle hVd) |
Deletes a Video Decode algorithm instance. | |
Int32 | Vdec2_getMinOutBufs (Vdec2_Handle hVd) |
Figures out the actual output buffer requirements of the codec after the first Vdec2_process call. Also updates the buffer requirements for subsequent Vdec2_getInBufSize and Vdec2_getOutBufSize calls. | |
Void | Vdec2_setBufTab (Vdec2_Handle hVd, BufTab_Handle hBufTab) |
After a Vdec2_create call is made, this function should be called to hand a BufTab_Handle to the video decoder instance. Because of B-frames, the destination buffer given may not be the same as the output buffer returned, so the Vdec2 class needs a full array of buffers to work with. | |
BufTab_Handle | Vdec2_getBufTab (Vdec2_Handle hVd) |
Get the BufTab previously set using Vdec2_setBufTab. | |
VIDDEC2_Handle | Vdec2_getVisaHandle (Vdec2_Handle hVd) |
Get the VIDDEC2 handle from the Vdec2 module instance. | |
Int32 | Vdec2_getInBufSize (Vdec2_Handle hVd) |
Get the input buffer size required by the codec. | |
Int32 | Vdec2_getOutBufSize (Vdec2_Handle hVd) |
Get the output buffer size required by the codec. | |
Buffer_Handle | Vdec2_getDisplayBuf (Vdec2_Handle hVd) |
After a Vdec2_process call is made, this function should be called to obtain buffers to display. This function should be called consecutively until no more buffers are returned. | |
Buffer_Handle | Vdec2_getFreeBuf (Vdec2_Handle hVd) |
After a Vdec2_process call is made, this function should be called to obtain buffers to free. This function should be called consecutively until no more buffers are returned. | |
Variables | |
const VIDDEC2_Params | Vdec2_Params_DEFAULT |
Default XDM parameters for a Video Decode (XDM 1.2) algorithm. | |
const VIDDEC2_DynamicParams | Vdec2_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Video Decode (XDM 1.2) algorithm. |
typedef struct Vdec2_Object* Vdec2_Handle |
Handle through which to reference a Video Decode algorithm.
Vdec2_Handle Vdec2_create | ( | Engine_Handle | hEngine, | |
Char * | codecName, | |||
VIDDEC2_Params * | params, | |||
VIDDEC2_DynamicParams * | dynParams | |||
) |
Creates a Video Decode (XDM 1.2) 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 Vdec2_Handle). | |
NULL | for failure. |
Int Vdec2_flush | ( | Vdec2_Handle | hVd | ) |
Flushes the codec. Call Vdec2_process (hInBuf is ignored) after this call and then Vdec2_getDisplayBuf to obtain display buffers display, and Vdec2_getFreeBuf to obtain buffers to free.
[in] | hVd | The Vdec2_Handle to of the decoder to flush. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Vdec2_process | ( | Vdec2_Handle | hVd, | |
Buffer_Handle | hInBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Decodes a video buffer. Call Vdec2_getDisplayBuf after this call to obtain buffers to display, and Vdec2_getFreeBuf to obtain buffers to free.
[in] | hVd | The Vdec2_Handle to use for decoding. |
[in] | hInBuf | The Buffer_Handle of the buffer containing the encoded data. |
[in] | hDstBuf | The Buffer_Handle of the buffer passed to the decoder to be filled with data. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Vdec2_setBufTab must be called before this function.
Due to the design of IVIDDEC2 the lineLength setting in the destination buffer will be ignored. The frame pitch has to be set using IVIDDEC2_DynamicParams::displayWidth instead.
Int Vdec2_delete | ( | Vdec2_Handle | hVd | ) |
Deletes a Video Decode algorithm instance.
[in] | hVd | The Vdec2_Handle to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int32 Vdec2_getMinOutBufs | ( | Vdec2_Handle | hVd | ) |
Figures out the actual output buffer requirements of the codec after the first Vdec2_process call. Also updates the buffer requirements for subsequent Vdec2_getInBufSize and Vdec2_getOutBufSize calls.
[in] | hVd | The Vdec2_Handle to use for decoding. |
Number | of required output buffers on success. | |
Negative value | for failure, see Dmai.h. |
Vdec2_process must be called before this function.
Void Vdec2_setBufTab | ( | Vdec2_Handle | hVd, | |
BufTab_Handle | hBufTab | |||
) |
After a Vdec2_create call is made, this function should be called to hand a BufTab_Handle to the video decoder instance. Because of B-frames, the destination buffer given may not be the same as the output buffer returned, so the Vdec2 class needs a full array of buffers to work with.
[in] | hVd | The Vdec2_Handle to set the BufTab for. |
[in] | hBufTab | The BufTab_Handle to give to the video decoder. |
BufTab_Handle Vdec2_getBufTab | ( | Vdec2_Handle | hVd | ) |
Get the BufTab previously set using Vdec2_setBufTab.
[in] | hVd | The Vdec2_Handle for which to get the BufTab. |
Handle | to the BufTab managing the codec buffers (see BufTab_Handle). |
Vdec2_setBufTab must be called before this function.
VIDDEC2_Handle Vdec2_getVisaHandle | ( | Vdec2_Handle | hVd | ) |
Get the VIDDEC2 handle from the Vdec2 module instance.
[in] | hVd | The Vdec2_Handle for which to get the VIDDEC2 handle. |
Handle | to the audio decode algorithm, see the XDM documentation for VIDDEC2. |
Int32 Vdec2_getInBufSize | ( | Vdec2_Handle | hVd | ) |
Get the input buffer size required by the codec.
[in] | hVd | The Vdec2_Handle for which to get the buffer size. |
Size | in bytes of the input buffer required. |
Int32 Vdec2_getOutBufSize | ( | Vdec2_Handle | hVd | ) |
Get the output buffer size required by the codec.
[in] | hVd | The Vdec2_Handle for which to get the buffer size. |
Size | in bytes of the output buffer required. |
Buffer_Handle Vdec2_getDisplayBuf | ( | Vdec2_Handle | hVd | ) |
After a Vdec2_process call is made, this function should be called to obtain buffers to display. This function should be called consecutively until no more buffers are returned.
[in] | hVd | The Vdec2_Handle to obtain display buffers from. |
Handle | to a Buffer to display (see Buffer_Handle). | |
NULL | if no more Buffers are available. |
Vdec2_process must be called before this function.
Buffer_Handle Vdec2_getFreeBuf | ( | Vdec2_Handle | hVd | ) |
After a Vdec2_process call is made, this function should be called to obtain buffers to free. This function should be called consecutively until no more buffers are returned.
[in] | hVd | The Vdec2_Handle to obtain free buffers from. |
Handle | to a Buffer to free (see Buffer_Handle). | |
NULL | if no more Buffers are available. |
Vdec2_process must be called before this function.
const VIDDEC2_Params Vdec2_Params_DEFAULT |
Default XDM parameters for a Video Decode (XDM 1.2) algorithm.
size = sizeof(VIDDEC2_Params),
maxHeight = 576,
maxWidth = 720,
maxFrameRate = 30000,
maxBitRate = 6000000,
dataEndianness = XDM_BYTE,
forceChromaFormat = XDM_YUV_420P
const VIDDEC2_DynamicParams Vdec2_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Video Decode (XDM 1.2) algorithm.
size = sizeof(VIDDEC2_DynamicParams),
decodeHeader = XDM_DECODE_AU,
displayWidth = 0,
frameSkipMode = IVIDEO_NO_SKIP,
frameOrder = IVIDDEC2_DISPLAY_ORDER,
newFrameFlag = 0,
mbDataFlag = 0