⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmdlmbs.h

📁 PNX1500上做视频缩放MBS的源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
    );

//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsSetPowerState:
//
// DESCRIPTION: set power state (on, standby, suspend, or off)
//              
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       None
//-----------------------------------------------------------------------------
//
tmErrorCode_t 
tmdlMbsSetPowerState (
    tmInstance_t            instance,   //  I: instance to stop
    tmPowerState_t          powerState  //  I: new power state
    );


//-----------------------------------------------------------------------------
//  GENERIC FUNCTIONS:
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsGetSWVersion:
//
// DESCRIPTION: This function returns the MBS device library software interface
//              version.  If subordinate software errors are detected, the
//              software version error will be propagated back to the caller.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       None
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsGetSWVersion (
    ptmSWVersion_t            pSWVersion   //  O: buffer receiving version
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsGetNumberOfUnits:
//
// DESCRIPTION: This function returns the number of MBS units in the system.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       None
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsGetNumberOfUnits (
    UInt32*                 pNrOfUnits      //  O: number of MBS HW units 
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsGetScaleFactor:
//
// DESCRIPTION: This function returns the scale factor used by the hardware to
//              perform scaling.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       filter must be tmdlMbsFilterDirect or tmdlMbsFilterTransposed.
//              tmdlMbsFilterTransposed is only supported for horizontal 
//              downscaling.
//
//              If dynamicZoom is False, the scale factor will be rounded to 
//              multiple of the number of phases. This function is not entirely//              correct for transposed filtering and should not be used for that.//              Use the internal function tmdlMbsGetScaleFactor2 for that.//
//              The returned scale factor is based on the input and output sizes
//              times a hardware factor of 0x10000 (representing 1:1), and is 
//              different for normal polyphase and transposed polyphase filters.
//
//              scaling             
//              (src:dst)        normal polyphase    transposed polyphase
//              =========================================================
//              2:1 (downscale)     0x20000               ~ 0x08000 **
//              1:1 (no scaling)    0x10000
//              1:2 (upscale)       0x08000                 not supported
//
//              ** varies with src and dst size
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsGetScaleFactor (
    UInt32              srcSize,            //   I: src size (width or height)
    UInt32              dstSize,            //   I: dst size
    tmdlMbsFilterType_t filter,             //   I: filter type
    tmdlMbsPhaseMode_t  phaseMode,          //   I: phase mode
    Bool                dynamicZoom,        //   I: True if dynamic zoom enabled
    pUInt32             pScaleFactor        //   O: receives scale factor
    );


//-----------------------------------------------------------------------------
//  TASK CONTROL FUNCTIONS:
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsCreateClutModule:
//
// DESCRIPTION: Creates a color look-up table (CLUT) module
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       The look up table entries are copied to local memory and can be
//              changed and/or destroyed after this call.
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsCreateClutModule (
    tmInstance_t            instance,      //  I: instance 
    ptmColor4_t             pColorTable,   //  I: ptr to CLUT
    UInt32                  nrOfEntries,   //  I: nr of table entries
    ptmdlMbsModuleHandle_t  pModuleHandle  //  O: returned module handle
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsDestroyClutModule:
//
// DESCRIPTION: Destroy color look up table module. 
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       None
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsDestroyClutModule (
    tmInstance_t            instance,       //  I: instance 
    tmdlMbsModuleHandle_t   moduleHandle    //  I: handle of module to destroy
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskCreate:
//
// DESCRIPTION: Creates a scaling task with the specified settings. The device
//              library uses the task descriptor to store all the information 
//              the dispatcher needs to schedule and execute the task. After
//              the task has been created the task descriptor can be modified
//              by applications without affecting the task. The function 
//              returns a task handle that is used for future operations on 
//              the task (dispatching, updating, destroying ...). 
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       Video measurements. de-interlacing, and EDDI are disabled after 
//              this call.  Use tmdlMbsTaskUpdateMeas to initialize video 
//              measurements.  Use tmdlMbsTaskUpdateDei to initialize 
//              de-interlacing. Use tmdlMbsTaskUpdateEddi or 
//              tmdlMbsTaskUpdateEddiLevel to initialize EDDI.
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskCreate (
    tmInstance_t             instance,        //  I: instance 
    ptmdlMbsTaskDescriptor_t pTaskDescriptor, //  I: ptr to task descriptor
    ptmdlMbsTaskHandle_t     pTaskHandle      //  O: ptr to recv task handle
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskDestroy:
//
// DESCRIPTION: Destroys a task and frees the allocated resources.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//                  TMDL_ERR_MBS_BUSY   task is still pending execution
//
// NOTES:       None
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskDestroy (
    tmInstance_t             instance,       //  I: instance 
    tmdlMbsTaskHandle_t      taskHandle      //  I: task handle
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskDispatch:
//
// DESCRIPTION: Schedule tasks for execution. If the buffer pointers
//              are not Null, the new buffer addresses will be set before 
//              dispatching the tasks.  Buffer overwrite can be used to reuse a 
//              scaling task if only the buffer address changes (which is a very 
//              typical case for video streaming applications).
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       DO NOT call tmdlMbsTaskDispatch to reuse a task with new
//              buffers until the task status has changed to 
//              tmdlMbsTaskCompleted.
//
//              If taskCount > 1, only one callback is made when the group of 
//              tasks is completed.  The returned taskHandle will be for the
//              first task in the pTaskDisp array.
//
//
//              If measurement information is required, it will only be provided
//              for a single task, or the last task in the task array.
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskDispatch ( 
    tmInstance_t            instance,       //  I: instance 
    UInt32                  taskCount,      //  I: number of tasks in array
    ptmdlMbsTaskDispatch_t  pTaskInfo       //  I: ptr to array of task info
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskUpdateHorzCoeffs:
//
// DESCRIPTION: Updates the user supplied horizontal scaling coefficients.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskUpdateHorzCoeffs (
    tmInstance_t            instance,       //  I: instance 
    tmdlMbsTaskHandle_t     taskHandle,     //  I: task handle
    pUInt32                 pCoefficients   //  I: pointer to coefficients
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskUpdateVertCoeffs:
//
// DESCRIPTION: Updates the user supplied vertical scaling coefficients.
//
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskUpdateVertCoeffs (
    tmInstance_t            instance,       //  I: instance 
    tmdlMbsTaskHandle_t     taskHandle,     //  I: task handle
    pUInt32                 pYcoefficients, //  I: pointer to Y coefficients
    pUInt32                 pUVcoefficients //  I: pointer to UVcoefficients
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskUpdateRects:
//
// DESCRIPTION: Updates the buffer rectangles and recalculates the offsets
//              into the buffers.  If a rectangle buffer is Null, no change
//              is made.
//                    
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       DO NOT call tmdlMbsTaskUpdateRects until the task status has 
//              changed to tmdlMbsTaskCompleted (or tmdlMbsTaskIdle).
//
//              pSliceRect is ignored if the task was not created with the 
//              tmdlMbsFlagSlicingEn task flag set.
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskUpdateRects ( 
    tmInstance_t            instance,       //  I: instance 
    tmdlMbsTaskHandle_t     taskHandle,     //  I: task handle
    ptmRect_t               pSrcRect,       //  I: new src rectangle
    ptmRect_t               pDstRect,       //  I: new dst rectangle
    ptmRect_t               pSliceRect      //  I: new slice rectangle
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskUpdateSrcPosition:
//
// DESCRIPTION: Updates the position of the source rectangle in the source
//              buffer.  Current scaling factors are not changed.
//                    
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       DO NOT call tmdlMbsTaskUpdateSrcPosition until the task status
//              has changed to tmdlMbsTaskCompleted (or tmdlMbsTaskIdle).
//-----------------------------------------------------------------------------
//
tmErrorCode_t
tmdlMbsTaskUpdateSrcPosition ( 
    tmInstance_t            instance,       //  I: instance 
    tmdlMbsTaskHandle_t     taskHandle,     //  I: task handle
    ptmXY_t                 pSrcStart       //  I: new src position
    );


//-----------------------------------------------------------------------------
// FUNCTION:    tmdlMbsTaskUpdateMeas:
//
// DESCRIPTION: Sets the measurement requirements/settings for the task.
//                    
// RETURN:      tmErrorCode_t = resulting error condition or TM_OK
//
// NOTES:       DO NOT call tmdlMbsTaskUpdateMeas until the task status
//              has changed to tmdlMbsTaskCompleted (or tmdlMbsTaskIdle).
//
//              If measFlags != tmdlVidMeasNone, the format control parameters
//              in pMeasSetup must be val

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -