Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/samples/hal/slow_hal/impl.cpp
16354 views
1
#include "impl.hpp"
2
3
int slow_and8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
4
{
5
for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
6
for(int x = 0 ; x < width; x++ )
7
dst[x] = src1[x] & src2[x];
8
return CV_HAL_ERROR_OK;
9
}
10
11
int slow_or8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
12
{
13
for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
14
for(int x = 0 ; x < width; x++ )
15
dst[x] = src1[x] | src2[x];
16
return CV_HAL_ERROR_OK;
17
}
18
19
int slow_xor8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
20
{
21
for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
22
for(int x = 0 ; x < width; x++ )
23
dst[x] = src1[x] ^ src2[x];
24
return CV_HAL_ERROR_OK;
25
}
26
27
int slow_not8u(const uchar* src1, size_t step1, uchar* dst, size_t step, int width, int height)
28
{
29
for(; height--; src1 = src1 + step1, dst = dst + step)
30
for(int x = 0 ; x < width; x++ )
31
dst[x] = ~src1[x];
32
return CV_HAL_ERROR_OK;
33
}
34
35