#include <motion.h>
Inherits PluginVClient.

Public Member Functions | |
| MotionMain (PluginServer *server) | |
| ~MotionMain () | |
| int | process_buffer (VFrame **frame, int64_t start_position, double frame_rate) |
| void | process_global () |
| void | process_rotation () |
| void | draw_vectors (VFrame *frame) |
| int | is_multichannel () |
| int | is_realtime () |
| int | load_defaults () |
| int | save_defaults () |
| void | save_data (KeyFrame *keyframe) |
| void | read_data (KeyFrame *keyframe) |
| void | update_gui () |
| void | calculate_pointers (VFrame **frame, VFrame **src, VFrame **dst) |
| void | allocate_temp (int w, int h, int color_model) |
| int64_t | abs_diff (unsigned char *prev_ptr, unsigned char *current_ptr, int row_bytes, int w, int h, int color_model) |
| 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) |
| void | draw_arrow (VFrame *frame, int x1, int y1, int x2, int y2) |
Static Public Member Functions | |
| 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, int use_absolute) |
| static void | draw_pixel (VFrame *frame, int x, int y) |
| static void | draw_line (VFrame *frame, int x1, int y1, int x2, int y2) |
Data Fields | |
| int64_t | previous_frame_number |
| VFrame * | temp_frame |
| MotionScan * | engine |
| RotateScan * | motion_rotate |
| OverlayFrame * | overlayer |
| AffineEngine * | rotate_engine |
| int | total_dx |
| int | total_dy |
| float | total_angle |
| int | current_dx |
| int | current_dy |
| float | current_angle |
| int32_t * | search_area |
| int | search_size |
| int | reference_layer |
| int | target_layer |
| VFrame * | prev_global_ref |
| VFrame * | current_global_ref |
| VFrame * | global_target_src |
| VFrame * | global_target_dst |
| VFrame * | prev_rotate_ref |
| VFrame * | current_rotate_ref |
| VFrame * | rotate_target_src |
| VFrame * | rotate_target_dst |
| VFrame * | output_frame |
| int | w |
| int | h |
Definition at line 121 of file motion.h.
| MotionMain::MotionMain | ( | PluginServer * | server | ) |
Definition at line 200 of file motion.C.
References current_global_ref, current_rotate_ref, engine, global_target_dst, global_target_src, motion_rotate, overlayer, PLUGIN_CONSTRUCTOR_MACRO, prev_global_ref, prev_rotate_ref, previous_frame_number, rotate_engine, rotate_target_dst, rotate_target_src, search_area, search_size, temp_frame, total_angle, total_dx, and total_dy.
| MotionMain::~MotionMain | ( | ) |
Definition at line 227 of file motion.C.
References current_global_ref, current_rotate_ref, engine, global_target_dst, global_target_src, motion_rotate, overlayer, PLUGIN_DESTRUCTOR_MACRO, prev_global_ref, prev_rotate_ref, rotate_engine, rotate_target_dst, rotate_target_src, search_area, and temp_frame.
| int MotionMain::process_buffer | ( | VFrame ** | frame, | |
| int64_t | start_position, | |||
| double | frame_rate | |||
| ) | [virtual] |
Reimplemented from PluginVClient.
Definition at line 838 of file motion.C.
References VFrame::copy_from(), current_angle, current_dx, current_dy, current_global_ref, current_rotate_ref, draw_vectors(), VFrame::get_color_model(), PluginClient::get_direction(), VFrame::get_h(), PluginClient::get_next_keyframe(), PluginClient::get_prev_keyframe(), PluginClient::get_source_start(), PluginClient::get_total_len(), VFrame::get_w(), global_target_dst, global_target_src, h, output_frame, Auto::position, prev_global_ref, prev_rotate_ref, previous_frame_number, process_global(), process_rotation(), PluginVClient::read_frame(), reference_layer, rotate_target_dst, rotate_target_src, target_layer, total_angle, total_dx, total_dy, PluginClient::total_in_buffers, MotionConfig::TRACK_SINGLE, and w.

