📄 tmdlmbs2_support.h
字号:
//-----------------------------------------------------------------------------
// (C) Copyright 2003 Philips Semiconductors, All rights reserved
//
// This source code and any compilation or derivative thereof is the sole
// property of Philips Corporation and is provided pursuant to a Software
// License Agreement. This code is the proprietary information of Philips
// Corporation and is confidential in nature. Its use and dissemination by
// any party other than Philips Corporation is strictly limited by the
// confidential information provisions of the Agreement referenced above.
//-----------------------------------------------------------------------------
// FILE NAME: tmdlMbs2_Support.h
//
// DESCRIPTION: This header file contains the protypes for the support
// functions found in tmdlMbs2_Support.c.
//
//
// DOCUMENT REF:
//
// NOTES:
//-----------------------------------------------------------------------------
#ifndef TMDL_MBS2_SUPPORT_H
#define TMDL_MBS2_SUPPORT_H
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C"
{
#endif
//-----------------------------------------------------------------------------
// Globals:
//-----------------------------------------------------------------------------
//
extern tmdlMbsCapabilities_t gMbsCaps [];
extern UInt32 gMbsFeatures [];
// eh04#468extern tmInstance_t gMbsUnitClock [];extern tmdlMbs2_clockFreq_t gMbsInitialClockFreq[];// eh04#468 END
extern tmdlMbs2_clockFreq_t mbsClockFreq [];
// -------------------------------------------------------------------------
// Prototypes for Internal Functions:
// -------------------------------------------------------------------------
void
MbsAppendTask (
ptmdlMbsTaskInfo_t pTask1, // I: ptr to Task1
ptmdlMbsTaskInfo_t pTask2 // I: ptr to Task2
);
void
MbsSliceTask (
ptmdlMbsInstance_t pMbsInst, // I: mbs instance
UInt32 taskIndex, // I:
UInt32 *pNrOfSlices // O:
);
UInt32
MbsCalcSliceDtoOffset (
UInt32 dst,
UInt32 dtoOffset,
UInt32 zoom,
UInt32 nrOfTaps,
Bool bTransposedPolyphase
);
UInt32
MbsCalcSliceDtoOffsetVert (
UInt32 dst,
UInt32 dtoOffset,
UInt32 zoom,
UInt32 nrOfTaps,
tmdlMbsPhaseCorrType_t phaseCorrReqd,
Bool bTransposedPolyphase
);
Int32
MbsCalcSliceSrc (
Int32 dst, // destination slice x value
UInt32 dtoOffset, // initial dstOffset value
UInt32 zoom, // zoom register value
UInt32 nrOfTaps, // # of taps being used
Bool bTransposedPolyphase, // TRUE if transpose polyphase filter
Bool bLeftEdge // TRUE if calc left edge of src slice
);
void
MbsCheckStalledTask (
tmUnitSelect_t mbsUnit, // I: MBS unit number
ptmdlMbsTaskInfo_t pTask // I: ptr to task to remove
);
UInt32
MbsChromaOffset2ProgVal (
tmUnitSelect_t unit,
UInt32 dtoOffsetC, // chroma dto Offset
UInt32 dtoOffsetL, // luma dto Offset
Bool bYUV420Format // TRUE - 420 format, False - 422 format
);
UInt32
MbsChromaProgVal2Offset (
tmUnitSelect_t unit,
UInt32 progVal, // prgrammed chroma dto Offset
UInt32 dtoOffsetL, // luma dto Offset
Bool bYUV420Format // TRUE - 420 format, False - 422 format
);
Bool
MbsClipMeasRect (
ptmRect_t pMeasRect, // IO: ptr to rectangle to clip
ptmRect_t pSliceRect // I: ptr to clip rectangle
);
void
MbsDisableTaskDispatching (
ptmdlMbsInstance_t pMbsInst // I: ptr to MBS instance data
);
void
MbsDQTasks (
tmUnitSelect_t mbsUnit // I: mbs unit
);
void
MbsFlushCoeffLoad (
pUInt32 pLoadCmd, // I: pointer to place command
tmdlMbsPhaseMode_t phaseMode // I: phase mode (number of phases)
);
UInt32
MbsGetTapIndex (
UInt32 inputFormat, // I: input data format setting
UInt32 vertScale, // I: vertical scaling value
UInt32 deinterlaceMode // I: deinterlacing Mode
);
tmErrorCode_t
MbsInit (
pInt32 pUnitCount // O: receives number of units
);
tmErrorCode_t
MbsInitClock (
ptmdlMbsInstance_t pMbsInst // I: ptr to MBS instance data
);
tmErrorCode_t
MbsInitHorzScaling (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
void
MbsInitRegDefaults (void);
tmErrorCode_t
MbsInitScaling (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
void
MbsInitTaskBuffer (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
tmErrorCode_t
MbsInitTaskDispatching (
ptmdlMbsInstance_t pMbsInst // I: ptr to MBS instance data
);
tmErrorCode_t
MbsInitVertScaling (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
Int32
MbsInstanceCount (
tmUnitSelect_t unit
);
Int32
MbsInstanceCountDec (
tmUnitSelect_t unit
);
Int32
MbsInstanceCountInc (
tmUnitSelect_t unit
);
void
MbsIsrHandler (
void* param
);
void
MbsLoadCoeff (
pUInt32 *ppNextCmd, // I: ptr to end Task of buffer ptr
tmdlMbsCoeffTable_t table, // I: Coeff table to be loaded
tmdlMbsPhaseMode_t phaseMode, // I: phase mode (number of phases)
pUInt32 pCoeffs // I: Array of coeff structures
);
void
MbsLoadLut (
pUInt32 *ppNextCmd, // I: ptr to end Task of buffer ptr
tmColor4_t* pLut, // I: Pointer to lookup table to be loaded
UInt32 nrOfEntries // I: # of lut entries to fill
);
tmErrorCode_t
MbsPanoramicScaling (
Int32 src, // I: src size
Int32 dst, // I: dst size
UInt32 centerScale, // I: center scale ratio * 100
pUInt32 pZoom, // O: receives zoom value
pInt32 pDzoom, // O: receives dzoom value
pInt32 pDdzoom // O: receives ddzoom value
);
tmErrorCode_t
MbsSetBufferFormat (
ptmdlMbsTaskInfo_t pTask,
Bool bSourceBuffer // I: True = src buffer, False = dst
);
tmErrorCode_t
MbsSetClockFreq (
ptmdlMbsInstance_t pMbsInst, // I: ptr to MBS instance data
tmdlMbs2_clockFreq_t clockFreq // I: new clock frequency
);
// eh04#468tmErrorCode_tMbsCloseFreqClock ( tmInstance_t clock // I: new clock ); tmErrorCode_tMbsOpenFreqClock ( tmUnitSelect_t unit, // I: ptr to MBS instance data ptmInstance_t clock // I: new clock );// eh04#468 END// eh04#468tmErrorCode_tMbsUnitSetClockFreq ( tmUnitSelect_t unit, // I: ptr to MBS instance data tmdlMbs2_clockFreq_t clockFreq // I: new clock frequency );// eh04#468tmErrorCode_t
MbsSetColorSpaceConv (
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
void
MbsSetDitherMode (
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_t
MbsSetDstBuffer (
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_t
MbsSetEddi (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
void
MbsSetLoadCoeffCmd (
pUInt32 pLoadCmd, // I: pointer to place command
tmdlMbsCoeffTable_t table, // I: Coeff table being loaded
tmdlMbsPhaseMode_t phaseMode // I: phase mode (number of phases)
);
tmErrorCode_t
MbsSetSrcBuffer (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask, // I: ptr to task information
ptmRect_t pSrcRect, // IO: ptr to src rectangle
pInt32 pChromaY // I: ptr to chroma Y value
);
tmErrorCode_t
MbsSetSrcBuffer3 (
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_t
MbsSetupScaleFormats (
tmUnitSelect_t unit, // I: MBS unit
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_t
MbsSetupVidMeas (
ptmdlMbsInstance_t pMbsInst, // I: pointer to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
Bool
MbsStreamMode (
tmUnitSelect_t unit
);
void
MbsStreamModeClear (
tmUnitSelect_t unit
);
void
MbsStreamModeSet (
tmUnitSelect_t unit
);
tmErrorCode_t
MbsTaskDispatch (
tmUnitSelect_t mbsUnit, // I: MBS unit
ptmdlMbsTaskInfo_t pTask, // I: ptr to task
Bool streamMode // I: True - running in stream mode
);
tmErrorCode_t
MbsTaskPrepare (
ptmdlMbsInstance_t pMbsInst, // I: ptr to instance data
ptmdlMbsTaskInfo_t pTask // I: pointer to task information
);
void
MbsTaskReset (
tmUnitSelect_t unit, // I: Unit number of MBS device
tmdlMbsTaskReset_t reset // I: type of reset
);
tmErrorCode_t
MbsUpdateBuffers (
ptmdlMbsInstance_t pMbsInst, // I: ptr to instance data
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
void
MbsUpdateDstBufferRegs (
ptmdlMbsTaskInfo_t pTask
);
void
MbsUpdateSrcBufferRegs (
ptmdlMbsTaskInfo_t pTask
);
tmErrorCode_t
MbsValidateBufferRects (
ptmdlMbsInstance_t pMbsInst, // I: ptr to instance data
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_t
MbsValidateDeinterlacing (
ptmdlMbsInstance_t pMbsInst, // I: ptr to instance data
ptmdlMbsTaskInfo_t pTask // I: ptr to task information
);
tmErrorCode_ttmdlMbsGetScaleFactor2 ( UInt32 srcSize, // I: src size (width or height) UInt32 dstSize, // I: dst size UInt32 imageWidth, // I: The total image width 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 pInt32 pLeftBorder, // IO: the left rectangle border (modified on output) pInt32 pRightBorder, // IO: the right rectangle border (modified on output) pInt32 pLeftPhase // IO: the left rectangle border phase (modified on output) );
#ifdef __cplusplus
}
#endif
#endif // TMDL_MBS2_SUPPORT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -