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

📄 dp_hardware.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
字号:
/*********************************************************************************
 *********************************************************************************
 **
 ** Name        : dp_hardware.h
 ** Title       : Hardware implementation specific module header for display
 **               pipeline
 ** Author      : T. Whalley
 ** Created     : June 2001
 ** 
 ** Copyright   : 2001 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 : This header file contains all the hardware implementation
 **               specific constants and enumerations. This file must be hand
 **               modified for each implementation of the display pipeline.
 **
 ** Platform    : Platform independent	(modify 'types.h' accordingly)
 ** $Log: dp_hardware.h $
 **
 **  --- Revision Logs Removed --- 
 *********************************************************************************
 *********************************************************************************/

/* This file is manually generated for each individual							 */

#if !defined (__DP_HARDWARE_H__)
#define __DP_HARDWARE_H__


#define	DP_HARDWARE_STRIDE_COMPENSATE					1
#define	DP_HARDWARE_SURFACE_WIDTH_COMPENSATE			1
#define	DP_HARDWARE_SURFACE_HEIGHT_COMPENSATE			1

#define	DP_SCALING_ORDER_CUT_OFF_POINT					768		/* If scaling downwards horizontally and source width	*/
																/* is greater than 768 pixels, then do horizontal		*/
																/* scaling first.										*/
#define DP_SCALING_VERTICAL_FILTER_ORDER_SWITCH_VALUE	0.25	/* Switch to 4 tap scaling when dest is >= 4x source	*/
#define DP_SCALING_HORIZONTAL_DECIMATION_THRESHOLD		4		/* If dest. is more than 4x smaller horizontally than	*/
																/* source, then use decimation rather than proper		*/
																/* scaling.												*/
#define	DP_SCALER_INITIAL_HORIZONTAL_POSITION			4

#define	DP_FRAME_DEFAULT_WIDTH							16
#define DP_FRAME_DEFAULT_HEIGHT							16
#define DP_FRAME_DEFAULT_PIXEL_COLOUR_FORMAT			DP_PIXEL_COLOUR_FORMAT_8_BIT_INDEXED

#if defined DP_ERROR_CHECKING
#define	DP_MAXIMUM_BLINK_RATE							64

#define DP_GAMMA_CORRECTION_TABLE_LENGTH_VIDEO			16
#define	DP_GAMMA_CORRECTION_TABLE_LENGTH_GRAPHICS		16

#define	DP_MAXIMUM_DESTINATION_FRAME_X_POS				2047
#define DP_MAXIMUM_DESTINATION_FRAME_Y_POS				2047

#define DP_MINIMUM_DESTINATION_FRAME_X_POS				-2047
#define DP_MINIMUM_DESTINATION_FRAME_Y_POS				-2047

#define DP_MAXIMUM_DESTINATION_FRAME_WIDTH				2048
#define DP_MAXIMUM_DESTINATION_FRAME_HEIGHT				2048

#define	DP_SCALER_MAXIMUM_PITCH							8		/* Min scaling is where dest. is 1/8 size of source */
#define DP_SCALER_MINIMUM_PITCH							0.125	/* Max scaling is where dest. is 8x size of source	*/

#define DP_STRIDE_SPECIFIED_IN_BLOCKS_OF_N_BYTES		16

#define	DP_GAMMA_MINIMUM_GAMMA_VALUE					50
#define DP_GAMMA_MAXIMUM_GAMMA_VALUE					500
#define DP_GAMMA_MINIMUM_CONTRAST						128
#define DP_GAMMA_MAXIMUM_CONTRAST						384
#define DP_GAMMA_MINIMUM_BRIGHTNESS						0
#define DP_GAMMA_MAXIMUM_BRIGHTNESS						256

#define	DP_Y_FIFO_DEPTH									64
#define	DP_UV_FIFO_DEPTH								32

#define	DP_INTERRUPT_BIT_POSITION						1
#endif

#define	DP_MAXIMUM_FIELD_VALUE(x)						((x)->ui32TargetBitfieldMask >> (x)->ui8TargetBitfieldStart) 

typedef	struct	DP_tag_ScalerModifier
{
	DP_BOOL		bInterlacedFieldBit;
	DP_UINT_8	ui8SourceHeightDivisor;			/* Height of source frame		*/
	DP_UINT_8	ui8DestinationHeightDivisor;	/* Height of destination frame	*/
	DP_UINT_16	ui16Initial1Divisor;			
	DP_UINT_8	ui8SourceOffsetHeightDivisor;	/* Y offset of source window	*/

} DP_ScalerModifier, * DP_pScalerModifier;


