4 * Copyright (C) 2016 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #include "loadbalance.h"
39 class RotateScanPackage : public LoadPackage
50 RotateScanCache(float angle, int64_t difference);
55 class RotateScanUnit : public LoadClient
58 RotateScanUnit(RotateScan *server, MotionMain *plugin);
61 void process_package(LoadPackage *package);
65 AffineEngine *rotater;
69 class RotateScan : public LoadServer
72 RotateScan(MotionMain *plugin,
77 friend class RotateScanUnit;
80 LoadClient* new_client();
81 LoadPackage* new_package();
83 // Invoke the motion engine for a search
84 // Frame before rotation
85 float scan_frame(VFrame *previous_frame,
86 // Frame after rotation
87 VFrame *current_frame,
91 int64_t get_cache(float angle);
92 void put_cache(float angle, int64_t difference);
99 VFrame *previous_frame;
100 // Frame after motion
101 VFrame *current_frame;
119 // Range of angles to compare
120 float scan_angle1, scan_angle2;
123 ArrayList<RotateScanCache*> cache;