impl.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #include "impl.hpp"
  2. int slow_and8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
  3. {
  4. for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
  5. for(int x = 0 ; x < width; x++ )
  6. dst[x] = src1[x] & src2[x];
  7. return CV_HAL_ERROR_OK;
  8. }
  9. int slow_or8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
  10. {
  11. for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
  12. for(int x = 0 ; x < width; x++ )
  13. dst[x] = src1[x] | src2[x];
  14. return CV_HAL_ERROR_OK;
  15. }
  16. int slow_xor8u(const uchar* src1, size_t step1, const uchar* src2, size_t step2, uchar* dst, size_t step, int width, int height)
  17. {
  18. for(; height--; src1 = src1 + step1, src2 = src2 + step2, dst = dst + step)
  19. for(int x = 0 ; x < width; x++ )
  20. dst[x] = src1[x] ^ src2[x];
  21. return CV_HAL_ERROR_OK;
  22. }
  23. int slow_not8u(const uchar* src1, size_t step1, uchar* dst, size_t step, int width, int height)
  24. {
  25. for(; height--; src1 = src1 + step1, dst = dst + step)
  26. for(int x = 0 ; x < width; x++ )
  27. dst[x] = ~src1[x];
  28. return CV_HAL_ERROR_OK;
  29. }