Codec Engine Application Programming Interface (API)  ce-w08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
IVIDDEC2_Fxns Struct Reference

Defines all of the operations on IVIDDEC2 objects. More...

#include <ividdec2.h>

Collaboration diagram for IVIDDEC2_Fxns:
Collaboration graph

Data Fields

IALG_Fxns ialg
XDAS_Int32(* process )(IVIDDEC2_Handle handle, XDM1_BufDesc *inBufs, XDM_BufDesc *outBufs, IVIDDEC2_InArgs *inArgs, IVIDDEC2_OutArgs *outArgs)
 Basic video decoding call.
XDAS_Int32(* control )(IVIDDEC2_Handle handle, IVIDDEC2_Cmd id, IVIDDEC2_DynamicParams *params, IVIDDEC2_Status *status)
 Control behavior of an algorithm.

Detailed Description

Defines all of the operations on IVIDDEC2 objects.


Field Documentation

IALG_Fxns IVIDDEC2_Fxns::ialg

XDAIS algorithm interface.

                                  @sa IALG_Fxns
XDAS_Int32(* IVIDDEC2_Fxns::process)(IVIDDEC2_Handle handle, XDM1_BufDesc *inBufs, XDM_BufDesc *outBufs, IVIDDEC2_InArgs *inArgs, IVIDDEC2_OutArgs *outArgs)

Basic video decoding call.

@param[in]  handle          Handle to an algorithm instance.
@param[in,out] inBufs       Input buffer descriptors.
@param[in,out] outBufs      Output buffer descriptors.  The algorithm
                            may modify the output buffer pointers.
@param[in]  inArgs          Input arguments.  This is a required
                            parameter.
@param[out] outArgs         Ouput results.  This is a required parameter.

@remarks    process() is a blocking call.  When process() returns, the
            algorithm's processing is complete.

@remarks    process() enables codecs to support error resiliency and
            error concealment.  As a result, even if #IVIDDEC2_EFAIL
            is returned from process() because the encoded buffer has
            an error, it's possible that decoded buffers
            (@c outArgs->decodedBufs) and display buffers
            (@c outArgs->displayBufs) could still be returned.
            The codec can indicate that buffers are available by
            <i>not</i> setting the #XDM_ISFATALERROR bit
            in the respective @c displayBufs and @c decodedBufs
            @c extendedError field if the buffers contain valid data.

@remarks    By extension then, if the @c outArgs->decodedBufs and
            @c outArgs->displayBufs buffers are <i>not</i> valid, even
            if the codec's process() call returns IVIDDEC2_EFAIL, it must
            also be sure to set the #XDM_ISFATALERROR bit in the
            respective @c extendedError fields.  Failure to do so may
            result in applications accessing these buffers and causing
            system instability.

@pre        @c inBufs->numBufs will indicate the total number of input
            buffers supplied for input frame, and conditionally, the
            encoders MB data buffer.

@pre        If IVIDDEC2_DynamicParams::mbDataFlag was set to #XDAS_FALSE
            in a previous control() call, the application only needs to
            provide buffers for reconstruction frames.

@pre        If IVIDDEC2_DynamicParams::mbDataFlag was set to #XDAS_TRUE
            in a previous control() call,
            @c outBufs->bufs[outBufs->numBufs - 1] is a buffer descriptor
            into which the algorithm will write MB data for each macro
            block.  The size of the MB data buffer will vary based on the
            decoder type.  H.264 may generate N264 bytes per MB, while
            Mpeg2 may generate NMP2 bytes.  The exact size of the buffers
            should be obtained by calling the algorithm's control() method
            with XDM_GETBUFINFO.

@pre        @c inArgs must not be NULL, and must point to a valid
            IVIDDEC2_InArgs structure.

@pre        @c outArgs must not be NULL, and must point to a valid
            IVIDDEC2_OutArgs structure.

@pre        @c inBufs must not be NULL, and must point to a valid
            XDM1_BufDesc structure.

@pre        @c inBufs->descs[0].buf must not be NULL, and must point to
            a valid buffer of data that is at least
            @c inBufs->descs[0].bufSize bytes in length.

@pre        @c outBufs must not be NULL, and must point to a valid
            XDM_BufDesc structure.

@pre        @c outBufs->buf[0] must not be NULL, and must point to
            a valid buffer of data that is at least
            @c outBufs->bufSizes[0] bytes in length.

@pre        The buffers in @c inBufs and @c outBufs are physically
            contiguous and owned by the calling application.

@post       The algorithm <b>must not</b> modify the contents of @c inArgs.

@post       The algorithm <b>must not</b> modify the contents of
            @c inBufs, with the exception of @c inBufs.bufDesc[].accessMask.
            That is, the data and buffers pointed to by these parameters
            must be treated as read-only.

@post       The algorithm <b>must</b> modify the contents of
            @c inBufs->descs[].accessMask and appropriately indicate the
            mode in which each of the buffers in @c inBufs were read.
            For example, if the algorithm only read from
            @c inBufs.descs[0].buf using the algorithm processor, it
            could utilize #XDM_SETACCESSMODE_READ to update the appropriate
            @c accessMask fields.
            The application <i>may</i> utilize these
            returned values to appropriately manage cache.

@post       The buffers in @c inBufs are
            owned by the calling application.

@retval     IVIDDEC2_EOK            \copybrief IVIDDEC2_EOK

Success.

Return values:
IVIDDEC2_EFAILGeneral failure. See IVIDDEC2_Status::extendedError for more detailed further error conditions.
IVIDDEC2_EUNSUPPORTEDRequest is unsupported.
XDAS_Int32(* IVIDDEC2_Fxns::control)(IVIDDEC2_Handle handle, IVIDDEC2_Cmd id, IVIDDEC2_DynamicParams *params, IVIDDEC2_Status *status)

Control behavior of an algorithm.

@param[in]  handle          Handle to an algorithm instance.
@param[in]  id              Command id.  See #XDM_CmdId.
@param[in]  params          Dynamic parameters.  This is a required
                            parameter.
@param[out] status          Output results.  This is a required parameter.

@pre        @c handle must be a valid algorithm instance handle.

@pre        @c params must not be NULL, and must point to a valid
            IVIDDEC2_DynamicParams structure.

@pre        @c status must not be NULL, and must point to a valid
            IVIDDEC2_Status structure.

@pre        If a buffer is provided in the @c status->data field,
            it must be physically contiguous and owned by the calling
            application.

@post       The algorithm <b>must not</b> modify the contents of @c params.
            That is, the data pointed to by this parameter must be
            treated as read-only.

@post       If a buffer was provided in the @c status->data field,
            it is owned by the calling application.

@retval     IVIDDEC2_EOK            \copybrief IVIDDEC2_EOK

Success.

Return values:
IVIDDEC2_EFAILGeneral failure. See IVIDDEC2_Status::extendedError for more detailed further error conditions.
IVIDDEC2_EUNSUPPORTEDRequest is unsupported.

The documentation for this struct was generated from the following file:
Copyright 2013, Texas Instruments Incorporated