Skip to content

Commit

Permalink
opencl: Remove unneeded and potentially bad type casts
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Dec 1, 2016
1 parent e4faf95 commit a389b7c
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion ccmain/thresholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void ImageThresholder::OtsuThresholdRectToPix(Pix* src_pix,
OpenclDevice od;
if ((num_channels == 4 || num_channels == 1) &&
od.selectedDeviceIsOpenCL() && rect_top_ == 0 && rect_left_ == 0 ) {
od.ThresholdRectToPixOCL((const unsigned char*)pixGetData(src_pix),
od.ThresholdRectToPixOCL((unsigned char*)pixGetData(src_pix),
num_channels, pixGetWpl(src_pix) * 4,
thresholds, hi_values, out_pix /*pix_OCL*/,
rect_height_, rect_width_, rect_top_, rect_left_);
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/otsuthr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int OtsuThreshold(Pix* src_pix, int left, int top, int width, int height,
OpenclDevice od;
if (od.selectedDeviceIsOpenCL() && (num_channels == 1 || num_channels == 4) &&
top == 0 && left == 0) {
od.HistogramRectOCL((const unsigned char*)pixGetData(src_pix), num_channels,
od.HistogramRectOCL((unsigned char*)pixGetData(src_pix), num_channels,
pixGetWpl(src_pix) * 4, left, top, width, height,
kHistogramSize, histogramAllChannels);

Expand Down
Loading

0 comments on commit a389b7c

Please sign in to comment.