Skip to content

Commit

Permalink
Updated wrap_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
lostjared committed Jun 19, 2022
1 parent 753220a commit 2ccb725
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions Acid.Cam.v2.OSX/ac-filter-new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
#include "ac.h"
#include<list>

unsigned char ac::wrap_cast(double d) {
unsigned long x = static_cast<unsigned long>(d);
if(x > 255)
x = x%255;
return static_cast<unsigned char>(x);
}

void ac::FrameSep(cv::Mat &frame) {
static constexpr int MAX = 16;
static ac::MatrixCollection<MAX> collection;
Expand Down
10 changes: 8 additions & 2 deletions Acid.Cam.v2.OSX/ac.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,15 @@ namespace ac {
void *library;
UserFilter(): index(0), subfilter(-1), func(0), library(0) {}
};

bool checkFilter(std::string name);
inline unsigned char wrap_cast(double d);

inline unsigned char wrap_cast(double d) {
unsigned long x = static_cast<unsigned long>(d);
if(x > 255)
x = x%255;
return static_cast<unsigned char>(x);
}
// get version string
extern std::string getVersion();
extern int getFilterCount();
Expand Down

0 comments on commit 2ccb725

Please sign in to comment.