| void MotionMain::process_global | ( | ) |
Definition at line 497 of file motion.C.
References CLAMP, VFrame::clear_frame(), VFrame::copy_from(), current_dx, current_dy, current_global_ref, MotionScan::dx_result, MotionScan::dy_result, engine, VFrame::get_h(), PluginClient::get_project_smp(), PluginClient::get_source_position(), VFrame::get_w(), global_target_dst, global_target_src, MotionConfig::NOTHING, OverlayFrame::overlay(), overlayer, OVERSAMPLE, prev_global_ref, previous_frame_number, MotionScan::scan_frame(), MotionConfig::STABILIZE, MotionConfig::STABILIZE_PIXEL, total_dx, total_dy, MotionConfig::TRACK, MotionConfig::TRACK_PIXEL, and MotionConfig::TRACK_SINGLE.
Referenced by process_buffer().

| void MotionMain::process_rotation | ( | ) |
Definition at line 629 of file motion.C.
References VFrame::clear_frame(), VFrame::copy_from(), current_angle, current_dx, current_dy, current_global_ref, current_rotate_ref, VFrame::get_h(), PluginClient::get_project_smp(), PluginClient::get_source_position(), VFrame::get_w(), global_target_dst, motion_rotate, MotionConfig::NOTHING, OverlayFrame::overlay(), overlayer, OVERSAMPLE, prev_global_ref, prev_rotate_ref, previous_frame_number, AffineEngine::rotate(), rotate_engine, rotate_target_dst, rotate_target_src, RotateScan::scan_frame(), AffineEngine::set_pivot(), MotionConfig::STABILIZE, MotionConfig::STABILIZE_PIXEL, total_angle, total_dx, total_dy, MotionConfig::TRACK, MotionConfig::TRACK_PIXEL, and MotionConfig::TRACK_SINGLE.
Referenced by process_buffer().

| void MotionMain::draw_vectors | ( | VFrame * | frame | ) |
Definition at line 1231 of file motion.C.
References clamp_scan(), current_dx, current_dy, draw_arrow(), draw_line(), VFrame::get_h(), VFrame::get_w(), h, M_PI, OVERSAMPLE, MotionConfig::PREVIOUS_SAME_BLOCK, total_angle, total_dx, total_dy, MotionConfig::TRACK_SINGLE, and w.
Referenced by MotionDrawVectors::handle_event(), process_buffer(), and MotionWindow::update_mode().

| int MotionMain::is_multichannel | ( | ) | [virtual] |
| int MotionMain::is_realtime | ( | ) | [virtual] |
| int MotionMain::load_defaults | ( | ) | [virtual] |
| int MotionMain::save_defaults | ( | ) | [virtual] |
| void MotionMain::save_data | ( | KeyFrame * | keyframe | ) | [virtual] |
Reimplemented from PluginClient.
Definition at line 388 of file motion.C.
References FileXML::append_tag(), KeyFrame::data, PluginVClient::output, XMLTag::set_property(), FileXML::set_shared_string(), XMLTag::set_title(), FileXML::tag, and FileXML::terminate_string().

| void MotionMain::read_data | ( | KeyFrame * | keyframe | ) | [virtual] |
Reimplemented from PluginClient.
Definition at line 427 of file motion.C.
References KeyFrame::data, XMLTag::get_property(), PluginVClient::input, FileXML::read_tag(), FileXML::set_shared_string(), FileXML::tag, and XMLTag::title_is().

| void MotionMain::update_gui | ( | ) | [virtual] |
Reimplemented from PluginClient.
Definition at line 265 of file motion.C.
References BCTEXTLEN, MotionConfig::PREVIOUS_SAME_BLOCK, MasterLayer::to_text(), Mode3::to_text(), Mode2::to_text(), Mode1::to_text(), MotionConfig::TRACK_PREVIOUS, and MotionConfig::TRACK_SINGLE.

| void MotionMain::allocate_temp | ( | int | w, | |
| int | h, | |||
| int | color_model | |||
| ) |
Definition at line 482 of file motion.C.
References VFrame::get_h(), VFrame::get_w(), and temp_frame.