/* Utility functions																			*/

DP_UINT_8	DP_GammaCalc					(	DP_UINT_16							nIndex,		
												DP_UINT_16							Gamma, 
												DP_UINT_16							Range, 
												DP_UINT_16							Brightness					);

DP_VOID		DP_GenerateTimingsFromVESAGTF	(	DP_TimingSettings	*				psOutputTimings,
												DP_VESAGTFSettings	*				psInputTimings				);

DP_UINT_32	DP_CalculateStride				(	DP_PixelColourFormats				ePixelFormat,
												DP_UINT_32							ui32PictureWidthInPixels,
												DP_UINT_32							ui32BytesOfRedundantInformationOnRightHandEdge	);


DP_UINT_16	DP_AdjustFrameSizeAndScaling	(	DP_UINT_16							ui16PlaneHandle, 
												DP_BOOL								bSourceFrame, 
												DP_UINT_16							ui16NewFrameWidth, 
												DP_UINT_16							ui16NewFrameHeight			);

DP_VOID		NewScalerModifierSelected		(	DP_UINT_16							ui16PlaneHandle,
												DP_pScalerModifier					psOldModifier,
												DP_BOOL								bReworkScaling,
												DP_BOOL								bReworkSourceWindowOffset	);

DP_VOID		GenerateVESAGTFFigures			(	DP_UINT_16							ui16ScreenWidth,
												DP_UINT_16							ui16ScreenHeight,
												DP_UINT_16							ui16VerticalRefresh,
												DP_BOOL								bInterlaced,
												DP_VESAGTFSettings	*				pstcStructureToFill			);


/************************************************/
/* These are present for interrupt testing only */
/************************************************/
extern 			DP_UINT_32					DP_ui32FirstFieldVBlankIntCount;
extern 			DP_UINT_32					DP_ui32SecondFieldVBlankIntCount;
/************************************************/

extern const	DP_UINT_8					DP_aui8ColourSpaceConversionModeVals	[ DP_COLOUR_SPACE_CONVERSION_MODE_NUMBER_OF_MODES ];
extern const	DP_UINT_8					DP_aui8BytesPerPixel					[ DP_PIXEL_COLOUR_FORMAT_NUMBER_OF_MODES ];
extern const	DP_UINT_8					DP_aui8ColourFormatModeVals				[ DP_PIXEL_COLOUR_FORMAT_NUMBER_OF_MODES ];
extern const	DP_UINT_8					DP_aui8AlphaBlendModeVals				[ DP_ALPHA_BLEND_MODE_NUMBER_OF_MODES ];
extern const	DP_INT_8					DP_auiPaletteLUTReferences				[ DP_NO_OF_STREAMS ];
extern const	DP_UINT_8					DP_aui8NumberOfScalerTapVals			[ 5 ];
extern const	DP_UINT_8					DP_aui8MemoryRefreshPeriodsVals			[ 4 ];
extern const	DP_ScalerModifier			DP_ScalerModifiersTable					[ 2 ][ DP_SOURCE_DATA_TYPE_UNKNOWN ][ 2 ][ 2 ];

extern			DP_pScalerModifier			DP_pCurrentScalerModifier				[ DP_NO_OF_STREAMS ];
extern			DP_pScalerModifier			DP_pCurrentPanningModifier				[ DP_NO_OF_STREAMS ];
extern			DP_UINT_16					DP_ui16ActualDisplayHeight;	

/************************************************/
/* These are present for interrupt testing only */
/************************************************/
extern			DP_UINT_32					IntCountCursor2Underrun;
extern			DP_UINT_32					IntCountCursor1Underrun;
extern			DP_UINT_32					IntCountPlane6Underrun;
extern			DP_UINT_32					IntCountPlane5Underrun;
extern			DP_UINT_32					IntCountPlane4Underrun;
extern			DP_UINT_32					IntCountPlane3Underrun;
extern			DP_UINT_32					IntCountPlane2Underrun;
extern			DP_UINT_32					IntCountPlane1Underrun;
extern			DP_UINT_32					IntCountPlane2BufferOverrun;
extern			DP_UINT_32					IntCountPlane1BufferOverrun;
extern			DP_UINT_32					IntCountVerticalBlanking_SecondField;
extern			DP_UINT_32					IntCountVerticalBlanking_FirstField;
extern			DP_UINT_32					IntCountHorizontalBlanking_SecondField;
extern			DP_UINT_32					IntCountHorizontalBlanking_FirstField;
/************************************************/

#endif	/* __DP_HARDWARE_H__ */


/*--------------------------- End of File --------------------------------*/

⌨️ 快捷键说明

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