Skip to content

Commit

Permalink
opencl: Replace Tesseract data types by POSIX data types
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 1, 2016
1 parent afd069c commit 397bcc6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions opencl/openclwrapper.cpp
Expand Up @@ -2394,9 +2394,9 @@ int OpenclDevice::ThresholdRectToPixOCL(const unsigned char *imageData,
int retVal = 0;
/* create pix result buffer */
*pix = pixCreate(width, height, 1);
uinT32 *pixData = pixGetData(*pix);
uint32_t *pixData = pixGetData(*pix);
int wpl = pixGetWpl(*pix);
int pixSize = wpl * height * sizeof(uinT32); // number of pixels
int pixSize = wpl * height * sizeof(uint32_t); // number of pixels

cl_int clStatus;
KernelEnv rEnv;
Expand Down Expand Up @@ -2784,13 +2784,13 @@ void ThresholdRectToPix_Native(const unsigned char* imagedata,
int height = pixGetHeight(*pix);

*pix = pixCreate(width, height, 1);
uinT32* pixdata = pixGetData(*pix);
uint32_t* pixdata = pixGetData(*pix);
int wpl = pixGetWpl(*pix);
const unsigned char* srcdata = imagedata + top * bytes_per_line +
left * bytes_per_pixel;
for (int y = 0; y < height; ++y) {
const uinT8* linedata = srcdata;
uinT32* pixline = pixdata + y * wpl;
const uint8_t* linedata = srcdata;
uint32_t* pixline = pixdata + y * wpl;
for (int x = 0; x < width; ++x, linedata += bytes_per_pixel) {
bool white_result = true;
for (int ch = 0; ch < bytes_per_pixel; ++ch) {
Expand Down

0 comments on commit 397bcc6

Please sign in to comment.