| int64_t MotionMain::abs_diff | ( | unsigned char * | prev_ptr, | |
| unsigned char * | current_ptr, | |||
| int | row_bytes, | |||
| int | w, | |||
| int | h, | |||
| int | color_model | |||
| ) |
Definition at line 1593 of file motion.C.
References ABS_DIFF, BC_RGB888, BC_RGB_FLOAT, BC_RGBA8888, BC_RGBA_FLOAT, BC_YUV161616, BC_YUV888, BC_YUVA16161616, and BC_YUVA8888.
Referenced by RotateScanUnit::process_package(), and MotionScanUnit::process_package().
| int64_t MotionMain::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 | |||
| ) |
Definition at line 1684 of file motion.C.
References ABS_DIFF_SUB, BC_RGB888, BC_RGB_FLOAT, BC_RGBA8888, BC_RGBA_FLOAT, BC_YUV161616, BC_YUV888, BC_YUVA16161616, and BC_YUVA8888.
Referenced by MotionScanUnit::process_package().
| void MotionMain::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, | |||
| int | use_absolute | |||
| ) | [static] |
Definition at line 1111 of file motion.C.
References CLAMP.
Referenced by draw_vectors(), and MotionScan::scan_frame().
| void MotionMain::draw_pixel | ( | VFrame * | frame, | |
| int | x, | |||
| int | y | |||
| ) | [static] |
Definition at line 1410 of file motion.C.
References BC_RGB161616, BC_RGB888, BC_RGB_FLOAT, BC_RGBA16161616, BC_RGBA8888, BC_RGBA_FLOAT, BC_YUV161616, BC_YUV888, BC_YUVA16161616, BC_YUVA8888, DRAW_PIXEL, and VFrame::get_color_model().
Referenced by draw_line().

| void MotionMain::draw_line | ( | VFrame * | frame, | |
| int | x1, | |||
| int | y1, | |||
| int | x2, | |||
| int | y2 | |||
| ) | [static] |
Definition at line 1469 of file motion.C.
References draw_pixel(), h, and w.
Referenced by draw_arrow(), and draw_vectors().

| void MotionMain::draw_arrow | ( | VFrame * | frame, | |
| int | x1, | |||
| int | y1, | |||
| int | x2, | |||
| int | y2 | |||
| ) |
Definition at line 1524 of file motion.C.
References ARROW_SIZE, and draw_line().
Referenced by draw_vectors().

Definition at line 177 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_global(), and process_rotation().
Definition at line 180 of file motion.h.
Referenced by allocate_temp(), MotionMain(), and ~MotionMain().
Definition at line 181 of file motion.h.
Referenced by MotionMain(), process_global(), and ~MotionMain().
Definition at line 182 of file motion.h.
Referenced by MotionMain(), process_rotation(), and ~MotionMain().
Definition at line 183 of file motion.h.
Referenced by MotionMain(), process_global(), process_rotation(), and ~MotionMain().
Definition at line 184 of file motion.h.
Referenced by MotionMain(), process_rotation(), and ~MotionMain().
Definition at line 188 of file motion.h.
Referenced by draw_vectors(), MotionMain(), process_buffer(), process_global(), process_rotation(), and MotionScan::scan_frame().
Definition at line 189 of file motion.h.
Referenced by draw_vectors(), MotionMain(), process_buffer(), process_global(), process_rotation(), and MotionScan::scan_frame().
| float MotionMain::total_angle |
Definition at line 192 of file motion.h.
Referenced by draw_vectors(), MotionMain(), process_buffer(), and process_rotation().
Definition at line 195 of file motion.h.
Referenced by draw_vectors(), process_buffer(), process_global(), and process_rotation().
Definition at line 196 of file motion.h.
Referenced by draw_vectors(), process_buffer(), process_global(), and process_rotation().
| int32_t* MotionMain::search_area |
Definition at line 215 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_global(), process_rotation(), and ~MotionMain().
Definition at line 217 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_global(), process_rotation(), and ~MotionMain().
Definition at line 219 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_global(), and ~MotionMain().
Definition at line 221 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_global(), process_rotation(), and ~MotionMain().
Definition at line 224 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_rotation(), and ~MotionMain().
Definition at line 226 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_rotation(), and ~MotionMain().
Definition at line 228 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_rotation(), and ~MotionMain().
Definition at line 230 of file motion.h.
Referenced by MotionMain(), process_buffer(), process_rotation(), and ~MotionMain().
| int MotionMain::w |
Definition at line 234 of file motion.h.
Referenced by draw_line(), draw_vectors(), and process_buffer().
| int MotionMain::h |
Definition at line 235 of file motion.h.
Referenced by draw_line(), draw_vectors(), and process_buffer().
1.5.5