X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fplugins%2Fmoveobj%2Fmoveobj.C;h=a3c9a89684552c6d38447f13c8c5bc23dd33fe89;hb=b2eb290b3f6e5c233393017aa152e67c76243130;hp=4f5fd0fd36dcf0b6fad250308a466606cd251e6c;hpb=9f682a609a1817808682efa68cb96a296815bf80;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/moveobj/moveobj.C b/cinelerra-5.1/plugins/moveobj/moveobj.C index 4f5fd0fd..a3c9a896 100644 --- a/cinelerra-5.1/plugins/moveobj/moveobj.C +++ b/cinelerra-5.1/plugins/moveobj/moveobj.C @@ -101,7 +101,7 @@ void MoveObj::save_data(KeyFrame *keyframe) FileXML output; // cause data to be stored directly in text - output.set_shared_output(keyframe->get_data(), MESSAGESIZE); + output.set_shared_output(keyframe->xbuf); output.tag.set_title("MOVEOBJ"); output.tag.set_property("DRAW_VECTORS", config.draw_vectors); output.tag.set_property("DO_STABILIZATION", config.do_stabilization); @@ -119,7 +119,7 @@ void MoveObj::save_data(KeyFrame *keyframe) void MoveObj::read_data(KeyFrame *keyframe) { FileXML input; - input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); + input.set_shared_input(keyframe->xbuf); int result = 0; while( !(result = input.read_tag()) ) { @@ -255,7 +255,7 @@ int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_ goodFeaturesToTrack(next_mat, *next_corners, corner_count, 0.01, // quality_level min_distance, noArray(), block_size, - 0, // use_harris + false, // use_harris 0.04); // k ptV pt1, pt2; @@ -334,7 +334,7 @@ int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_ // interpolate with identity matrix accum_matrix = w0*identity + w1*accum_matrix; - AffineMatrix matrix; + AffineMatrix &matrix = affine->matrix; for( int i=0,k=0; i<3; ++i ) for( int j=0; j<3; ++j ) matrix.values[i][j] = amat[k++]; @@ -342,7 +342,6 @@ int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_ //printf("MoveObj::process_buffer %d %jd matrix=\n", __LINE__, start_position); //matrix.dump(); - affine->set_matrix(&matrix); // iframe is always temp, if we get here output->clear_frame(); affine->process(output, iframe, 0, AffineEngine::TRANSFORM,