mask focus/pivot pt tweaks, set mask_track_id on update_project, ffmpeg cuda open...
authorGood Guy <good1.2guy@gmail.com>
Thu, 27 Jun 2019 00:25:30 +0000 (18:25 -0600)
committerGood Guy <good1.2guy@gmail.com>
Thu, 27 Jun 2019 00:25:30 +0000 (18:25 -0600)
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7 [new file with mode: 0644]
cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7 [new file with mode: 0644]

index 1439f72..99c395b 100644 (file)
@@ -2203,10 +2203,9 @@ int CWindowCanvas::do_mask_focus()
        CWindowMaskGUI *mask_gui = (CWindowMaskGUI*) gui->tool_panel->tool_gui;
        float cx = get_cursor_x(), cy = get_cursor_y();
        canvas_to_output(mwindow->edl, 0, cx, cy);
-       int v = mask_gui->focused ? 0 : 1;
        get_canvas()->unlock_window();
        mask_gui->lock_window("CWindowCanvas::do_mask_focus");
-       mask_gui->set_focused(v, cx, cy);
+       mask_gui->set_focused(1, cx, cy);
        mask_gui->unlock_window();
        get_canvas()->lock_window("CWindowCanvas::do_mask_focus");
        return 1;
index c9a84c4..295f5c1 100644 (file)
@@ -2517,12 +2517,14 @@ void CWindowMaskGUI::create_objects()
        y += title_bar->get_h() + margin;
 
        add_subwindow(title = new BC_Title(x, y, "X:"));
-       focus_x = new CWindowCoord(this, x1, y, (float)0.0);
+       float cx = mwindow->edl->session->output_w / 2.f;
+       focus_x = new CWindowCoord(this, x1, y, cx);
        focus_x->create_objects();
        add_subwindow(focus = new CWindowMaskFocus(mwindow, this, del_x, y));
        y += focus_x->get_h() + margin;
        add_subwindow(title = new BC_Title(x, y, "Y:"));
-       focus_y = new CWindowCoord(this, x1, y, (float)0.0);
+       float cy = mwindow->edl->session->output_h / 2.f;
+       focus_y = new CWindowCoord(this, x1, y, cy);
        focus_y->create_objects();
        y += focus_x->get_h() + 2*margin;
        BC_Bar *bar;
@@ -2556,6 +2558,7 @@ int CWindowMaskGUI::close_event()
 
 void CWindowMaskGUI::done_event()
 {
+       if( mwindow->in_destructor ) return;
        int &solo_track_id = mwindow->edl->local_session->solo_track_id;
        if( solo_track_id >= 0 ) {
                solo_track_id = -1;
index d752b91..323243a 100644 (file)
@@ -3675,6 +3675,8 @@ void MWindow::update_project(int load_mode)
        if(debug) PRINT_TRACE
        cwindow->gui->lock_window("MWindow::update_project 2");
        cwindow->gui->timebar->update(0);
+       Track *track = cwindow->calculate_affected_track();
+       cwindow->mask_track_id = track ? track->get_id() : -1;
        cwindow->gui->tool_panel->raise_tool();
        cwindow->gui->unlock_window();
 
diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7 b/cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7
new file mode 100644 (file)
index 0000000..df7bb46
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN a/libavcodec/h263dec.c b/libavcodec/h263dec.c
+--- a/libavcodec/h263dec.c
++++ b/libavcodec/h263dec.c
+@@ -684,7 +684,7 @@ frame_end:
+     if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4)
+         ff_mpeg4_frame_end(avctx, buf, buf_size);
+-    if (!s->divx_packed && avctx->hwaccel)
++    if (s->divx_packed && avctx->hwaccel)
+         ff_thread_finish_setup(avctx);
+     av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type);
diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7 b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7
new file mode 100644 (file)
index 0000000..df7bb46
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN a/libavcodec/h263dec.c b/libavcodec/h263dec.c
+--- a/libavcodec/h263dec.c
++++ b/libavcodec/h263dec.c
+@@ -684,7 +684,7 @@ frame_end:
+     if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4)
+         ff_mpeg4_frame_end(avctx, buf, buf_size);
+-    if (!s->divx_packed && avctx->hwaccel)
++    if (s->divx_packed && avctx->hwaccel)
+         ff_thread_finish_setup(avctx);
+     av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type);