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

📄 halutils.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
字号:
/******************************************************************************
<module>
* Name         : halutils.h
* Title        : utility functions
* Author(s)    : Imagination Technologies
* Created      : 26 May 2004
*
* Copyright    : 2004 by Imagination Technologies Limited.
*                All rights reserved.  No part of this software, either
*                material or conceptual may be copied or distributed,
*                transmitted, transcribed, stored in a retrieval system
*                or translated into any human or computer language in any
*                form by any means, electronic, mechanical, manual or
*                other-wise, or disclosed to third parties without the
*                express written permission of Imagination Technologies
*                Limited, Unit 8, HomePark Industrial Estate,
*                King's Langley, Hertfordshire, WD4 8LZ, U.K.
*
* Description  : utility functions
*
* Platform     : Windows CE
*
 $Log: halutils.h $
********************************************************************************/
#if !defined(_HALUTILS_H_)
#define _HALUTILS_H_

#define GET_VMIDATA_ELEMENT(psDriverData, psDDGlb, Element) psDDGlb->vmiData.Element
/*
	Handling DIB format. Pixels in a Windows device-independent bitmap (DIB)
	are, at 24bpp resolution, stored as RGBQUADS of the form:
	 { BYTE rgbBlue;  BYTE rgbGreen;  BYTE rgbRed;  BYTE rgbReserved; }
*/

#define DIB_CONVERT_24BPP_TO_555(x)	(WORD)(((x >> 9) & 0x00007C00)	| \
						  			   	   ((x >> 6) & 0x000003E0)	| \
									       ((x >> 3) & 0x0000001F))
												    
#define DIB_CONVERT_24BPP_TO_565(x) (WORD)(((x >> 8) & 0x0000F800)	| \
						  			   	   ((x >> 5) & 0x000007E0)	| \
									       ((x >> 3) & 0x0000001F))

#define DIB_CONVERT_24BPP_4444(x) (WORD)(((x >> 12) & 0x00000F00)  | \
								         ((x >>  8) & 0x000000F0)  | \
								         ((x >>  4) & 0x0000000F))


/*
	To speed up floating point calculations.
*/
#define FLOAT_TO_LONG(x) (* ((long *)( & x)))
#define LONG_TO_FLOAT(x) (* ((float*)( & x)))

/*****************************************************************************
 Prototypes...
*****************************************************************************/
DWORD ConvertARGBColourToPFColour(DWORD dwDestFormat, DWORD dwRGBColour);
DWORD ConvertPFCKToMBX3DCK(	DWORD						dwColourKey,
							LPDDPIXELFORMAT				psPixelFormat,
							DWORD						dwTSPCtl,
							PVOID						pvDDPalette,
							BOOL						bReplicate);

PSURFDATA ConvertToMBX3DCK(LPDDHAL_SETCOLORKEYDATA psColorKeyData);

DWORD ConvertPixelFormatToMBX(LPDDPIXELFORMAT lpPixelFormat);
BOOL ConvertPixelFormatToOverlay(LPDDPIXELFORMAT lpPixelFormat, DWORD *pdwOverlayFormat);
DWORD GetBPPFromFOURCC(DWORD dwFourCC);
DWORD GetPixelFormatType(DWORD dwFormat);
IMG_UINT32 GetRotationAngle();

void GetPVRHALRegSettings(DWORD				dwDevCookie, 
						  PPVR_REG_DATA		psRegData, 
						  PVRSRV_DEV_INFO	*psDevInfo);

extern void CreateMBXSurfClass(PSURFDATA psSurfData);

#endif /* (_HALUTILS_H_) */
/*****************************************************************************
  End of file (halutils.h)
*****************************************************************************/

⌨️ 快捷键说明

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