undo/redo mixer, freds vp9, next/prev kfrm, ruleof3rds
authorGood Guy <[email protected]>
Wed, 22 Nov 2017 19:23:49 +0000 (12:23 -0700)
committerGood Guy <[email protected]>
Wed, 22 Nov 2017 19:23:49 +0000 (12:23 -0700)
36 files changed:
cinelerra-5.1/Cinelerra_factory
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/cinelerra/autos.C
cinelerra-5.1/cinelerra/editpopup.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/mwindowmove.C
cinelerra-5.1/cinelerra/pluginset.C
cinelerra-5.1/cinelerra/pluginset.h
cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1280x720_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1280x720_24or25or30fps.webm
cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.webm [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.mkv [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.webm [new file with mode: 0644]
cinelerra-5.1/guicast/bcfilebox.C

index 3cc787ad9dabbc3e7a910a97dedbb0917da07263..05acba1a7200b023e6d71b3dbd15248e70e88098 100644 (file)
@@ -81,3 +81,6 @@
 <KEYFRAME TITLE="gear360 sideways 4k"><SPHERECAM ENABLED_0=1 FOV_0=192 CENTER_X_0=2.530000e+01 CENTER_Y_0=5.129998e+01 ROTATE_X_0=100 ROTATE_Y_0=50 ROTATE_Z_0=90 ENABLED_1=1 FOV_1=1.917000e+02 CENTER_X_1=7.499998e+01 CENTER_Y_1=5.109998e+01 ROTATE_X_1=5.019999e+01 ROTATE_Y_1=4.980000e+01 ROTATE_Z_1=-8.889997e+01 FEATHER=1 DRAW_GUIDES=0 MODE=1></KEYFRAME>
 <KEYFRAME TITLE="gear360 sideways, 7k"><SPHERECAM ENABLED_0=1 FOV_0=194 CENTER_X_0=2.520000e+01 CENTER_Y_0=5.139998e+01 ROTATE_X_0=50 ROTATE_Y_0=50 ROTATE_Z_0=90 ENABLED_1=1 FOV_1=1.946000e+02 CENTER_X_1=7.499999e+01 CENTER_Y_1=5.079997e+01 ROTATE_X_1=0 ROTATE_Y_1=4.990000e+01 ROTATE_Z_1=-8.900002e+01 FEATHER=1 DRAW_GUIDES=0 MODE=1></KEYFRAME>
 </PLUGIN>
+<PLUGIN TITLE=F_drawgrid>
+<KEYFRAME TITLE=rule_of_3rds>&lt;F_DRAWGRID x=-1 y=-1 width=iw/3 w=iw/3 height=ih/3 h=ih/3 color=invert c=invert thickness=2 t=2&gt;</KEYFRAME>
+</PLUGIN>
index 3be6dadc898ebe5a151cd34b386abf6c7f87351b..a825fbc3a568da50763015468c3bf371522da03a 100644 (file)
@@ -449,9 +449,13 @@ tags:
 $(OBJDIR)/%.o:         %.C
        $(CXX) `cat $(OBJDIR)/c_flags` -DMSGQUAL=$* -c $< -o $@
 
+$(OBJDIR)/fileexr.o:   fileexr.C
+       $(CXX) `cat $(OBJDIR)/c_flags` -Wno-deprecated -DMSGQUAL=$* -c $< -o $@
+
 $(OBJDIR)/sha1.o:      sha1.C sha1.h
        $(CXX) `cat $(OBJDIR)/c_flags` -O3 -c $< -o $@
 
+
 $(DCRAW): dcraw.C
        $(CXX) `cat $(OBJDIR)/c_flags` $(if $(findstring -ggdb,$(CFLAGS)),,-O4) -DNODEPS -DLOCALTIME \
                -Wno-misleading-indentation -Wno-sign-compare -Wno-narrowing dcraw.C -c -o $*.o
index b895a9049085c03a99db492cc171c90ace8fa2c3..49a8ea1cdc6674f8afd5c6b07cb635298349dad7 100644 (file)
@@ -703,22 +703,14 @@ Auto* Autos::autoof(int64_t position)
 Auto* Autos::nearest_before(int64_t position)
 {
        Auto *current;
-
-       for(current = last; current && current->position >= position; current = PREVIOUS)
-       { ; }
-
-
+       for(current = last; current && current->position >= position; current = PREVIOUS);
        return current;     // return 0 on failure
 }
 
 Auto* Autos::nearest_after(int64_t position)
 {
        Auto *current;
-
-       for(current = first; current && current->position <= position; current = NEXT)
-       { ; }
-
-
+       for(current = first; current && current->position <= position; current = NEXT);
        return current;     // return 0 on failure
 }
 
index 5c8291a87033695c54628c552f5d32e40f1e1e4a..df0be8dc2cec579bb268b44956386c24c6fb6367 100644 (file)
@@ -384,9 +384,8 @@ int SnapshotMenuItem::handle_event()
        static const char *exts[] = { "png", "jpg", "tif" };
        time_t tt;     time(&tt);
        struct tm tm;  localtime_r(&tt,&tm);
-       sprintf(filename,"%s/snap_%04d%02d%02d-%02d%02d%02d.%s",
-               preferences->snapshot_path,
-               1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday,
+       snprintf(filename,sizeof(filename),"%s/snap_%04d%02d%02d-%02d%02d%02d.%s",
+               preferences->snapshot_path, 1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday,
                tm.tm_hour,tm.tm_min,tm.tm_sec, exts[mode]);
        int fw = edl->get_w(), fh = edl->get_h();
        int fcolor_model = edl->session->color_model;
index 426421c3bcc2571de9badb2c74ec1e27a1d340f4..0bfd3770b58e6fbbc4090e5cbe096f0eab411aa9 100644 (file)
@@ -1272,6 +1272,17 @@ void MWindow::close_mixers()
        }
 }
 
+void MWindow::open_mixers()
+{
+       for( int i=0; i<edl->mixers.size(); ++i ) {
+               Mixer *mixer = edl->mixers[i];
+               ZWindow *zwindow = get_mixer(mixer);
+               zwindow->set_title(mixer->title);
+               zwindow->start();
+       }
+        refresh_mixers();
+}
+
 int MWindow::select_zwindow(ZWindow *zwindow)
 {
        int ret = 0, n = zwindows.number_of(zwindow);
@@ -1350,7 +1361,6 @@ void MWindow::tile_mixers()
        }
 }
 
