X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvirtualvnode.C;h=62af4046499eddc4609624477fbccf5e74cbfcf4;hb=21c2e6b36d6a96c2f662a89459d607b5a387f4eb;hp=27c65bba868c84319be7c0711536103cd90c757c;hpb=87141f1b454130848c34efdea9cf832d17463830;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/virtualvnode.C b/cinelerra-5.1/cinelerra/virtualvnode.C index 27c65bba..62af4046 100644 --- a/cinelerra-5.1/cinelerra/virtualvnode.C +++ b/cinelerra-5.1/cinelerra/virtualvnode.C @@ -357,7 +357,7 @@ void VirtualVNode::render_mask(VFrame *output_temp, if( !((VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver())->can_mask( start_position_project, keyframe_set) ) use_opengl = 0; - + } if(use_opengl) { ((VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver())->do_mask( @@ -372,7 +372,7 @@ void VirtualVNode::render_mask(VFrame *output_temp, } -// Start of input fragment in project if forward. +// Start of input fragment in project if forward. // End of input fragment if reverse. int VirtualVNode::render_projector(VFrame *input, VFrame *output, int64_t start_position, double frame_rate, @@ -381,18 +381,19 @@ int VirtualVNode::render_projector(VFrame *input, VFrame *output, float in_x1, in_y1, in_x2, in_y2; float out_x1, out_y1, out_x2, out_y2; double edl_rate = renderengine->get_edl()->session->frame_rate; - int64_t start_position_project = (int64_t)(start_position * + int64_t start_position_project = (int64_t)(start_position * edl_rate / frame_rate); VRender *vrender = ((VirtualVConsole*)vconsole)->vrender; - if(vconsole->debug_tree) - printf(" VirtualVNode::render_projector input=%p output=%p cmodel=%d title=%s\n", + if(vconsole->debug_tree) + printf(" VirtualVNode::render_projector input=%p output=%p cmodel=%d title=%s\n", input, output, output->get_color_model(), track->title); if(output) { - ((VTrack*)track)->calculate_output_transfer(start_position_project, - renderengine->command->get_direction(), + int direction = renderengine->command->get_direction(); + ((VTrack*)track)->calculate_output_transfer( + start_position_project, direction, in_x1, in_y1, in_x2, in_y2, out_x1, out_y1, out_x2, out_y2); @@ -401,15 +402,14 @@ int VirtualVNode::render_projector(VFrame *input, VFrame *output, //for(int j = 0; j < input->get_w() * 3 * 5; j++) // input->get_rows()[0][j] = 255; -// - if(out_x2 > out_x1 && out_y2 > out_y1 && +// + if(out_x2 > out_x1 && out_y2 > out_y1 && in_x2 > in_x1 && in_y2 > in_y1) { - int direction = renderengine->command->get_direction(); - IntAuto *mode_keyframe = 0; - mode_keyframe = + Auto *auto_keyframe = 0; + IntAuto *mode_keyframe = (IntAuto*)track->automation->autos[AUTOMATION_MODE]->get_prev_auto( - start_position_project, direction, (Auto* &)mode_keyframe); + start_position_project, PLAY_FORWARD, auto_keyframe); int mode = mode_keyframe->value; @@ -432,8 +432,8 @@ int VirtualVNode::render_projector(VFrame *input, VFrame *output, ((VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver())->overlay( output, input, in_x1, in_y1, in_x2, in_y2, - out_x1, out_y1, out_x2, out_y2, - alpha, mode, + out_x1, out_y1, out_x2, out_y2, + alpha, mode, renderengine->get_edl(), is_nested); } @@ -441,8 +441,8 @@ int VirtualVNode::render_projector(VFrame *input, VFrame *output, { vrender->overlayer->overlay(output, input, in_x1, in_y1, in_x2, in_y2, - out_x1, out_y1, out_x2, out_y2, - alpha, mode, + out_x1, out_y1, out_x2, out_y2, + alpha, mode, renderengine->get_edl()->session->interpolation_type); } }