[117472] trunk/dports/gis/gdal

vince at macports.org vince at macports.org
Thu Feb 27 23:59:48 PST 2014


Revision: 117472
          https://trac.macports.org/changeset/117472
Author:   vince at macports.org
Date:     2014-02-27 23:59:48 -0800 (Thu, 27 Feb 2014)
Log Message:
-----------
Commit an upstream patch on the OpenCL georeferencer kernel

Modified Paths:
--------------
    trunk/dports/gis/gdal/Portfile

Added Paths:
-----------
    trunk/dports/gis/gdal/files/patch-gdalwarpkernel_opencl_c_2.diff

Modified: trunk/dports/gis/gdal/Portfile
===================================================================
--- trunk/dports/gis/gdal/Portfile	2014-02-28 07:36:55 UTC (rev 117471)
+++ trunk/dports/gis/gdal/Portfile	2014-02-28 07:59:48 UTC (rev 117472)
@@ -5,7 +5,7 @@
 
 name                gdal
 version             1.10.1
-revision            3
+revision            4
 categories          gis
 license             MIT BSD
 platforms           darwin
@@ -96,6 +96,7 @@
 # Patch to ensure that the python installation respects DESTDIR
 patchfiles          patch-swig_python_GNUmakefile \
                     patch-gdalwarpkernel_opencl_c.diff \
+                    patch-gdalwarpkernel_opencl_c_2.diff \
                     patch-gdalwarpkernel_opencl_h.diff
 
 # Upstream fix for "Undefined symbols: _environ"

Added: trunk/dports/gis/gdal/files/patch-gdalwarpkernel_opencl_c_2.diff
===================================================================
--- trunk/dports/gis/gdal/files/patch-gdalwarpkernel_opencl_c_2.diff	                        (rev 0)
+++ trunk/dports/gis/gdal/files/patch-gdalwarpkernel_opencl_c_2.diff	2014-02-28 07:59:48 UTC (rev 117472)
@@ -0,0 +1,64 @@
+--- alg/gdalwarpkernel_opencl.orig.c	2014-02-25 10:43:16.000000000 -0800
++++ alg/gdalwarpkernel_opencl.c	2014-02-25 11:32:50.000000000 -0800
+@@ -535,6 +535,32 @@
+     const char *dVecf = "float";
+     const char *kernGenFuncs =
+ // ********************* General Funcs ********************
++"void clampToDst(float fReal,\n"
++                "__global outType *dstPtr,\n"
++                "unsigned int iDstOffset,\n"
++                "__constant float *fDstNoDataReal,\n"
++                "int bandNum);\n"
++"void setPixel(__global outType *dstReal,\n"
++                "__global outType *dstImag,\n"
++                "__global float *dstDensity,\n"
++                "__global int *nDstValid,\n"
++                "__constant float *fDstNoDataReal,\n"
++                "const int bandNum,\n"
++                "vecf fDensity, vecf fReal, vecf fImag);\n"
++"int getPixel(__read_only image2d_t srcReal,\n"
++                "__read_only image2d_t srcImag,\n"
++                "__global float *fUnifiedSrcDensity,\n"
++                "__global int *nUnifiedSrcValid,\n"
++                "__constant char *useBandSrcValid,\n"
++                "__global int *nBandSrcValid,\n"
++                "const int2 iSrc,\n"
++                "int bandNum,\n"
++                "vecf *fDensity, vecf *fReal, vecf *fImag);\n"
++"int isValid(__global float *fUnifiedSrcDensity,\n"
++                "__global int *nUnifiedSrcValid,\n"
++                "float2 fSrcCoords );\n"
++"float2 getSrcCoords(__read_only image2d_t srcCoords);\n"
++
+ "#ifdef USE_CLAMP_TO_DST_FLOAT\n"
+ "void clampToDst(float fReal,\n"
+                 "__global outType *dstPtr,\n"
+@@ -666,7 +692,7 @@
+     "int bHasValid = FALSE;\n"
+     
+     // Clamp the src offset values if needed
+-    "if(useUnifiedSrcDensity || useUnifiedSrcValid || useUseBandSrcValid){\n"
++    "if(useUnifiedSrcDensity | useUnifiedSrcValid | useUseBandSrcValid){\n"
+         "int iSrcX = iSrc.x;\n"
+         "int iSrcY = iSrc.y;\n"
+         
+@@ -903,6 +929,9 @@
+     const char *kernCubic =
+ // ************************ Cubic ************************
+ "vecf cubicConvolution(float dist1, float dist2, float dist3,\n"
++                        "vecf f0, vecf f1, vecf f2, vecf f3);\n"
++
++"vecf cubicConvolution(float dist1, float dist2, float dist3,\n"
+                        "vecf f0, vecf f1, vecf f2, vecf f3)\n"
+ "{\n"
+     "return   (  -f0 +    f1  - f2 + f3) * dist3\n"
+@@ -1023,6 +1052,9 @@
+     const char *kernResampler =
+ // ************************ LanczosSinc ************************
+ 
++"float lanczosSinc( float fX, float fR );\n"
++"float bSpline( float x );\n"
++
+ "float lanczosSinc( float fX, float fR )\n"
+ "{\n"
+     "if ( fX > fR || fX < -fR)\n"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140227/b94c00a3/attachment.html>


More information about the macports-changes mailing list