mask mousewheel segv bug, mask opengl sw fallback read to ram, fix tiff config withou...
authorGood Guy <good1.2guy@gmail.com>
Sun, 9 Jun 2019 00:13:14 +0000 (18:13 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 9 Jun 2019 00:13:14 +0000 (18:13 -0600)
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/virtualvnode.C
cinelerra-5.1/cinelerra/vmodule.C
cinelerra-5.1/thirdparty/Makefile

index 0ee1d6751906ec6a4992c6feaf4c90ade928c9a5..af778e598350e08dc69eb829a6578edc10bf7496 100644 (file)
@@ -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<MaskPoint*> &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();
        }
 
index 20efff4268d4adbe0b535bf14ded81757415ce60..ba2aae69115fb4991707a685266702fbeb18ece8 100644 (file)
@@ -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,
index bdf0c7d8f729d5523d346696f31e6abe6778f835..1c32c3fcdd89b4671ba139192f66380e0c0b91d4 100644 (file)
@@ -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,
index 39d93f6ad52065cdc4cafc3f717da626890bde81..046a560b44cbc6b28d662ff607ff47b6167ea4e3 100644 (file)
@@ -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)