-// Frame before motion
- void scan_frame(VFrame *previous_frame,
- VFrame *current_frame,
- int global_range_w, // in pixels
- int global_range_h,
- int global_block_w, // in pixels
- int global_block_h,
- int block_x, // in pixels
- int block_y,
- int frame_type,
- int tracking_type,
- int action_type,
- int horizontal_only,
- int vertical_only,
- int source_position,
- int total_dx, // in pixels * OVERSAMPLE
- int total_dy,
- int global_origin_x, // in pixels
- int global_origin_y,
- int do_motion,
- int do_rotate,
- double rotation_center, // in deg
- double rotation_range);
-
- static int64_t abs_diff(unsigned char *prev_ptr,
- unsigned char *current_ptr,
- int row_bytes,
- int w,
- int h,
- int color_model);
- static int64_t abs_diff_sub(unsigned char *prev_ptr,
- unsigned char *current_ptr,
- int row_bytes,
- int w,
- int h,
- int color_model,
- int sub_x,
- int sub_y);
-
-
- static void clamp_scan(int w,
- int h,
- int *block_x1,
- int *block_y1,
- int *block_x2,
- int *block_y2,
- int *scan_x1,
- int *scan_y1,
- int *scan_x2,
- int *scan_y2,
+ void scan_frame(VFrame *previous_frame, // Frame before motion
+ VFrame *current_frame, // Frame after motion
+ int global_range_w, int global_range_h, int global_block_w, int global_block_h,
+ double block_x, double block_y, int frame_type, int tracking_type, int action_type,
+ int horizontal_only, int vertical_only, int source_position, int total_steps,
+ int total_dx, int total_dy, int global_origin_x, int global_origin_y,
+ int load_ok=0, int load_dx=0, int load_dy=0);
+ int64_t get_cache(int x, int y);
+ void put_cache(int x, int y, int64_t difference);
+
+ static int64_t abs_diff(unsigned char *prev_ptr, unsigned char *current_ptr,
+ int row_bytes, int w, int h, int color_model);
+ static int64_t abs_diff_sub(unsigned char *prev_ptr, unsigned char *current_ptr,
+ int row_bytes, int w, int h, int color_model, int sub_x, int sub_y);
+
+ static void clamp_scan(int w, int h,
+ int *block_x1, int *block_y1, int *block_x2, int *block_y2,
+ int *scan_x1, int *scan_y1, int *scan_x2, int *scan_y2,