@@ -58,27 +58,6 @@ static const l_uint32 rmask32[] = {
58
58
0x01ffffff , 0x03ffffff , 0x07ffffff , 0x0fffffff , 0x1fffffff , 0x3fffffff ,
59
59
0x7fffffff , 0xffffffff };
60
60
61
- struct tiff_transform {
62
- int vflip; /* if non-zero, image needs a vertical fip */
63
- int hflip; /* if non-zero, image needs a horizontal flip */
64
- int rotate; /* -1 -> counterclockwise 90-degree rotation,
65
- 0 -> no rotation
66
- 1 -> clockwise 90-degree rotation */
67
- };
68
-
69
- static struct tiff_transform tiff_orientation_transforms[] = {
70
- {0 , 0 , 0 },
71
- {0 , 1 , 0 },
72
- {1 , 1 , 0 },
73
- {1 , 0 , 0 },
74
- {0 , 1 , -1 },
75
- {0 , 0 , 1 },
76
- {0 , 1 , 1 },
77
- {0 , 0 , -1 }
78
- };
79
-
80
- static const l_int32 MAX_PAGES_IN_TIFF_FILE = 3000 ;
81
-
82
61
static cl_mem pixsCLBuffer, pixdCLBuffer, pixdCLIntermediate; // Morph operations buffers
83
62
static cl_mem pixThBuffer; // output from thresholdtopix calculation
84
63
static cl_int clStatus;
@@ -727,31 +706,6 @@ Pix *mapOutputCLBuffer(KernelEnv rEnv, cl_mem clbuffer, Pix *pixd, Pix *pixs,
727
706
return pixd;
728
707
}
729
708
730
- static cl_mem allocateIntBuffer (KernelEnv rEnv, const l_uint32 *_pValues,
731
- size_t nElements, cl_int *pStatus,
732
- bool sync = false )
733
- {
734
- cl_mem xValues =
735
- clCreateBuffer (rEnv.mpkContext , (cl_mem_flags)(CL_MEM_READ_WRITE),
736
- nElements * sizeof (l_int32), nullptr , pStatus);
737
-
738
- if (_pValues != nullptr ) {
739
- l_int32 *pValues = (l_int32 *)clEnqueueMapBuffer (
740
- rEnv.mpkCmdQueue , xValues, CL_TRUE, CL_MAP_WRITE, 0 ,
741
- nElements * sizeof (l_int32), 0 , nullptr , nullptr , nullptr );
742
-
743
- memcpy (pValues, _pValues, nElements * sizeof (l_int32));
744
-
745
- clEnqueueUnmapMemObject (rEnv.mpkCmdQueue , xValues, pValues, 0 , nullptr ,
746
- nullptr );
747
-
748
- if (sync ) clFinish (rEnv.mpkCmdQueue );
749
- }
750
-
751
- return xValues;
752
- }
753
-
754
-
755
709
void OpenclDevice::releaseMorphCLBuffers ()
756
710
{
757
711
if (pixdCLIntermediate != nullptr ) clReleaseMemObject (pixdCLIntermediate);
0 commit comments