📄 csl_reszhwsetup.c
字号:
/** @file csl_reszHwSetup.c
*
* @brief File for functional layer of CSL API @a CSL_reszHwSetup()
*
* Description
* - The @a CSL_reszHwSetup() function definition & it's associated
* functions
*
* Modification 1
* - Modified on: 05/12/2005
* - Reason: created the sources
*
* @date 12th May, 2005
* @author Jesse Villarreal.
*/
#include <csl_resz.h>
#include <csl_resz_aux.h>
#pragma CODE_SECTION (CSL_reszHwSetup, ".text:csl_section:resz");
/** @brief Configures the RESZ using the values passed in through the
* setup structure.
*/
CSL_Status CSL_reszHwSetup(
/** Pointer to the object that holds reference to the
* instance of RESZ requested after the call
*/
CSL_ReszHandle hResz,
/** Pointer to setup structure which contains the
* information to program RESZ to a useful state
*/
CSL_ReszHwSetup *setup
){
CSL_Status status=CSL_SOK;
CSL_ReszRegsOvly reszRegs = hResz->regs;
if(setup == NULL) return (CSL_ESYS_INVPARAMS);
/** Disable all modes
*/
CSL_FINS(reszRegs->YENH,RESZ_YENH_ALGO, CSL_RESZ_YENH_DISABLE);
/* The following can not be null pointers, they must be passed
*/
if(CSL_reszSelectInputSource(hResz, setup->inputSource) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSelectInputType(hResz, setup->inputType) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetYCPos(hResz, setup->ycPosition) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetChromAlg(hResz, setup->algorithm) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetStartPos(hResz, &setup->startPos) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetInSize(hResz, &setup->inputSize) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetOutSize(hResz, &setup->outputSize) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetResizeValue(hResz, &setup->ratios) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetStartPhase(hResz, &setup->startPhase) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetInOffset(hResz, setup->inputLineOffset) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetInAddr(hResz, setup->inputAddr) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetOutOffset(hResz, setup->outputLineOffset) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_reszSetOutAddr(hResz, setup->outputAddr) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
/* The following may be null pointers
*/
CSL_reszSetFilterCoef(hResz, setup->filterCoeffs);
CSL_reszSetLumEnhancer(hResz, setup->lumEnhance);
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -