| 62 | // interface methods |
| 63 | public: |
| 64 | void process(const cv::Mat & prev, const cv::Mat & cur, const size_t currentFrameIndex, const size_t vix) { |
| 65 | bool equal = false; |
| 66 | |
| 67 | if (pixelDifference > 0){ |
| 68 | equal = trdrop::algorithm::are_equal_with<int>(prev, cur, pixelDifference); |
| 69 | } |
| 70 | else { |
| 71 | equal = trdrop::algorithm::are_equal<uchar*>(prev, cur); |
| 72 | } |
| 73 | static std::mutex mutex; |
| 74 | std::lock_guard<std::mutex> lock(mutex); |
| 75 | |
| 76 | size_t localIndex = currentFrameIndex % windowSize; |
| 77 | isDifferentFrame[vix][localIndex] = equal ? 0.0 : 1.0; |
| 78 | |
| 79 | fpsTaskData.fps[vix] = std::accumulate(isDifferentFrame[vix].begin(), isDifferentFrame[vix].end(), 0.0); |
| 80 | fpsTaskData.duplicateFrame[vix] = equal; |
| 81 | fpsTaskData.fps_unprocessed = isDifferentFrame; |
| 82 | |
| 83 | result = EitherSD(RightD(fpsTaskData)); |
| 84 | #if _TR_DEBUG |
| 85 | std::cout << "DEBUG: FPSPreTask - finished for video " << vix << '\n'; |
| 86 | #endif |
| 87 | |
| 88 | |
| 89 | } |
| 90 | |
| 91 | // public member |
| 92 | public: |
nothing calls this directly
no test coverage detected