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

📄 ippip.h

📁 wince 6.0 摄像头(ov7670)驱动,已在ce6测试通过
💻 H
📖 第 1 页 / 共 5 页
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//
// (C) Copyright 2006 Marvell International Ltd.
// All Rights Reserved
//
/******************************************************************************
// INTEL CONFIDENTIAL
// Copyright 2000 ~ 2005 Intel Corporation All Rights Reserved. 
// The source code contained or described herein and all documents related to 
// the source code (“Material”) are owned by Intel Corporation or its 
// suppliers or licensors. Title to the Material remains with Intel Corporation
// or its suppliers and licensors. The Material contains trade secrets and 
// proprietary and confidential information of Intel or its suppliers and 
// licensors. The Material is protected by worldwide copyright and trade secret 
// laws and treaty provisions. No part of the Material may be used, copied, 
// reproduced, modified, published, uploaded, posted, transmitted, distributed, 
// or disclosed in any way without Intel’s prior express written permission.
//
// No license under any patent, copyright, trade secret or other intellectual 
// property right is granted to or conferred upon you by disclosure or delivery 
// of the Materials, either expressly, by implication, inducement, estoppel or 
// otherwise. Any license under such intellectual property rights must be 
// express and approved by Intel in writing.
******************************************************************************/

#if !defined( __IPPIP_H__ ) 
#define __IPPIP_H__
#define __IPPI_H__

#ifndef __IPPDEFS_H__
  #include "ippdefs.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _CALLBACK
#define _CALLBACK __STDCALL
#endif

void* _CALLBACK ippiMalloc(int size);
void  _CALLBACK ippiFree(void *pSrcBuf);

typedef enum {
    ippMskSize1x3 = 13,
    ippMskSize1x5 = 15,
    ippMskSize3x1 = 31,
    ippMskSize3x3 = 33,
    ippMskSize5x1 = 51,
    ippMskSize5x5 = 55
} IppiMaskSize;

typedef enum {
    ippAlphaOver,
    ippAlphaIn,
    ippAlphaOut,
    ippAlphaATop,
    ippAlphaXor,
    ippAlphaPlus,
    ippAlphaOverPremul,
    ippAlphaInPremul,
    ippAlphaOutPremul,
    ippAlphaATopPremul,
    ippAlphaXorPremul,
    ippAlphaPlusPremul
} IppiAlphaType;

typedef enum {
    ippDitherNone,
    ippDitherFS,
    ippDitherJJN,
    ippDitherStucki,
    ippDitherBayer
} IppiDitherType;

/*============ Intel IPP Camera Interface structure defination =============*/
typedef enum 
{
	ippCameraInterpNearest  	 = 0,    /* for nearest interpolation */
	ippCameraInterpBilinear      = 1,    /* for bilinear interpolation */
	ippCameraInterpMedian		 = 2,    /* for median interpolation */
	ippCameraInterpNearLinear    = 3    /* for NearLinear interpolation */
}IppCameraInterpolation;

typedef enum
{
	ippCameraRotateDisable       = 0,
	ippCameraRotate90L           = 1,    
	ippCameraRotate90R           = 2,
	ippCameraRotate180           = 3,
	ippCameraFlipHorizontal		 = 4,
	ippCameraFlipVertical		 = 5
}IppCameraRotation;

typedef enum
{
	ippCameraCscYCbCr422ToRGB565 = 0,
	ippCameraCscYCbCr422ToRGB555 = 1,
	ippCameraCscYCbCr422ToRGB444 = 2,
	ippCameraCscYCbCr422ToRGB888 = 3,
	ippCameraCscYCbCr420ToRGB565 = 4,
	ippCameraCscYCbCr420ToRGB555 = 5,
	ippCameraCscYCbCr420ToRGB444 = 6,
	ippCameraCscYCbCr420ToRGB888 = 7,

	/* CFA format to YUV422/420 format */
	ippCameraCscRGGBToYCbCr422P  = 8,
	ippCameraCscRGGBToYCbCr420   = 9,
/*	ippCameraCscBGGRToYCbCr422P  = 10,
	ippCameraCscBGGRToYCbCr420   = 11,
	ippCameraCscGRBGToYCbCr422P  = 12,
	ippCameraCscGRBGToYCbCr420   = 13,
	ippCameraCscGBRGToYCbCr422P  = 14,
	ippCameraCscGBRGToYCbCr420   = 15,*/  /* for future extension */

	ippCameraCscYCbCr422ToRGB666 = 16,
	ippCameraCscYCbCr420ToRGB666 = 17
}IppCameraCsc;

typedef enum
{
	ippGamPreOneTable            = 0,
	ippGamCusOneTable            = 1,
	ippGamPreThreeTable          = 2,
	ippGamCusThreeTable          = 3
} IppCameraGam;

typedef enum
{
	ippCameraAEHist              = 0,
	ippCameraAEMean              = 1,
	ippCameraAECenter            = 2,
	ippCameraAESpot              = 3,
	ippCameraAEMatrix            = 4
} IppCameraAEMethod;

typedef enum
{
	ippCameraAWBWGA              = 0,
	ippCameraAWBWPD              = 1
} IppCameraAWBMethod;

