diff --git a/Acid.Cam.v2.OSX.xcodeproj/project.xcworkspace/xcuserdata/jared.xcuserdatad/UserInterfaceState.xcuserstate b/Acid.Cam.v2.OSX.xcodeproj/project.xcworkspace/xcuserdata/jared.xcuserdatad/UserInterfaceState.xcuserstate index b5e10f065..42e3851ce 100644 Binary files a/Acid.Cam.v2.OSX.xcodeproj/project.xcworkspace/xcuserdata/jared.xcuserdatad/UserInterfaceState.xcuserstate and b/Acid.Cam.v2.OSX.xcodeproj/project.xcworkspace/xcuserdata/jared.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Acid.Cam.v2.OSX/ac-filter2.cpp b/Acid.Cam.v2.OSX/ac-filter2.cpp index 9653a76e4..738bd4779 100644 --- a/Acid.Cam.v2.OSX/ac-filter2.cpp +++ b/Acid.Cam.v2.OSX/ac-filter2.cpp @@ -133,6 +133,11 @@ void ac::randomFilter(cv::Mat &frame) { int num; do { num = rand()%(draw_max-6); + size_t pos = 0; + pos = ac::draw_strings[num].find("Feedback"); + if(pos != std::string::npos) + continue; + } while((ac::draw_strings[num] == "Random Filter") || (ac::draw_strings[num] == "RandomIntertwine") || (ac::draw_strings[num] == "RandomFour" || (ac::draw_strings[num] == "BlendThree") || (ac::draw_strings[num] == "RandomTwo") || ac::draw_strings[num] == "SoftFeedbackResizeSubFilter64" || ac::draw_strings[num] == "SoftFeedbackResizeSubFilter" || ac::draw_strings[num] == "SoftFeedbackSubFilter")); draw_func[num](frame); diff --git a/Acid.Cam.v2.OSX/ac-filter8.cpp b/Acid.Cam.v2.OSX/ac-filter8.cpp index 3b562de13..04adab854 100644 --- a/Acid.Cam.v2.OSX/ac-filter8.cpp +++ b/Acid.Cam.v2.OSX/ac-filter8.cpp @@ -973,6 +973,11 @@ void ac::SoftFeedbackRandFilter32(cv::Mat &frame) { void ac::SoftFeedbackSubFilter(cv::Mat &frame) { + + + if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackSubFilter") + return; + Rect source(0, 0, frame.cols-1, frame.rows-1); cv::Mat frame_copy = frame.clone(); int add_w = source.w/32; @@ -997,6 +1002,10 @@ void ac::SoftFeedbackSubFilter(cv::Mat &frame) { } void ac::SoftFeedbackResizeSubFilter(cv::Mat &frame) { + + if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackResizeSubFilter") + return; + static MatrixCollection<32> collection; collection.shiftFrames(frame); Rect source(0, 0, frame.cols-1, frame.rows-1); @@ -1038,6 +1047,9 @@ void ac::SoftFeedbackResizeSubFilter(cv::Mat &frame) { void ac::SoftFeedbackResizeSubFilter64(cv::Mat &frame) { + if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackResizeSubFilter64") + return; + static MatrixCollection<64> collection; collection.shiftFrames(frame); Rect source(0, 0, frame.cols-1, frame.rows-1); @@ -1078,6 +1090,10 @@ void ac::SoftFeedbackResizeSubFilter64(cv::Mat &frame) { } void ac::SoftFeedbackReszieSubFilter64_Negate(cv::Mat &frame) { + + if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackReszieSubFilter64_Negate") + return; + static MatrixCollection<64> collection; collection.shiftFrames(frame); Rect source(0, 0, frame.cols-1, frame.rows-1); @@ -1122,6 +1138,12 @@ void ac::SoftFeedbackReszieSubFilter64_Negate(cv::Mat &frame) { } void ac::SoftFeedbackReszieSubFilter64_Mirror(cv::Mat &frame) { + + + if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackReszieSubFilter64_Mirror") + return; + + static MatrixCollection<64> collection; collection.shiftFrames(frame); Rect source(0, 0, frame.cols-1, frame.rows-1); diff --git a/Acid.Cam.v2.OSX/ac-util.cpp b/Acid.Cam.v2.OSX/ac-util.cpp index be0752eae..632a2003c 100644 --- a/Acid.Cam.v2.OSX/ac-util.cpp +++ b/Acid.Cam.v2.OSX/ac-util.cpp @@ -334,7 +334,7 @@ ac::DrawFunction ac::getFilter(std::string name) { } bool ac::testSize(cv::Mat &frame) { - if(frame.cols < 120 || frame.rows < 120) + if(frame.cols < frame.cols/64 || frame.rows < frame.rows/64) return false; return true; @@ -344,6 +344,10 @@ ac::DrawFunction ac::getRandomFilter(int &index) { int num; do { num = rand()%(draw_max-6); + size_t pos = 0; + pos = ac::draw_strings[num].find("Feedback"); + if(pos != std::string::npos) + continue; } while(ac::draw_strings[num] == "Blend Fractal" || ac::draw_strings[num] == "Blend Fractal Mood"); index = num; return draw_func[num]; diff --git a/Acid.Cam.v2.OSX/ac.h b/Acid.Cam.v2.OSX/ac.h index 0066faead..f7505dea1 100644 --- a/Acid.Cam.v2.OSX/ac.h +++ b/Acid.Cam.v2.OSX/ac.h @@ -591,8 +591,8 @@ namespace ac { public: static constexpr int ArraySize = Size; MatrixCollection() : w(0), h(0) { - // for(int i = 0; i < Size; ++i) - // all_objects.push_back(&frames[i]); + for(int i = 0; i < Size; ++i) + all_objects.push_back(&frames[i]); } cv::Mat frames[Size+4]; int w, h;