Skip to content

Commit

Permalink
COMP: Make pixelfunctions static, and solve link error
Browse files Browse the repository at this point in the history
  • Loading branch information
jmichel-otb committed Jul 6, 2016
1 parent d9fd29b commit 0e14ea1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 40 deletions.
2 changes: 2 additions & 0 deletions gdal/frmts/vrt/gdal_vrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
CPL_C_START

void GDALRegister_VRT();
CPLErr CPL_STDCALL GDALRegisterDefaultPixelFunc();

typedef CPLErr
(*VRTImageReadFunc)( void *hCBData,
int nXOff, int nYOff, int nXSize, int nYSize,
Expand Down
71 changes: 34 additions & 37 deletions gdal/frmts/vrt/pixelfunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,96 +30,93 @@
#include <math.h>
#include <gdal.h>

CPLErr RealPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr RealPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr ImagPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ImagPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr ComplexPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ComplexPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr ModulePixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ModulePixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr PhasePixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr PhasePixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr ConjPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ConjPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr SumPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr SumPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr DiffPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr DiffPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr MulPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr MulPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr CMulPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr CMulPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr InvPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr InvPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr IntensityPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr IntensityPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr SqrtPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr SqrtPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr Log10PixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr Log10PixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr dB2AmpPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr dB2AmpPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr dB2PowPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr dB2PowPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);

CPLErr PowPixelFuncHelper(void **papoSources, int nSources, void *pData,
static CPLErr PowPixelFuncHelper(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace,
double base, double fact);

CPLErr CPL_STDCALL GDALRegisterDefaultPixelFunc();


CPLErr RealPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr RealPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand All @@ -145,7 +142,7 @@ CPLErr RealPixelFunc(void **papoSources, int nSources, void *pData,
} /* RealPixelFunc */


CPLErr ImagPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ImagPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -187,7 +184,7 @@ CPLErr ImagPixelFunc(void **papoSources, int nSources, void *pData,
} /* ImagPixelFunc */


CPLErr ComplexPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ComplexPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -220,7 +217,7 @@ CPLErr ComplexPixelFunc(void **papoSources, int nSources, void *pData,
} /* MakeComplexPixelFunc */


CPLErr ModulePixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ModulePixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -273,7 +270,7 @@ CPLErr ModulePixelFunc(void **papoSources, int nSources, void *pData,
} /* ModulePixelFunc */


CPLErr PhasePixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr PhasePixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -339,7 +336,7 @@ CPLErr PhasePixelFunc(void **papoSources, int nSources, void *pData,
} /* PhasePixelFunc */


CPLErr ConjPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr ConjPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -379,7 +376,7 @@ CPLErr ConjPixelFunc(void **papoSources, int nSources, void *pData,
} /* ConjPixelFunc */


CPLErr SumPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr SumPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -442,7 +439,7 @@ CPLErr SumPixelFunc(void **papoSources, int nSources, void *pData,
} /* SumPixelFunc */


CPLErr DiffPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr DiffPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -501,7 +498,7 @@ CPLErr DiffPixelFunc(void **papoSources, int nSources, void *pData,
} /* DiffPixelFunc */


CPLErr MulPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr MulPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -570,7 +567,7 @@ CPLErr MulPixelFunc(void **papoSources, int nSources, void *pData,
} /* MulPixelFunc */


CPLErr CMulPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr CMulPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -630,7 +627,7 @@ CPLErr CMulPixelFunc(void **papoSources, int nSources, void *pData,
} /* CMulPixelFunc */


CPLErr InvPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr InvPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -687,7 +684,7 @@ CPLErr InvPixelFunc(void **papoSources, int nSources, void *pData,
} /* InvPixelFunc */


CPLErr IntensityPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr IntensityPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -741,7 +738,7 @@ CPLErr IntensityPixelFunc(void **papoSources, int nSources, void *pData,
} /* IntensityPixelFunc */


CPLErr SqrtPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr SqrtPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -771,7 +768,7 @@ CPLErr SqrtPixelFunc(void **papoSources, int nSources, void *pData,
} /* SqrtPixelFunc */


CPLErr Log10PixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr Log10PixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down Expand Up @@ -827,7 +824,7 @@ CPLErr Log10PixelFunc(void **papoSources, int nSources, void *pData,
} /* Log10PixelFunc */


CPLErr PowPixelFuncHelper(void **papoSources, int nSources, void *pData,
static CPLErr PowPixelFuncHelper(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace,
Expand Down Expand Up @@ -858,7 +855,7 @@ CPLErr PowPixelFuncHelper(void **papoSources, int nSources, void *pData,
return CE_None;
} /* PowPixelFuncHelper */

CPLErr dB2AmpPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr dB2AmpPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand All @@ -869,7 +866,7 @@ CPLErr dB2AmpPixelFunc(void **papoSources, int nSources, void *pData,
} /* dB2AmpPixelFunc */


CPLErr dB2PowPixelFunc(void **papoSources, int nSources, void *pData,
static CPLErr dB2PowPixelFunc(void **papoSources, int nSources, void *pData,
int nXSize, int nYSize,
GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace)
Expand Down
3 changes: 0 additions & 3 deletions gdal/frmts/vrt/vrtdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@

CPL_CVSID("$Id$");

// Required to register pixel functions
extern CPLErr CPL_STDCALL GDALRegisterDefaultPixelFunc();


/************************************************************************/
/* VRTDriver() */
Expand Down

0 comments on commit 0e14ea1

Please sign in to comment.