From 5e6bb4f4786dd39158ffe02913590cc3dea21ebd Mon Sep 17 00:00:00 2001 From: "N.N." Date: Fri, 6 Nov 2009 18:33:57 +0000 Subject: remove gridflow 0.9.5 svn path=/trunk/; revision=12727 --- externals/gridflow/bundled/Base/GemPixPete.h | 219 --------------------------- 1 file changed, 219 deletions(-) delete mode 100644 externals/gridflow/bundled/Base/GemPixPete.h (limited to 'externals/gridflow/bundled/Base/GemPixPete.h') diff --git a/externals/gridflow/bundled/Base/GemPixPete.h b/externals/gridflow/bundled/Base/GemPixPete.h deleted file mode 100644 index be3c2e19..00000000 --- a/externals/gridflow/bundled/Base/GemPixPete.h +++ /dev/null @@ -1,219 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - helper stuff for ports of Pete's Plugins - - http://www.petewarden.com - - Copyright (c) 2004 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ -#ifndef INCLUDE_GEMPIXPETE_H_ -#define INCLUDE_GEMPIXPETE_H_ - - -// utility functions from PeteHelpers.h -typedef unsigned long U32; -typedef unsigned short U16; -typedef unsigned char U8; - - -/* is this only on my system ? - i thought Gem's YUV is UYVY and not YVYU - seems weird... (jmz) -*/ -#ifdef __APPLE__ - -# define SHIFT_ALPHA (24) -# define SHIFT_RED (16) -# define SHIFT_GREEN (8) -# define SHIFT_BLUE (0) - -# define SHIFT_U (24) -# define SHIFT_Y1 (16) -# define SHIFT_V (8) -# define SHIFT_Y2 (0) - -#else - -# define SHIFT_ALPHA (24) -# define SHIFT_RED (16) -# define SHIFT_GREEN (8) -# define SHIFT_BLUE (0) - -# define SHIFT_U (0) -# define SHIFT_Y1 (8) -# define SHIFT_V (16) -# define SHIFT_Y2 (24) -#endif - -const float Pete_Pi=3.141582f; -const float Pete_TwoPi=(2.0f*Pete_Pi); -const float Pete_HalfPi=(0.5f*Pete_Pi); - -static inline void Pete_ZeroMemory(void* pMemory,int nCount) { - char* pCurrent=(char*)pMemory; - char* pEnd=(pCurrent+nCount); - // while (pCurrent=pBufferStart) { - - *((PETE_PIXELDATA32*)pBuffer32Current)= - *((PETE_PIXELDATA24*)pBuffer24Current); - - pBuffer32Current-=SIZEOF_PETE_PIXELDATA32; - pBuffer24Current-=SIZEOF_PETE_PIXELDATA24; - } -} - -static inline void Pete_CopyAndConvert16Bit565To32Bit(PETE_PIXELDATA16* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA16); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource>11)&31; - const int nMaskedGreen=(SourceColour>>5)&63; - const int nMaskedBlue=(SourceColour>>0)&31; - - const int nNormalizedRed=(nMaskedRed<<3)|(nMaskedRed>>2); - const int nNormalizedGreen=(nMaskedGreen<<2)|(nMaskedGreen>>4); - const int nNormalizedBlue=(nMaskedBlue<<3)|(nMaskedBlue>>2); - - const PETE_PIXELDATA32 OutputColour= - (nNormalizedRed<<16)| - (nNormalizedGreen<<8)| - (nNormalizedBlue<<0); - - *((PETE_PIXELDATA32*)pCurrentOutput)=OutputColour; - - pCurrentSource+=SIZEOF_PETE_PIXELDATA16; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA32; - - } - -} - -static inline void Pete_CopyAndConvert32BitTo16Bit565(PETE_PIXELDATA32* pSource,PETE_PIXELDATA16* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA32); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource>16)&0xff; - const int nSourceGreen=(SourceColour>>8)&0xff; - const int nSourceBlue=(SourceColour>>0)&0xff; - - const int nMaskedRed=(nSourceRed>>3); - const int nMaskedGreen=(nSourceGreen>>2); - const int nMaskedBlue=(nSourceBlue>>3); - - PETE_PIXELDATA16 OutputColour= - (nMaskedRed<<11)| - (nMaskedGreen<<5)| - (nMaskedBlue<<0); - - *((PETE_PIXELDATA16*)pCurrentOutput)=OutputColour; - - pCurrentSource+=SIZEOF_PETE_PIXELDATA32; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA16; - } -} -typedef void* SPete_MemHandle; - -inline SPete_MemHandle Pete_NewHandle(int nBytesToAlloc) { - return malloc(nBytesToAlloc); -} - -inline void Pete_FreeHandle(SPete_MemHandle InHandle) { - free(InHandle); -} - -inline void* Pete_LockHandle(SPete_MemHandle InHandle) { - return InHandle; -} - -inline void Pete_UnLockHandle(SPete_MemHandle InHandle) { - // do nothing -} - -const int cnBiggestSignedInt=0x7fffffff; - -inline int GetLuminance(const U32 inColour) { - const int nRed=(inColour&(0xff<>16; - const int nGreen=(inColour&(0xff<>8; - const int nBlue=(inColour&(0xff<>0; - - const int nLuminance = - ((77 * nRed)+ - (150* nGreen)+ // used to be 50 which is plain wron - (29 * nBlue)); - - return nLuminance; -} - -#endif /* INCLUDE_GEMPIXPETE_H_ */ -// end of PeteHelpers.h stuff -- cgit v1.2.1