typedef struct
{
	int						srcStep;
	IppiSize				srcSize;
	int						dstStep[3];
	IppiSize				dstSize;
	IppCameraInterpolation	interpolation;
	IppCameraRotation		rotation;
	IppCameraCsc			colorConversion;
	IppBool					bExtendBorder;
} IppiRawPixProcCfg_P3R;

typedef struct
{
	IppCameraGam			GammaFlag;
	int						GammaIndex[3];
	Ipp8u*					pGammaTable[3];
	Ipp32u*					pDeadPixMap;
    int						DPMLen;
	IppiPoint				DPMOffset;
	IppCameraInterpolation  DPInterp;
    Ipp16s*					pCCMatrix;
} IppiCAMCfg;

typedef void IppiRawPixProcSpec_P3R;

/* AWB definitions */

/*****************************/
/*           AE/AWB          */
/*****************************/

typedef struct
{
	IppCameraAEMethod		AEMethod;
	IppiRect*				pWindows;
	Ipp16u*					pWeights;
	int						WindowsNum; 
	Ipp16u					MagicPointThreshold;
	Ipp16u					LowThreshold;
	Ipp16u					DarkThreshold;
	Ipp16u					HighThreshold;
	Ipp16u                  MedianThreshold; 	/* target brightness*/    
    Ipp16u                  NarrowThreshold;   
	Ipp16u					TStep;				/* integrationtime step */
	Ipp16u					GStep;				/* gain step */
	int						T_min;				/* Low limit of the integration time */
	int						T_max;				/* High limit of the integration time */
	int						G_min;				/* Low limit of the gain value */
	int						G_max;				/* High limit of the gain value */
} IppiAEConfig;

typedef struct
{
	IppCameraAWBMethod AWBMethod;
	int				WindowsNum;
	IppiRect*		pWindows;
	Ipp8u*			pWeights;
	Ipp16u			RefRG; /* Q10, AWB target r/g and b/g values.*/
	Ipp16u			RefBG;
	Ipp16u			RGlow; /* Q10, when |r/g – RefRG| < RGlow and |b/g – RefBG| < BGlow, we are close white enough, keep the old settings */
	Ipp16u			BGlow;
	Ipp16u			RGhigh; /* Q10, when |(r/g)/(RGain_old/GGain_old) – RefRG| > RGhigh or
									|(b/g)/(BGain_old/GGain_old) – RefBG| > BGhigh,
									we assert that a predominate color exists and stop AWB */
	Ipp16u			BGhigh;
	Ipp16u			T1; /* used by WPD criteria |R-G|<T1 */
	Ipp16u			T2; /* used by WPD criteria |B-G|<T2 */
	Ipp16u			T3; /* used by WPD criteria |R+B-2G|<T3 */
	Ipp16u			T4; /* used by WPD criteria R+B+2G>T4 */
	Ipp16u			T5; /* used by WPD criteria R+B+2G<T5 */
	int				ValidNum; /* used by WPD.
								for a single window, when the number of discriminated white point
									is smaller than ValidNum, this window is discarded.
								If all windows are discarded, WPD failed */
	Ipp16u			Step;
	Ipp16u			GainMin;
	Ipp16u			GainMax;
	Ipp16u			RGainDefault;
	Ipp16u			GGainDefault;
	Ipp16u			BGainDefault;
} IppiAWBCfg;

typedef void IppiAESpec_C1R;
typedef void IppiAWBSpec_C1R;

/*****************************/
/*          AE/AWB end       */
/*****************************/

/* /////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//                   Functions declarations
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// */

/* /////////////////////////////////////////////////////////////////////////////
//  Name:       ippiGetLibVersion
//  Purpose:    getting of the library version
//  Returns:    the structure of information about  version of ippi library
//  Parameters:
//
//  Notes:      not necessary to release the returned structure
*/
IPPAPI( const IppLibraryVersion*, ippiGetLibVersion, (void) )


/* /////////////////////////////////////////////////////////////////////////////
//                  Copy/Set Functions
///////////////////////////////////////////////////////////////////////////// */

/* /////////////////////////////////////////////////////////////////////////////
// Name:       ippiSet_8u_C1R()
//             ippiSet_8u_C3R()
//             ippiSet_8u_AC4R()
//
// Purpose:    Set Image by the constant
//
// Returns:
//    ippStsNoErr       no error
//    ippStsNullPtrErr  NULL==pDst
//    ippStsStepErr     dstSTep <=0
//    ippStsSizeErr     dstRoiSize.width<1 || dstRoiSize.height<1
//
// Parameters:
//    value          value of the constant (or pointer to the array of constants)
//    pDst           pointer to the target image ROI
//    dstStep        target scan line size (bytes)
//    dstRoiSize     size of target ROI
//
*/
IPPAPI(IppStatus, ippiSet_8u_C1R, (
               Ipp8u value, Ipp8u* pDst, int dstStep,
               IppiSize dstRoiSize))
IPPAPI(IppStatus, ippiSet_8u_C3R, (
               const Ipp8u value[3], Ipp8u* pDst, int dstStep,
               IppiSize dstRoiSize))

/* /////////////////////////////////////////////////////////////////////////////
// Name:       ippiCopy_8u_C1R()
//             ippiCopy_8u_C3R()
//             ippiCopy_8u_AC4R()
//
// Purpose:    Copy Image
//
// Returns:
//    ippStsNoErr       no error
//    ippStsNullPtrErr  NULL==pSrc || NULL==pDst

⌨️ 快捷键说明

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