X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvmodule.C;h=89d00f59427d9ba70a59702a9559017b2286ca9d;hb=6ad20126d5f82618e5dd4dd2d14b0682a5529d17;hp=bdf0c7d8f729d5523d346696f31e6abe6778f835;hpb=9fed7535470aa37781733db836068da3b4c17a0d;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/vmodule.C b/cinelerra-5.1/cinelerra/vmodule.C index bdf0c7d8..89d00f59 100644 --- a/cinelerra-5.1/cinelerra/vmodule.C +++ b/cinelerra-5.1/cinelerra/vmodule.C @@ -56,7 +56,6 @@ #include "vplugin.h" #include "vtrack.h" #include -#include "interlacemodes.h" #include "maskengine.h" #include "automation.h" @@ -177,21 +176,15 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit, delete nested_renderengine; nested_renderengine = 0; } - - if( !nested_command ) { + if( !nested_command ) nested_command = new TransportCommand; - } - - - if( !nested_renderengine ) { - nested_command->command = command; - nested_command->get_edl()->copy_all(nested_edl); - nested_command->change_type = CHANGE_ALL; - nested_command->realtime = renderengine->command->realtime; - nested_renderengine = new RenderEngine(0, get_preferences(), 0, 1); - nested_renderengine->set_vcache(get_cache()); - nested_renderengine->arm_command(nested_command); - } + nested_command->command = command; + nested_command->get_edl()->copy_all(nested_edl); + nested_command->change_type = CHANGE_ALL; + nested_command->realtime = renderengine->command->realtime; + nested_renderengine = new RenderEngine(0, get_preferences(), 0, 1); + nested_renderengine->set_vcache(get_cache()); + nested_renderengine->arm_command(nested_command); } else { @@ -256,7 +249,7 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit, FloatAutos *speed_autos = (FloatAutos*)track->automation->autos[AUTOMATION_SPEED]; speed_position += speed_autos->automation_integral(edit_startproject, direction_position-edit_startproject, PLAY_FORWARD); -//printf("VModule::import_frame %d %lld %lld\n", __LINE__, position, (int64_t)speed_position); +//printf("VModule::import_frame %d %jd %jd\n", __LINE__, position, (int64_t)speed_position); position = (int64_t)speed_position; } @@ -368,38 +361,6 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit, // printf("VModule::import_frame %d %f %d %f %d\n", // __LINE__, in_w, asset_w, in_h, asset_h); -// -// printf("VModule::import_frame 1 [ilace] Project: mode (%d) Asset: autofixoption (%d), mode (%d), method (%d)\n", -// get_edl()->session->interlace_mode, -// current_edit->asset->interlace_autofixoption, -// current_edit->asset->interlace_mode, -// current_edit->asset->interlace_fixmethod); - - // Determine the interlacing method to use. - int interlace_fixmethod = !current_edit->asset ? ILACE_FIXMETHOD_NONE : - ilaceautofixmethod2(get_edl()->session->interlace_mode, - current_edit->asset->interlace_autofixoption, - current_edit->asset->interlace_mode, - current_edit->asset->interlace_fixmethod); -// -// char string[BCTEXTLEN]; -// ilacefixmethod_to_text(string,interlace_fixmethod); -// printf("VModule::import_frame 1 [ilace] Compensating by using: '%s'\n",string); - - // Compensate for the said interlacing... - switch( interlace_fixmethod ) { - case ILACE_FIXMETHOD_NONE: - - break; - case ILACE_FIXMETHOD_UPONE: - out_y--; - break; - case ILACE_FIXMETHOD_DOWNONE: - out_y++; - break; - default: - printf("vmodule::importframe WARNING - unknown fix method for interlacing, no compensation in effect\n"); - } // file -> temp -> output if( !EQUIV(in_x, 0) || @@ -726,6 +687,7 @@ int VModule::render(VFrame *output, VEdit* previous_edit = 0; //printf("VModule::render %d %p %ld %d\n", __LINE__, current_edit, start_position_project, direction); + Plugin *transition = get_edl()->tracks->plugin_exists(transition_id); if( debug_render ) printf(" VModule::render %d %d %jd %s transition=%p opengl=%d current_edit=%p output=%p\n", __LINE__, use_nudge, start_position_project, track->title, @@ -815,8 +777,14 @@ int VModule::render(VFrame *output, VDeviceX11 *x11_device = 0; if( use_opengl && renderengine && renderengine->video ) { x11_device = (VDeviceX11*)renderengine->video->get_output_base(); - if( !x11_device->can_mask(mask_position, keyframe_set) ) + if( !x11_device->can_mask(mask_position, keyframe_set) ) { + if( output->get_opengl_state() != VFrame::RAM ) { + int w = output->get_w(), h = output->get_h(); + x11_device->do_camera(output, output, + 0,0,w,h, 0,0,w,h); // copy to ram + } use_opengl = 0; + } } if( use_opengl && x11_device ) { x11_device->do_mask(output, mask_position, keyframe_set,