From: Good Guy Date: Sun, 9 Jun 2019 00:13:14 +0000 (-0600) Subject: mask mousewheel segv bug, mask opengl sw fallback read to ram, fix tiff config withou... X-Git-Tag: 2019-08~38 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=abf5c6bb4dec2c2d03df2872e1d337e3905b3619;p=goodguy%2Fcinelerra.git mask mousewheel segv bug, mask opengl sw fallback read to ram, fix tiff config without webp --- diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 0ee1d675..af778e59 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -2018,13 +2018,21 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, SubMask *mask = gui->mask_keyframe->get_submask(mwindow->edl->session->cwindow_mask); ArrayList &mask_points = mask->points; #endif - MaskPoint *point = mask_points.values[gui->affected_point]; - gui->center_x = point->x; - gui->center_y = point->y; - gui->control_in_x = point->control_x1; - gui->control_in_y = point->control_y1; - gui->control_out_x = point->control_x2; - gui->control_out_y = point->control_y2; + int k = gui->affected_point; + if( k >= 0 && k < mask_points.size() ) { + MaskPoint *point = mask_points.values[k]; + gui->center_x = point->x; + gui->center_y = point->y; + gui->control_in_x = point->control_x1; + gui->control_in_y = point->control_y1; + gui->control_out_x = point->control_x2; + gui->control_out_y = point->control_y2; + } + else { + gui->center_x = gui->center_y = 0; + gui->control_in_x = gui->control_in_y = 0; + gui->control_out_x = gui->control_out_y = 0; + } gui->tool_panel->raise_window(); } diff --git a/cinelerra-5.1/cinelerra/virtualvnode.C b/cinelerra-5.1/cinelerra/virtualvnode.C index 20efff42..ba2aae69 100644 --- a/cinelerra-5.1/cinelerra/virtualvnode.C +++ b/cinelerra-5.1/cinelerra/virtualvnode.C @@ -333,17 +333,21 @@ void VirtualVNode::render_mask(VFrame *output_temp, return; } */ - if(use_opengl) { - if( !((VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver())->can_mask( - start_position_project, keyframe_set) ) + VDeviceX11 *x11_device = 0; + if( use_opengl ) { + x11_device = (VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver(); + if( !x11_device->can_mask(start_position_project, keyframe_set) ) { + if( output_temp->get_opengl_state() != VFrame::RAM ) { + int w = output_temp->get_w(), h = output_temp->get_h(); + x11_device->do_camera(output_temp, output_temp, + 0,0,w,h, 0,0,w,h); // copy to ram + } use_opengl = 0; - + } } - if(use_opengl) { - ((VDeviceX11*)((VirtualVConsole*)vconsole)->get_vdriver())->do_mask( - output_temp, start_position_project, keyframe_set, + if( use_opengl ) + x11_device->do_mask(output_temp, start_position_project, keyframe_set, keyframe, keyframe); - } else { // Revert to software masker->do_mask(output_temp, start_position_project, diff --git a/cinelerra-5.1/cinelerra/vmodule.C b/cinelerra-5.1/cinelerra/vmodule.C index bdf0c7d8..1c32c3fc 100644 --- a/cinelerra-5.1/cinelerra/vmodule.C +++ b/cinelerra-5.1/cinelerra/vmodule.C @@ -815,8 +815,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, diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 39d93f6a..046a560b 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -53,6 +53,7 @@ unpack_xz=tar -xJf $(1) bld_depends=$(if $(ver_$(1)),$(call pkg-built,$(1))) bld_path=$(ver_$(1))/$(2) if_pkg=$(if $(ver_$(1)),$(2)) +if_npkg=$(if $(ver_$(1)),,$(2)) inc_path=$(call if_pkg,$(1),$(inc_$(1))) ld_path=$(call if_pkg,$(1),-L$(call bld_path,$(1),$(2)) $(lib_$(1))) @@ -214,7 +215,7 @@ opencv.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF openexr.cfg_vars?=LD_LIBRARY_PATH=$(call bld_path,ilmbase,usr/lib) openexr.cfg_params?=--enable-shared=no --with-ilmbase-prefix=$(call bld_path,ilmbase,usr) speech_tools.mak_params?=-j1 -tiff.cfg_params+= --enable-shared=no --disable-zstd +tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_npkg,libwebp,--without-webp) twolame.cfg_params?=--enable-shared=no x264.cfg_params?= --enable-static --enable-pic x265.cfg_vars?=$(call cmake_config,source)