-
 void MWindow::init_cache()
 {
        audio_cache = new CICache(preferences);
index 271a4f89e5be0e87dc98247fca30bef618db35ef..19d9436ae7b8959fd3c112a680828216ad7290e9 100644 (file)
@@ -209,6 +209,7 @@ public:
        void refresh_mixers();
        void stop_mixers();
        void close_mixers();
+       void open_mixers();
        ZWindow *get_mixer(Mixer *&mixer);
        void del_mixer(ZWindow *zwindow);
        int mixer_track_active(Track *track);
@@ -248,6 +249,7 @@ public:
        int move_right(int64_t distance = 0);
        void move_up(int64_t distance = 0);
        void move_down(int64_t distance = 0);
+       int find_selection(double position, int scroll_display = 0);
 
 // seek to labels
 // shift_down must be passed by the caller because different windows call
@@ -257,6 +259,8 @@ public:
 // seek to edit handles
        int next_edit_handle(int shift_down);
        int prev_edit_handle(int shift_down);
+// seek to keyframes
+       int nearest_plugin_keyframe(int shift_down, int dir);
 // offset is pixels to add to track_start
        void trackmovement(int offset, int pane_number);
 // view_start is pixels
index 84232955d9aa2bd44bc37325f03884e7177d2bba..b7fcd9dda0ca1262aa0228c246b2b1bedd9b7b34 100644 (file)
@@ -74,6 +74,7 @@
 #include "vwindow.h"
 #include "vwindowgui.h"
 #include "zoombar.h"
+#include "zwindow.h"
 #include "automation.h"
 #include "maskautos.h"
 
@@ -1874,8 +1875,9 @@ void MWindow::redo_entry(BC_WindowBase *calling_window_gui)
 {
        calling_window_gui->unlock_window();
        stop_playback(0);
+       close_mixers();
 
-       cwindow->gui->lock_window("MWindow::redo_entry");
+       cwindow->gui->lock_window("MWindow::redo_entry 1");
        for( int i = 0; i < vwindows.size(); i++ ) {
                if( vwindows.get(i)->is_running() ) {
                        if( calling_window_gui != vwindows.get(i)->gui ) {
@@ -1883,23 +1885,19 @@ void MWindow::redo_entry(BC_WindowBase *calling_window_gui)
                        }
                }
        }
-       gui->lock_window();
+       gui->lock_window("MWindow::redo_entry 3");
 
        undo->redo();
 
        save_backup();
+       restart_brender();
        update_plugin_states();
        update_plugin_guis();
-       awindow->gui->async_update_assets();
-       restart_brender();
+
        gui->update(1, 2, 1, 1, 1, 1, 1);
+       gui->unlock_window();
        cwindow->update(1, 1, 1, 1, 1);
-
-       if( calling_window_gui != cwindow->gui )
-               cwindow->gui->unlock_window();
-       if( calling_window_gui != gui )
-               gui->unlock_window();
-
+       cwindow->gui->unlock_window();
 
        for( int i = 0; i < vwindows.size(); i++ ) {
                if( vwindows.get(i)->is_running() ) {
@@ -1909,7 +1907,14 @@ void MWindow::redo_entry(BC_WindowBase *calling_window_gui)
                }
        }
 
+       if( calling_window_gui != gui )
+               gui->unlock_window();
+
+       open_mixers();
+       awindow->gui->async_update_assets();
+
        cwindow->refresh_frame(CHANGE_ALL);
+       calling_window_gui->lock_window("MWindow::redo_entry 4");
 }
 
 
@@ -2160,6 +2165,7 @@ void MWindow::undo_entry(BC_WindowBase *calling_window_gui)
 {
        calling_window_gui->unlock_window();
        stop_playback(0);
+       close_mixers();
 
        cwindow->gui->lock_window("MWindow::undo_entry 1");
        for( int i = 0; i < vwindows.size(); i++ ) {
@@ -2196,6 +2202,7 @@ void MWindow::undo_entry(BC_WindowBase *calling_window_gui)
 
        awindow->gui->async_update_assets();
 
+       open_mixers();
        cwindow->refresh_frame(CHANGE_ALL);
        calling_window_gui->lock_window("MWindow::undo_entry 4");
 }
index 8825e25d7e680b4167f85f064642273518710c39..613c0324a8c5033b5c23aba53b09efb643597a19 100644 (file)
@@ -1168,6 +1168,16 @@ int MWindowGUI::keypress_event()
                result = 1;
                break;
 
+       case 'k': case 'K':
+               if( alt_down() ) break;
+               unlock_window();
+               mbuttons->transport->handle_transport(STOP, 1, 0, 0);
+               lock_window("MWindowGUI::keypress_event 1");
+               mwindow->nearest_plugin_keyframe(shift_down(),
+                       !ctrl_down() ? PLAY_FORWARD : PLAY_REVERSE);
+               result = 1;
+               break;
+
        case '1': case '2': case '3': case '4':
        case '5': case '6': case '7': case '8':
                if( !alt_down() || shift_down() ) break;
index 0cd6e455d6778dc11389dcd7206f8776cbe90194..e86c6b76d0aaee9e024cf1562c50f00df263b56c 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "automation.h"
+#include "autos.h"
 #include "clip.h"
 #include "cplayback.h"
 #include "cwindow.h"
@@ -27,6 +28,7 @@
 #include "edits.h"
 #include "edl.h"
 #include "edlsession.h"
+#include "keyframe.h"
 #include "labels.h"
 #include "localsession.h"
 #include "maincursor.h"
 #include "patchbay.h"
 #include "playbackengine.h"
 #include "plugin.h"
+#include "pluginset.h"
 #include "resourcethread.h"
 #include "samplescroll.h"
 #include "theme.h"
 #include "trackcanvas.h"
 #include "tracks.h"
+#include "track.h"
 #include "transportque.h"
 #include "zoombar.h"
 
@@ -581,215 +585,136 @@ void MWindow::select_all()
 
 int MWindow::next_label(int shift_down)
 {
-       double cursor_position = edl->local_session->get_selectionstart(1);
-       Label *current = edl->labels->next_label(cursor_position);
-       double position = !current ? -1 : current->position;
-
+       double position = edl->local_session->get_selectionend(1);
+       double total_length = edl->tracks->total_length();
+       Label *current = edl->labels->next_label(position);
+       double new_position = current ? current->position : total_length;
 // last playback endpoints as fake label positions
        double playback_start = edl->local_session->playback_start;
        double playback_end = edl->local_session->playback_end;
-       if( playback_start > cursor_position && ( position < 0 || playback_start < position ) )
-               position = playback_start;
-       else if( playback_end > cursor_position && ( position < 0 || playback_end < position ) )
-               position = playback_end;
-
-       if( position >= 0 ) {
-               edl->local_session->set_selectionend(position);
-               if(!shift_down)
-                       edl->local_session->set_selectionstart(
-                               edl->local_session->get_selectionend(1));
-
-               update_plugin_guis();
-               TimelinePane *pane = gui->get_focused_pane();
-               if(edl->local_session->get_selectionend(1) >=
-                       (double)edl->local_session->view_start[pane->number] *
-                               edl->local_session->zoom_sample / edl->session->sample_rate +
-                               pane->canvas->time_visible() ||
-                       edl->local_session->get_selectionend(1) < (double)edl->local_session->view_start[pane->number] *
-                               edl->local_session->zoom_sample / edl->session->sample_rate) {
-                       samplemovement((int64_t)(edl->local_session->get_selectionend(1) *
-                               edl->session->sample_rate /
-                               edl->local_session->zoom_sample -
-                               pane->canvas->get_w() /
-                               2),
-                               pane->number);
-                       cwindow->update(1, 0, 0, 0, 0);
-               }
-               else
-               {
-                       gui->update_patchbay();
-                       gui->update_timebar(0);
-                       gui->hide_cursor(0);
-                       gui->draw_cursor(0);
-                       gui->zoombar->update();
-                       gui->flash_canvas(1);
-                       cwindow->update(1, 0, 0, 0, 1);
-               }
-       }
-       else
-       {
-               goto_end();
-       }
-       return 0;
+       if( playback_start > position && playback_start < new_position )
+               new_position = playback_start;
+       else if( playback_end > position && playback_end < new_position )
+               new_position = playback_end;
+       if( new_position > total_length )
+               new_position = total_length;
+       edl->local_session->set_selectionend(new_position);
+//printf("MWindow::next_edit_handle %d\n", shift_down);
+       if( !shift_down )
+               edl->local_session->set_selectionstart(new_position);
+       return find_selection(new_position);
 }
 
 int MWindow::prev_label(int shift_down)
 {
-       double cursor_position = edl->local_session->get_selectionstart(1);
-       Label *current = edl->labels->prev_label(cursor_position);
-       double position = !current ? -1 : current->position;
-
+       double position = edl->local_session->get_selectionstart(1);
+       Label *current = edl->labels->prev_label(position);
+       double new_position = current ? current->position : 0;
 // last playback endpoints as fake label positions
        double playback_start = edl->local_session->playback_start;
        double playback_end = edl->local_session->playback_end;
-       if( playback_end < cursor_position && ( position < 0 || playback_end > position ) )
-               position = playback_end;
-       else if( playback_start < cursor_position && ( position < 0 || playback_start > position ) )
-               position = playback_start;
-
-       if( position >= 0 ) {
-               edl->local_session->set_selectionstart(position);
-               if(!shift_down)
-                       edl->local_session->set_selectionend(edl->local_session->get_selectionstart(1));
-
-               update_plugin_guis();
-               TimelinePane *pane = gui->get_focused_pane();
-               if(edl->local_session->get_selectionstart(1) >= edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample / edl->session->sample_rate +
-                       pane->canvas->time_visible() ||
-                       edl->local_session->get_selectionstart(1) < edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample / edl->session->sample_rate ) {
-                       samplemovement((int64_t)(edl->local_session->get_selectionstart(1) *
-                               edl->session->sample_rate /
-                               edl->local_session->zoom_sample -
-                               pane->canvas->get_w() /
-                               2),
-                               pane->number);
-                       cwindow->update(1, 0, 0, 0, 0);
-               }
-               else
-// Don't scroll the display
-               {
-                       gui->update_patchbay();
-                       gui->update_timebar(0);
-                       gui->hide_cursor(0);
-                       gui->draw_cursor(0);
-                       gui->zoombar->update();
-                       gui->flash_canvas(1);
-                       cwindow->update(1, 0, 0, 0, 1);
-               }
-       }
-       else
-       {
-               goto_start();
-       }
-       return 0;
+       if( playback_end < position && playback_end > new_position )
+               new_position = playback_end;
+       else if( playback_start < position && playback_start > new_position )
+               new_position = playback_start;
+       if( new_position < 0 )
+               new_position = 0;
+       edl->local_session->set_selectionstart(new_position);
+//printf("MWindow::next_edit_handle %d\n", shift_down);
+       if( !shift_down )
+               edl->local_session->set_selectionend(new_position);
+       return find_selection(new_position);
 }
 
-
 int MWindow::next_edit_handle(int shift_down)
 {
        double position = edl->local_session->get_selectionend(1);
        double new_position = edl->next_edit(position);
-       if( new_position < edl->tracks->total_length() ) {
-               edl->local_session->set_selectionend(new_position);
+       double total_length = edl->tracks->total_length();
+       if( new_position >= total_length )
+               new_position = total_length;
+       edl->local_session->set_selectionend(new_position);
 //printf("MWindow::next_edit_handle %d\n", shift_down);
-               if(!shift_down)
-                       edl->local_session->set_selectionstart(
-                               edl->local_session->get_selectionend(1));
-
-               update_plugin_guis();
-               TimelinePane *pane = gui->get_focused_pane();
-               if(edl->local_session->get_selectionend(1) >=
-                       (double)edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample /
-                       edl->session->sample_rate +
-                       pane->canvas->time_visible() ||
-                       edl->local_session->get_selectionend(1) < (double)edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample /
-                       edl->session->sample_rate)
-               {
-                       samplemovement((int64_t)(edl->local_session->get_selectionend(1) *
-                               edl->session->sample_rate /
-                               edl->local_session->zoom_sample -
-                               pane->canvas->get_w() /
-                               2),
-                               pane->number);
-                       cwindow->update(1, 0, 0, 0, 0);
-               }
-               else
-               {
-                       gui->update_patchbay();
-                       gui->update_timebar(0);
-                       gui->hide_cursor(0);
-                       gui->draw_cursor(0);
-                       gui->zoombar->update();
-                       gui->flash_canvas(1);
-                       cwindow->update(1, 0, 0, 0, 1);
-               }
-       }
-       else
-       {
-               goto_end();
-       }
-       return 0;
+       if( !shift_down )
+               edl->local_session->set_selectionstart(new_position);
+       return find_selection(new_position);
 }
 
 int MWindow::prev_edit_handle(int shift_down)
 {
        double position = edl->local_session->get_selectionstart(1);
        double new_position = edl->prev_edit(position);
-
-       if(new_position != -1) {
-               edl->local_session->set_selectionstart(new_position);
-//printf("MWindow::next_edit_handle %d\n", shift_down);
-               if(!shift_down)
-                       edl->local_session->set_selectionend(edl->local_session->get_selectionstart(1));
-
-               update_plugin_guis();
-// Scroll the display
-               TimelinePane *pane = gui->get_focused_pane();
-               if(edl->local_session->get_selectionstart(1) >= edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample /
-                       edl->session->sample_rate +
-                       pane->canvas->time_visible()
-               ||
-                       edl->local_session->get_selectionstart(1) < edl->local_session->view_start[pane->number] *
-                       edl->local_session->zoom_sample /
-                       edl->session->sample_rate)
-               {
-                       samplemovement((int64_t)(edl->local_session->get_selectionstart(1) *
-                               edl->session->sample_rate /
-                               edl->local_session->zoom_sample -
-                               pane->canvas->get_w() /
-                               2),
-                               pane->number);
-                       cwindow->update(1, 0, 0, 0, 0);
-               }
-               else
-// Don't scroll the display
-               {
-                       gui->update_patchbay();
-                       gui->update_timebar(0);
-                       gui->hide_cursor(0);
-                       gui->draw_cursor(0);
-                       gui->zoombar->update();
-                       gui->flash_canvas(1);
-                       cwindow->update(1, 0, 0, 0, 1);
+       if( new_position < 0 )
+               new_position = 0;
+       edl->local_session->set_selectionstart(new_position);
+       if( !shift_down )
+               edl->local_session->set_selectionend(new_position);
+       return find_selection(new_position);
+}
+
+int MWindow::nearest_plugin_keyframe(int shift_down, int dir)
+{
+       KeyFrame *keyframe = 0;
+       double start = edl->local_session->get_selectionstart(1);
+       double end = edl->local_session->get_selectionend(1);
+       double position = dir == PLAY_FORWARD ? end : start, new_position = 0;
+       for( Track *track=edl->tracks->first; track; track=track->next ) {
+               if( !track->record ) continue;
+               for( int i=0; i<track->plugin_set.size(); ++i ) {
+                       PluginSet *plugin_set = track->plugin_set[i];
+                       int64_t pos = track->to_units(position, 0);
+                       KeyFrame *key = plugin_set->nearest_keyframe(pos, dir);
+                       if( !key ) continue;
+                       double key_position = track->from_units(key->position);
+                       if( keyframe && (dir == PLAY_FORWARD ?
+                               key_position >= new_position :
+                               new_position >= key_position ) ) continue;
+                       keyframe = key;  new_position = key_position;
                }
        }
-       else
-       {
-               goto_start();
-       }
-       return 0;
-}
-
-
 
+       new_position = keyframe ?
+               keyframe->autos->track->from_units(keyframe->position) :
+               dir == PLAY_FORWARD ? edl->tracks->total_length() : 0;
 
+       if( !shift_down )
+               start = end = new_position;
+       else if( dir == PLAY_FORWARD )
+               end = new_position;
+       else
+               start = new_position;
 
+       edl->local_session->set_selectionstart(start);
+       edl->local_session->set_selectionend(end);
+       return find_selection(new_position);
+}
 
+int MWindow::find_selection(double position, int scroll_display)
+{
+       update_plugin_guis();
+       TimelinePane *pane = gui->get_focused_pane();
+       double pixel_zoom = (double)edl->session->sample_rate / edl->local_session->zoom_sample;
+       if( !scroll_display ) {
+               double timeline_start = edl->local_session->view_start[pane->number] / pixel_zoom;
+               double timeline_end = timeline_start + pane->canvas->time_visible();
+               if( position >= timeline_end || position < timeline_start )
+                       scroll_display = 1;
+       }
+       if( scroll_display ) {
+               samplemovement((int64_t)(position * pixel_zoom - pane->canvas->get_w() / 2), pane->number);
+               cwindow->update(1, 0, 0, 0, 0);
+       }
+       else {
+               gui->update_patchbay();
+               gui->update_timebar(0);
+               gui->hide_cursor(0);
+               gui->draw_cursor(0);
+               gui->zoombar->update();
+               gui->flash_canvas(1);
+               cwindow->update(1, 0, 0, 0, 1);
+       }
+       return 0;
+}
 
 
 int MWindow::expand_y()
@@ -876,4 +801,3 @@ void MWindow::split_y()
        gui->resource_thread->start_draw();
 }
 
-
index 2894aed34cb6e8cbb5b623ac6439e8f0ca366986..8061289ca871d4192ec482e5a16ea1b080a5e518 100644 (file)
@@ -28,6 +28,7 @@
 #include "pluginautos.h"
 #include "pluginset.h"
 #include "track.h"
+#include "transportque.inc"
 
 #include <string.h>
 
@@ -171,6 +172,15 @@ Edit* PluginSet::insert_edit_after(Edit *previous_edit)
        return (Edit*)current;
 }
 
+KeyFrame *PluginSet::nearest_keyframe(int64_t pos, int dir)
+{
+       Plugin *plugin = (Plugin*)editof(pos, dir, 0);
+       if( !plugin ) return 0;
+       KeyFrame *keyframe = (KeyFrame *)(dir == PLAY_FORWARD ?
+               plugin->keyframes->nearest_after(pos) :
+               plugin->keyframes->nearest_before(pos));
+       return keyframe;
+}
 
 int PluginSet::get_number()
 {
index 8170db2ec1482687738f68f3e15975ff0c0d7526..f072e62b64e05dc32fefa10793d85f2703bde202 100644 (file)
@@ -61,6 +61,7 @@ public:
        int64_t plugin_change_duration(int64_t input_position,
                int64_t input_length,
                int reverse);
+       KeyFrame *nearest_keyframe(int64_t pos, int dir);
        void shift_effects(int64_t start, int64_t length, int edit_autos);
        Edit* insert_edit_after(Edit *previous_edit);
        Edit* create_edit();
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..9aa2d07
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 320x240 (24, 25 or 30 frames per second)
+bitrate=150k
+minrate=75k
+maxrate=218k
+tile-columns=0
+g=240
+threads=2
+quality=good
+crf=37
+speed=1
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_0320x240_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..6c9a38a
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 320x240 (24, 25 or 30 frames per second)
+bitrate=150k
+minrate=75k
+maxrate=218k
+tile-columns=0
+g=240
+threads=2
+quality=good
+crf=37
+speed=1
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..f32ccc3
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x360 (24, 25 or 30 frames per second)
+bitrate=276k
+minrate=138k
+maxrate=400k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=36
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_0640x360_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..000fab3
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x360 (24, 25 or 30 frames per second)
+bitrate=276k
+minrate=138k
+maxrate=400k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=36
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..615a32b
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x480 (Low Quality, 24, 25 or 30 frames per second)
+bitrate=512k
+minrate=256k
+maxrate=742k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=34
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_0640x480_lowQuality_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..57353c1
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x480 (Low Quality, 24, 25 or 30 frames per second)
+bitrate=512k
+minrate=256k
+maxrate=742k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=34
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..46c806b
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x480 (Medium Quality, 24, 25 or 30 frames per second)
+bitrate=750k
+minrate=375k
+maxrate=1088k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=33
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_0640x480_mediumQuality_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..169c4ae
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 640x480 (Medium Quality, 24, 25 or 30 frames per second)
+bitrate=750k
+minrate=375k
+maxrate=1088k
+tile-columns=1
+g=240
+threads=4
+quality=good
+crf=33
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1280x720_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_1280x720_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..41dab1c
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1280x720 (24, 25 or 30 frames per second)
+bitrate=1024k
+minrate=512k
+maxrate=1485k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=32
+speed=4
index d94f18a95ea5d359005d40f0bde7eb0573bac21e..c05b7294fdf421eaaa7de3ac5e464e7ae612d3fb 100644 (file)
@@ -1,13 +1,14 @@
 webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1280x720 (24, 25 or 30 frames per second)
 bitrate=1024k
 minrate=512k
 maxrate=1485k
-crf=32
 tile-columns=2
-# gop can have an adverse affect on seeks
 g=240
 threads=8
 quality=good
+crf=32
 speed=4
-# Frederic Roenitz credited for opts and manual work
-# for more information see Feature5.pdf section 3.4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.mkv
new file mode 100644 (file)
index 0000000..08fd094
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1280x720 (50 or 60 frames per second)
+bitrate=1800k
+minrate=900k
+maxrate=2610k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=32
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_1280x720_50or60fps.webm
new file mode 100644 (file)
index 0000000..b32a239
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1280x720 (50 or 60 frames per second)
+bitrate=1800k
+minrate=900k
+maxrate=2610k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=32
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..cc1fc62
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1920x1080 (24, 25 or 30 frames per second)
+bitrate=1800k
+minrate=900k
+maxrate=2610k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=31
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..14c7453
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1920x1080 (24, 25 or 30 frames per second)
+bitrate=1800k
+minrate=900k
+maxrate=2610k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=31
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.mkv
new file mode 100644 (file)
index 0000000..2c8423a
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1920x1080 (50 or 60 frames per second)
+bitrate=3000k
+minrate=1500k
+maxrate=4350k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=31
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_50or60fps.webm
new file mode 100644 (file)
index 0000000..bbbecc9
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 1920x1080 (50 or 60 frames per second)
+bitrate=3000k
+minrate=1500k
+maxrate=4350k
+tile-columns=2
+g=240
+threads=8
+quality=good
+crf=31
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..278df02
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 2560x1440 (24, 25 or 30 frames per second)
+bitrate=6000k
+minrate=3000k
+maxrate=8700k
+tile-columns=3
+g=240
+threads=16
+quality=good
+crf=24
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..0372d70
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 2560x1440 (24, 25 or 30 frames per second)
+bitrate=6000k
+minrate=3000k
+maxrate=8700k
+tile-columns=3
+g=240
+threads=16
+quality=good
+crf=24
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.mkv
new file mode 100644 (file)
index 0000000..cb617ef
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 2560x1440 (50 or 60 frames per second)
+bitrate=9000k
+minrate=4500k
+maxrate=13050k
+tile-columns=3
+g=240
+threads=16
+quality=good
+crf=24
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_2560x1440_50or60fps.webm
new file mode 100644 (file)
index 0000000..4f97d4c
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 2560x1440 (50 or 60 frames per second)
+bitrate=9000k
+minrate=4500k
+maxrate=13050k
+tile-columns=3
+g=240
+threads=16
+quality=good
+crf=24
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.mkv
new file mode 100644 (file)
index 0000000..1d8aba5
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 3840x2160 (24, 25 or 30 frames per second)
+bitrate=12000k
+minrate=6000k
+maxrate=17400k
+tile-columns=4
+g=240
+threads=24
+quality=good
+crf=15
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_24or25or30fps.webm
new file mode 100644 (file)
index 0000000..8130e83
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 3840x2160 (24, 25 or 30 frames per second)
+bitrate=12000k
+minrate=6000k
+maxrate=17400k
+tile-columns=4
+g=240
+threads=24
+quality=good
+crf=15
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.mkv b/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.mkv
new file mode 100644 (file)
index 0000000..8c996cb
--- /dev/null
@@ -0,0 +1,14 @@
+matroska libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 3840x2160 (50 or 60 frames per second)
+bitrate=18000k
+minrate=9000k
+maxrate=26100k
+tile-columns=4
+g=240
+threads=24
+quality=good
+crf=15
+speed=4
diff --git a/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.webm b/cinelerra-5.1/ffmpeg/video/vp9_3840x2160_50or60fps.webm
new file mode 100644 (file)
index 0000000..8b90345
--- /dev/null
@@ -0,0 +1,14 @@
+webm libvpx-vp9
+# 20171119-2100
+# based on https://developers.google.com/media/vp9/settings/vod/
+# for explanations see Feature5.pdf section 3
+# 3840x2160 (50 or 60 frames per second)
+bitrate=18000k
+minrate=9000k
+maxrate=26100k
+tile-columns=4
+g=240
+threads=24
+quality=good
+crf=15
+speed=4
index 212956b83a9050a76496559cfb22e9264f4fb064..7ca7e4ab8962428b933dbcee3b05ba9f84d3f9c2 100644 (file)
@@ -683,9 +683,7 @@ int BC_FileBox::get_listbox_w()
 
 int BC_FileBox::get_listbox_h(int y)
 {
-       int result = get_h() -
-               y -
-               h_padding;
+       int result = get_h() - y - h_padding - 10;
        if(want_directory)
                result -= BC_WindowBase::get_resources()->dirbox_margin;
        else