From: Good Guy Date: Fri, 13 Mar 2020 00:42:49 +0000 (-0600) Subject: fix audiospect ratio in scale per andrew, upgrade dav1d to 0.6.0, fix shapewipe black... X-Git-Tag: 2020-03~14 X-Git-Url: https://git.cinelerra-gg.org/?a=commitdiff_plain;h=21af3206552d78919dad02f83c08439bedb05c89;p=goodguy%2Fcinelerra.git fix audiospect ratio in scale per andrew, upgrade dav1d to 0.6.0, fix shapewipe black to white, mixer zoom tweaks and factoring, add zoom and tile mixers to mixer windows --- diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C index 17d5a42b..963c63d8 100644 --- a/cinelerra-5.1/cinelerra/canvas.C +++ b/cinelerra-5.1/cinelerra/canvas.C @@ -114,22 +114,6 @@ void Canvas::use_auxwindow(BC_WindowBase *aux) canvas_auxwindow = aux; } -void Canvas::use_cwindow() -{ - canvas_menu->use_cwindow(); - fullscreen_menu->use_cwindow(); -} - -void Canvas::use_rwindow() -{ - canvas_menu->use_rwindow(); -} - -void Canvas::use_vwindow() -{ - canvas_menu->use_vwindow(); -} - int Canvas::get_fullscreen() { return is_fullscreen; @@ -914,11 +898,6 @@ void CanvasFullScreenPopup::create_objects() add_item(new CanvasSubWindowItem(canvas)); } -void CanvasFullScreenPopup::use_cwindow() -{ - add_item(new CanvasPopupAuto(canvas)); -} - CanvasSubWindowItem::CanvasSubWindowItem(Canvas *canvas) : BC_MenuItem(_("Windowed"), "f", 'f') { @@ -976,26 +955,6 @@ void CanvasPopup::create_objects() submenu->add_submenuitem(new CanvasPopupSize(canvas, _("Zoom 400%"), 4.0)); } -void CanvasPopup::use_cwindow() -{ - add_item(new CanvasPopupAuto(canvas)); - add_item(new CanvasPopupResetCamera(canvas)); - add_item(new CanvasPopupResetProjector(canvas)); - add_item(new CanvasPopupCameraKeyframe(canvas)); - add_item(new CanvasPopupProjectorKeyframe(canvas)); - add_item(toggle_controls = new CanvasToggleControls(canvas)); -} - -void CanvasPopup::use_rwindow() -{ - add_item(new CanvasPopupResetTranslation(canvas)); -} - -void CanvasPopup::use_vwindow() -{ - add_item(new CanvasPopupRemoveSource(canvas)); -} - CanvasPopupAuto::CanvasPopupAuto(Canvas *canvas) : BC_MenuItem(_("Zoom Auto")) @@ -1074,7 +1033,6 @@ int CanvasPopupProjectorKeyframe::handle_event() } - CanvasPopupResetTranslation::CanvasPopupResetTranslation(Canvas *canvas) : BC_MenuItem(_("Reset translation")) { @@ -1087,25 +1045,6 @@ int CanvasPopupResetTranslation::handle_event() } - -CanvasToggleControls::CanvasToggleControls(Canvas *canvas) - : BC_MenuItem(calculate_text(canvas->get_cwindow_controls())) -{ - this->canvas = canvas; -} -int CanvasToggleControls::handle_event() -{ - canvas->toggle_controls(); - set_text(calculate_text(canvas->get_cwindow_controls())); - return 1; -} - -char* CanvasToggleControls::calculate_text(int cwindow_controls) -{ - return !cwindow_controls ? _("Show controls") : _("Hide controls"); -} - - CanvasFullScreenItem::CanvasFullScreenItem(Canvas *canvas) : BC_MenuItem(_("Fullscreen"), "f", 'f') { diff --git a/cinelerra-5.1/cinelerra/canvas.h b/cinelerra-5.1/cinelerra/canvas.h index 6b336052..dd3b574d 100644 --- a/cinelerra-5.1/cinelerra/canvas.h +++ b/cinelerra-5.1/cinelerra/canvas.h @@ -86,10 +86,6 @@ public: int cursor_enter_event_base(BC_WindowBase *caller); int button_press_event_base(BC_WindowBase *caller); int keypress_event(BC_WindowBase *caller); -// Use menu different options for different windows - void use_cwindow(); - void use_rwindow(); - void use_vwindow(); void use_auxwindow(BC_WindowBase *aux); // Provide canvas dimensions since a BC_Bitmap containing obsolete dimensions @@ -283,8 +279,6 @@ public: CanvasFullScreenPopup(Canvas *canvas); void create_objects(); - void use_cwindow(); - Canvas *canvas; }; @@ -303,12 +297,7 @@ public: ~CanvasPopup(); void create_objects(); - void use_cwindow(); - void use_rwindow(); - void use_vwindow(); - Canvas *canvas; - CanvasToggleControls *toggle_controls; }; class CanvasZoomSize : public BC_MenuItem @@ -377,15 +366,6 @@ public: Canvas *canvas; }; -class CanvasToggleControls : public BC_MenuItem -{ -public: - CanvasToggleControls(Canvas *canvas); - int handle_event(); - static char* calculate_text(int cwindow_controls); - Canvas *canvas; -}; - class CanvasFullScreenItem : public BC_MenuItem { public: @@ -402,7 +382,6 @@ public: Canvas *canvas; }; - class CanvasPopupRemoveSource : public BC_MenuItem { public: @@ -411,8 +390,4 @@ public: Canvas *canvas; }; - - - - #endif diff --git a/cinelerra-5.1/cinelerra/canvas.inc b/cinelerra-5.1/cinelerra/canvas.inc index 899c8e0a..06d02f75 100644 --- a/cinelerra-5.1/cinelerra/canvas.inc +++ b/cinelerra-5.1/cinelerra/canvas.inc @@ -38,7 +38,6 @@ class CanvasPopupResetCamera; class CanvasPopupResetProjector; class CanvasPopupCameraKeyframe; class CanvasPopupProjectorKeyframe; -class CanvasToggleControls; class CanvasFullScreenItem; class CanvasPopupResetTranslation; class CanvasPopupRemoveSource; diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 052a713d..c0d64487 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -163,8 +163,6 @@ void CWindowGUI::create_objects() canvas = new CWindowCanvas(mwindow, this); canvas->create_objects(mwindow->edl); - canvas->use_cwindow(); - add_subwindow(timebar = new CTimeBar(mwindow, this, @@ -972,6 +970,22 @@ void CWindowTransport::goto_end() gui->lock_window("CWindowTransport::goto_end 2"); } +CWindowCanvasToggleControls::CWindowCanvasToggleControls(CWindowCanvas *canvas) + : BC_MenuItem(calculate_text(canvas->get_controls())) +{ + this->canvas = canvas; +} +int CWindowCanvasToggleControls::handle_event() +{ + canvas->toggle_controls(); + set_text(calculate_text(canvas->get_controls())); + return 1; +} + +const char *CWindowCanvasToggleControls::calculate_text(int controls) +{ + return !controls ? _("Show controls") : _("Hide controls"); +} CWindowCanvas::CWindowCanvas(MWindow *mwindow, CWindowGUI *gui) @@ -985,6 +999,19 @@ CWindowCanvas::CWindowCanvas(MWindow *mwindow, CWindowGUI *gui) last_xscroll = 0; last_yscroll = 0; last_zoom = 0; + controls = 0; +} + +void CWindowCanvas::create_objects(EDL *edl) +{ + Canvas::create_objects(edl); + canvas_menu->add_item(new CanvasPopupAuto(this)); + canvas_menu->add_item(new CanvasPopupResetCamera(this)); + canvas_menu->add_item(new CanvasPopupResetProjector(this)); + canvas_menu->add_item(new CanvasPopupCameraKeyframe(this)); + canvas_menu->add_item(new CanvasPopupProjectorKeyframe(this)); + canvas_menu->add_item(controls = new CWindowCanvasToggleControls(this)); + fullscreen_menu->add_item(new CanvasPopupAuto(this)); } void CWindowCanvas::status_event() @@ -3373,7 +3400,7 @@ void CWindowCanvas::toggle_controls() gui->resize_event(gui->get_w(), gui->get_h()); } -int CWindowCanvas::get_cwindow_controls() +int CWindowCanvas::get_controls() { return mwindow->session->cwindow_controls; } diff --git a/cinelerra-5.1/cinelerra/cwindowgui.h b/cinelerra-5.1/cinelerra/cwindowgui.h index 14e0ebfe..fad225f3 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.h +++ b/cinelerra-5.1/cinelerra/cwindowgui.h @@ -27,6 +27,7 @@ #include "cpanel.inc" #include "ctimebar.inc" #include "cwindow.inc" +#include "cwindowgui.inc" #include "cwindowtool.inc" #include "editpanel.h" #include "floatauto.inc" @@ -42,15 +43,6 @@ #include "track.inc" #include "zoompanel.h" -class CWindowZoom; -class CWindowSlider; -class CWindowReset; -class CWindowDestination; -class CWindowMeters; -class CWindowTransport; -class CWindowCanvas; -class CWindowEditing; - #define AUTO_ZOOM N_("Auto") @@ -249,16 +241,6 @@ public: MWindow *mwindow; }; -// class CWindowDestination : public BC_PopupTextBox -// { -// public: -// CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y); -// ~CWindowDestination(); -// int handle_event(); -// CWindowGUI *cwindow; -// MWindow *mwindow; -// }; - class CWindowTransport : public PlayTransport { public: @@ -272,12 +254,21 @@ public: CWindowGUI *gui; }; +class CWindowCanvasToggleControls : public BC_MenuItem +{ +public: + CWindowCanvasToggleControls(CWindowCanvas *canvas); + int handle_event(); + static const char *calculate_text(int cwindow_controls); + CWindowCanvas *canvas; +}; class CWindowCanvas : public Canvas { public: CWindowCanvas(MWindow *mwindow, CWindowGUI *gui); + void create_objects(EDL *edl); void status_event(); void zoom_resize_window(float percentage); void update_zoom(int x, int y, float zoom); @@ -287,11 +278,8 @@ public: void zoom_auto(); int do_scroll(EDL *edl, float cursor_x, float cursor_y); int do_eyedrop(int &rerender, int button_press, int draw); - int do_mask(int &redraw, - int &rerender, - int button_press, - int cursor_motion, - int draw); + int do_mask(int &redraw, int &rerender, + int button_press, int cursor_motion, int draw); int do_mask_focus(); void draw_refresh(int flash = 1); int need_overlays(); @@ -305,10 +293,7 @@ public: int button_release_event(); int test_crop(int button_press, int &redraw); int test_bezier(int button_press, - int &redraw, - int &redraw_canvas, - int &rerender, - int do_camera); + int &redraw, int &redraw_canvas, int &rerender, int do_camera); int do_ruler(int draw, int motion, int button_press, int button_release); int test_zoom(int &redraw); void create_keyframe(int do_camera); @@ -324,12 +309,13 @@ public: void draw_outlines(int do_camera); void draw_crop(); void calculate_origin(); - void toggle_controls(); - int get_cwindow_controls(); int get_clear_color(); + int get_controls(); + void toggle_controls(); MWindow *mwindow; CWindowGUI *gui; + CWindowCanvasToggleControls *controls; float last_xscroll, last_yscroll; float last_zoom; }; diff --git a/cinelerra-5.1/cinelerra/cwindowgui.inc b/cinelerra-5.1/cinelerra/cwindowgui.inc index dfd864cc..dd482144 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.inc +++ b/cinelerra-5.1/cinelerra/cwindowgui.inc @@ -22,7 +22,14 @@ #ifndef CWINDOWGUI_INC #define CWINDOWGUI_INC - class CWindowGUI; +class CWindowEditing; +class CWindowMeters; +class CWindowZoom; +class CWindowSlider; +class CWindowReset; +class CWindowTransport; +class CWindowCanvasToggleControls; +class CWindowCanvas; #endif diff --git a/cinelerra-5.1/cinelerra/recordgui.inc b/cinelerra-5.1/cinelerra/recordgui.inc index d74fb4cc..e8a87742 100644 --- a/cinelerra-5.1/cinelerra/recordgui.inc +++ b/cinelerra-5.1/cinelerra/recordgui.inc @@ -22,8 +22,46 @@ #ifndef RECORDGUI_INC #define RECORDGUI_INC +class RecordGUIBatches; class RecordGUI; +class RecordGUISave; +class RecordGUICancel; +class RecordGUIOK; +class RecordGUIStartBatches; +class RecordGUIStopBatches; +class RecordGUIActivateBatch; +class RecordGUIStartOver; +class EndRecordThread; +class RecordStartoverThread; +class RecordBatch; +class RecordPath; +class RecordStart; +class RecordDuration; +class RecordSource; +class RecordNews; +class RecordGUIDropFrames; +class RecordGUIFillFrames; +class RecordGUIPowerOff; +class RecordGUICommCheck; +class RecordGUIDelaceItem; +class RecordGUIDeinterlace; +class RecordGUIMonitorVideo; +class RecordGUIMonitorAudio; +class RecordGUIAudioMeters; +class RecordGUINewBatch; +class RecordGUIDeleteBatch; +class RecordGUILabel; +class RecordGUIClearLabels; +class RecordStatusThread; +class RecordGUIFlash; +class RecordGUIModeMenu; +class RecordGUIModeTextBox; +class RecordGUIModeListBox; +class RecordGUIModeMenu; +class RecordGUIDCOffset; class RecordGUIDCOffsetText; +class RecordGUIReset; +class RecordGUIResetTranslation; class RecordMonitor; #endif diff --git a/cinelerra-5.1/cinelerra/recordmonitor.C b/cinelerra-5.1/cinelerra/recordmonitor.C index 9c4bf5ee..3a77feb6 100644 --- a/cinelerra-5.1/cinelerra/recordmonitor.C +++ b/cinelerra-5.1/cinelerra/recordmonitor.C @@ -354,7 +354,6 @@ void RecordMonitorGUI::create_objects() mwindow->theme->rmonitor_canvas_w, mwindow->theme->rmonitor_canvas_h); canvas->create_objects(0); - canvas->use_rwindow(); #ifdef HAVE_DVB if( driver == CAPTURE_DVB ) { @@ -780,6 +779,12 @@ RecordMonitorCanvas::~RecordMonitorCanvas() { } +void RecordMonitorCanvas::create_objects(EDL *edl) +{ + Canvas::create_objects(edl); + canvas_menu->add_item(new CanvasPopupResetTranslation(this)); +} + int RecordMonitorCanvas::get_output_w() { return record->default_asset->width; diff --git a/cinelerra-5.1/cinelerra/recordmonitor.h b/cinelerra-5.1/cinelerra/recordmonitor.h index 987d325b..a186c16e 100644 --- a/cinelerra-5.1/cinelerra/recordmonitor.h +++ b/cinelerra-5.1/cinelerra/recordmonitor.h @@ -221,6 +221,7 @@ public: Record *record, int x, int y, int w, int h); ~RecordMonitorCanvas(); + void create_objects(EDL *edl); void zoom_resize_window(float percentage); int button_press_event(); int button_release_event(); diff --git a/cinelerra-5.1/cinelerra/scale.C b/cinelerra-5.1/cinelerra/scale.C index 8c7b49c9..860c46fb 100644 --- a/cinelerra-5.1/cinelerra/scale.C +++ b/cinelerra-5.1/cinelerra/scale.C @@ -64,7 +64,7 @@ void ScaleThread::run() already_running = 1; constrain_ratio = mwindow->defaults->get("SCALECONSTRAIN", 0); scale_data = mwindow->defaults->get("SCALEDATA", 0); - auto_aspect = mwindow->defaults->get("AUDIOASPECT", 0); + auto_aspect = mwindow->defaults->get("AUTOASPECT", 0); offsets[0] = offsets[1] = offsets[2] = offsets[3] = 0; orig_dimension[0] = dimension[0] = mwindow->session->track_w; diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 1fb4ca21..eb42c679 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -237,7 +237,6 @@ void VWindowGUI::create_objects() canvas = new VWindowCanvas(mwindow, this); canvas->create_objects(mwindow->edl); - canvas->use_vwindow(); char vsplash_path[BCTEXTLEN]; int vsplash_len = sizeof(vsplash_path)-1; snprintf(vsplash_path, vsplash_len, "%s/vsplash.png", File::get_cindat_path()); @@ -774,6 +773,12 @@ VWindowCanvas::VWindowCanvas(MWindow *mwindow, VWindowGUI *gui) this->gui = gui; } +void VWindowCanvas::create_objects(EDL *edl) +{ + Canvas::create_objects(edl); + canvas_menu->add_item(new CanvasPopupRemoveSource(this)); +} + void VWindowCanvas::zoom_resize_window(float percentage) { EDL *edl = gui->vwindow->get_edl(); diff --git a/cinelerra-5.1/cinelerra/vwindowgui.h b/cinelerra-5.1/cinelerra/vwindowgui.h index 712565dd..6836293f 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.h +++ b/cinelerra-5.1/cinelerra/vwindowgui.h @@ -30,22 +30,12 @@ #include "meterpanel.h" #include "mwindow.inc" #include "playtransport.h" - #include "timebar.h" - #include "vtimebar.inc" #include "vwindow.inc" +#include "vwindowgui.inc" #include "zoompanel.h" -class VWindowZoom; -class VWindowSource; -class VWindowTransport; -class VWindowEditing; -class VWindowCanvas; -class VWindowMeters; -class VWindowInPoint; -class VWindowOutPoint; - class VWindowGUI : public BC_Window { public: @@ -110,11 +100,19 @@ public: }; +class VWindowCanvasPopupRemoveSource : public BC_MenuItem +{ +public: + VWindowCanvasPopupRemoveSource(Canvas *canvas); + int handle_event(); + Canvas *canvas; +}; + class VWindowCanvas : public Canvas { public: VWindowCanvas(MWindow *mwindow, VWindowGUI *gui); - + void create_objects(EDL *edl); void zoom_resize_window(float percentage); void draw_refresh(int flush = 1); int need_overlays(); diff --git a/cinelerra-5.1/cinelerra/vwindowgui.inc b/cinelerra-5.1/cinelerra/vwindowgui.inc index 24a51a06..a679fd54 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.inc +++ b/cinelerra-5.1/cinelerra/vwindowgui.inc @@ -23,5 +23,14 @@ #define VWINDOWGUI_INC class VWindowGUI; +class VWindowMeters; +class VWindowCanvasPopupRemoveSource; +class VWindowCanvas; +class VWindowEditing; +class VWindowZoom; +class VWindowSource; +class VWindowTransport; +class VWindowInPoint; +class VWindowOutPoint; #endif diff --git a/cinelerra-5.1/cinelerra/zwindow.C b/cinelerra-5.1/cinelerra/zwindow.C index 786ecc54..62a98cc0 100644 --- a/cinelerra-5.1/cinelerra/zwindow.C +++ b/cinelerra-5.1/cinelerra/zwindow.C @@ -188,6 +188,7 @@ ZWindow::ZWindow(MWindow *mwindow) highlighted = 0; title[0] = 0; zgui = 0; + zoom = 0; } ZWindow::~ZWindow() diff --git a/cinelerra-5.1/cinelerra/zwindow.h b/cinelerra-5.1/cinelerra/zwindow.h index 1c6f4ce0..5af5ccd8 100644 --- a/cinelerra-5.1/cinelerra/zwindow.h +++ b/cinelerra-5.1/cinelerra/zwindow.h @@ -84,6 +84,7 @@ public: int idx; int highlighted; char title[BCTEXTLEN]; + float zoom; }; #endif diff --git a/cinelerra-5.1/cinelerra/zwindowgui.C b/cinelerra-5.1/cinelerra/zwindowgui.C index 90cd349a..6f1f8132 100644 --- a/cinelerra-5.1/cinelerra/zwindowgui.C +++ b/cinelerra-5.1/cinelerra/zwindowgui.C @@ -194,6 +194,18 @@ int ZWindowGUI::draw_overlays() return 1; } + +ZWindowCanvasTileMixers::ZWindowCanvasTileMixers(ZWindowCanvas *canvas) + : BC_MenuItem(_("Tile Mixers")) +{ + this->canvas = canvas; +} +int ZWindowCanvasTileMixers::handle_event() +{ + canvas->mwindow->tile_mixers(); + return 1; +} + ZWindowCanvas::ZWindowCanvas(MWindow *mwindow, ZWindowGUI *gui, int x, int y, int w, int h) : Canvas(mwindow, gui, x,y, w,h, 0,0,0) @@ -202,6 +214,12 @@ ZWindowCanvas::ZWindowCanvas(MWindow *mwindow, ZWindowGUI *gui, this->gui = gui; } +void ZWindowCanvas::create_objects(EDL *edl) +{ + Canvas::create_objects(edl); + canvas_menu->add_item(new ZWindowCanvasTileMixers(this)); +} + void ZWindowCanvas::close_source() { gui->unlock_window(); @@ -214,7 +232,6 @@ void ZWindowCanvas::close_source() } } - void ZWindowCanvas::draw_refresh(int flush) { EDL *edl = gui->zwindow->edl; @@ -259,3 +276,33 @@ float ZWindowCanvas::get_auto_zoom() return zoom_x < zoom_y ? zoom_x : zoom_y; } +float ZWindowCanvas::get_zoom() +{ + return gui->zwindow->zoom; +} +void ZWindowCanvas::update_zoom(int x, int y, float zoom) +{ + gui->zwindow->zoom = zoom; +} + +void ZWindowCanvas::zoom_auto() +{ + EDL *edl = gui->zwindow->edl; + if( !edl ) edl = mwindow->edl; + set_zoom(edl, 0); +} + +void ZWindowCanvas::zoom_resize_window(float zoom) +{ + if( !zoom ) zoom = get_auto_zoom(); + EDL *edl = gui->zwindow->edl; + if( !edl ) edl = mwindow->edl; + int ow = edl->session->output_w, oh = edl->session->output_h; + int canvas_w, canvas_h; + calculate_sizes(mwindow->edl->get_aspect_ratio(), ow, oh, + zoom, canvas_w, canvas_h); + int new_w = canvas_w + xS(20); + int new_h = canvas_h + yS(20); + gui->resize_window(new_w, new_h); + gui->resize_event(new_w, new_h); +} diff --git a/cinelerra-5.1/cinelerra/zwindowgui.h b/cinelerra-5.1/cinelerra/zwindowgui.h index 32bfd035..5d9d292b 100644 --- a/cinelerra-5.1/cinelerra/zwindowgui.h +++ b/cinelerra-5.1/cinelerra/zwindowgui.h @@ -59,15 +59,28 @@ public: int highlighted; }; +class ZWindowCanvasTileMixers : public BC_MenuItem +{ +public: + ZWindowCanvasTileMixers(ZWindowCanvas *canvas); + int handle_event(); + ZWindowCanvas *canvas; +}; + class ZWindowCanvas : public Canvas { public: ZWindowCanvas(MWindow *mwindow, ZWindowGUI *gui, int x, int y, int w, int h); + void create_objects(EDL *edl); void close_source(); void draw_refresh(int flush = 1); float get_auto_zoom(); + float get_zoom(); + void update_zoom(int x, int y, float zoom); + void zoom_auto(); + void zoom_resize_window(float percentage); MWindow *mwindow; ZWindowGUI *gui; diff --git a/cinelerra-5.1/cinelerra/zwindowgui.inc b/cinelerra-5.1/cinelerra/zwindowgui.inc index 1fcb5d0c..815605fd 100644 --- a/cinelerra-5.1/cinelerra/zwindowgui.inc +++ b/cinelerra-5.1/cinelerra/zwindowgui.inc @@ -23,5 +23,7 @@ #define __ZWINDOWGUI_INC__ class ZWindowGUI; +class ZWindowCanvasTileMixers; +class ZWindowCanvas; #endif diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index ee75006c..f10af67e 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -415,7 +415,7 @@ PKG_3RD([libaom],[auto], [ usr/local/include ]) PKG_3RD([dav1d],[auto], - [dav1d-0.5.1], + [dav1d-0.6.0], [ usr/local/lib*/libdav1d*.a ], [ usr/local/include ]) diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index c52196f6..e64b2eb0 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -1022,8 +1022,8 @@ if( debug && event->type != ClientMessage ) { //printf("BC_WindowBase::dispatch_event %d %d\n", __LINE__, button_number); event_win = event->xany.window; - if (button_number < 6) { - if(button_number < 4) + if( button_number < 6 ) { + if( button_number < 4 ) button_down = 1; button_pressed = event->xbutton.button; button_time1 = button_time2; @@ -1036,23 +1036,20 @@ if( debug && event->type != ClientMessage ) { drag_x2 = cursor_x + get_resources()->drag_radius; drag_y1 = cursor_y - get_resources()->drag_radius; drag_y2 = cursor_y + get_resources()->drag_radius; - - if((long)(button_time3 - button_time1) < resources->double_click * 2) - { - triple_click = 1; - button_time3 = button_time2 = button_time1 = 0; - } - if((long)(button_time3 - button_time2) < resources->double_click) - { - double_click = 1; -// button_time3 = button_time2 = button_time1 = 0; - } - else - { - triple_click = 0; - double_click = 0; + if( button_number < 4 ) { + if((long)(button_time3 - button_time1) < resources->double_click * 2) { + triple_click = 1; + button_time3 = button_time2 = button_time1 = 0; + } + if((long)(button_time3 - button_time2) < resources->double_click) { + double_click = 1; +// button_time3 = button_time2 = button_time1 = 0; + } + else { + triple_click = 0; + double_click = 0; + } } - dispatch_button_press(); } break; diff --git a/cinelerra-5.1/plugins/shapewipe/shapewipe.C b/cinelerra-5.1/plugins/shapewipe/shapewipe.C index ca675e2d..b11006d0 100644 --- a/cinelerra-5.1/plugins/shapewipe/shapewipe.C +++ b/cinelerra-5.1/plugins/shapewipe/shapewipe.C @@ -565,20 +565,40 @@ void ShapeWipeMain::reset_pattern_image() float scale = feather ? 1/feather : 0xff; \ type **in_rows = (type**)input->get_rows(); \ type **out_rows = (type**)output->get_rows(); \ - for( int y=y1; y 0xff ) d = 0xff; \ - else if( d < -0xff ) d = -0xff; \ - tmp_type a = (d + 0xff) / 2, b = 0xff - a; \ - for( int i=0; i 0xff ) d = 0xff; \ + else if( d < -0xff ) d = -0xff; \ + tmp_type a = (d + 0xff) / 2, b = 0xff - a; \ + for( int i=0; i 0xff ) d = 0xff; \ + else if( d < -0xff ) d = -0xff; \ + tmp_type b = (d + 0xff) / 2, a = 0xff - b; \ + for( int i=0; iplugin->input; VFrame *output = server->plugin->output; int w = input->get_w(); + int dir = server->plugin->config.direction; unsigned char **pattern_image = server->plugin->pattern_image; unsigned char threshold = server->plugin->threshold; diff --git a/cinelerra-5.1/thirdparty/downloads.txt b/cinelerra-5.1/thirdparty/downloads.txt index b56e8a77..2c54c32e 100644 --- a/cinelerra-5.1/thirdparty/downloads.txt +++ b/cinelerra-5.1/thirdparty/downloads.txt @@ -33,7 +33,7 @@ ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20191217-2245-stable.tar https://bitbucket.org/multicoreware/x265/downloads/x265_3.2.1.tar.gz https://ffmpeg.org/releases/ffmpeg-4.2.tar.bz2 https://github.com/webmproject/libvpx/archive/v1.8.1.tar.gz -https://code.videolan.org/videolan/dav1d/-/archive/0.5.0/dav1d-0.5.0.tar.gz +https://code.videolan.org/videolan/dav1d/-/archive/0.6.0/dav1d-0.6.0.tar.gz https://github.com/swh/ladspa/releases/tag/v0.4.17, plugin.org.uk https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz https://github.com/webmproject/libwebp = libwebp-1.1.0 diff --git a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1 b/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1 deleted file mode 100644 index d4f2b835..00000000 --- a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1 +++ /dev/null @@ -1,367 +0,0 @@ -diff -urN a/Makefile b/Makefile ---- a/Makefile 1969-12-31 17:00:00.000000000 -0700 -+++ b/Makefile 2019-10-14 10:54:47.354841430 -0600 -@@ -0,0 +1,363 @@ -+ -+_ARCH := $(shell uname -m) -+ARCH_I32 := $(shell expr "x$(_ARCH)" : 'xi[346]86.*') -+ARCH_X64 := $(shell expr "x$(_ARCH)" : 'x..._64*') -+ -+ifneq ($(ARCH_I32),0) -+ASM_ARCH := elf32 -+ARCH_X86_32 := 1 -+ARCH_X86_64 := 0 -+endif -+ifneq ($(ARCH_X64),0) -+ASM_ARCH := elf64 -+ARCH_X86_32 := 0 -+ARCH_X86_64 := 1 -+endif -+ -+BUILD=build -+DESTDIR=/ -+PREFIX=usr/local -+LIBDIR=$(PREFIX)/lib -+INCDIR=$(PREFIX)/include -+# make Q="" for verbose -+Q?=@echo == $@; -+OBJDIR?=$(BUILD)/static -+NASM_BLD=$(OBJDIR)/nasm -+ENTRY_BLD=$(OBJDIR)/entry -+SRC_BLD=$(OBJDIR)/src -+BIT8_BLD=$(OBJDIR)/bits8 -+BIT16_BLD=$(OBJDIR)/bits16 -+TOOLS_BLD=$(BUILD)/tools -+TESTS_BLD=$(BUILD)/tests -+ -+STATIC_LIB=$(BUILD)/src/libdav1d.a -+SHARED_LIB=$(BUILD)/src/libdav1d.so -+DEFS= -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200112L -+FUZZ= -DDAV1D_MT_FUZZING -+ -+BLD_INCL= $(DEFS) -I. -Isrc -Iinclude/dav1d -Iinclude \ -+ -I$(BUILD) -I$(BUILD)/include -I$(BUILD)/include/dav1d -+TOOLS_INCL= $(DEFS) -Itools -I. -I$(BUILD) -I$(BUILD)/tools \ -+ -Iinclude -Iinclude/dav1d -I$(BUILD)/include/dav1d \ -+ -I$(BUILD)/include -I/usr/include/SDL2 -+ -+NP?=.NOTPARALLEL: -+$(NP) -+MAKE_P:=$(MAKE) -j NP="" -+ -+all: meson_data -+ $(MAKE_P) $(STATIC_LIB) OBJDIR=$(BUILD)/static -+ $(MAKE_P) $(SHARED_LIB) OBJDIR=$(BUILD)/shared -+# req SDL -+# $(MAKE_P) $(TOOLS) OBJDIR=$(BUILD)/static -+# $(MAKE_P) $(TESTS) OBJDIR=$(BUILD)/static -+ -+CC_DEFS=\ -+ -DNDEBUG \ -+ -D_FILE_OFFSET_BITS=64 \ -+ -D_POSIX_C_SOURCE=200112L \ -+ -+CC_OPTS=\ -+ -pipe \ -+ -Wall \ -+ -Winvalid-pch \ -+ -Wextra \ -+ -std=c99 \ -+ -O3 \ -+ -fvisibility=hidden \ -+ -Wundef \ -+ -Werror=vla \ -+ -Wno-maybe-uninitialized \ -+ -Wno-missing-field-initializers \ -+ -Wno-unused-parameter \ -+ -Werror=missing-prototypes \ -+ -fomit-frame-pointer \ -+ -ffast-math \ -+ -fPIC \ -+ -mpreferred-stack-boundary=5 \ -+ -MD -MQ $@ -MF $@.d \ -+ -+SHA_OPTS=\ -+ -Wl,--no-undefined \ -+ -Wl,--as-needed \ -+ -Wl,-O1 \ -+ -shared \ -+ -fPIC \ -+ -Wl,--start-group \ -+ -Wl,-soname,libdav1d.so.2 \ -+ -Wl,--end-group \ -+ -pthread \ -+ -+CC_CC=$(Q)cc $(CC_OPTS) $(CFLAGS) -+NASM=$(Q)/usr/bin/nasm -+any=$(foreach i,$(2),$(1)/$(i)) -+ -+# nasm -+NASM_OBJS=$(call any,$(NASM_BLD), \ -+ cdef.obj \ -+ film_grain.obj \ -+ ipred.obj \ -+ itx.obj \ -+ cdef_sse.obj \ -+ ipred_ssse3.obj \ -+ loopfilter.obj \ -+ looprestoration.obj \ -+ mc.obj \ -+ itx_ssse3.obj \ -+ looprestoration_ssse3.obj \ -+ loopfilter_ssse3.obj \ -+ mc_ssse3.obj \ -+ cpuid.obj \ -+ msac.obj ) -+ -+$(NASM_BLD)/%.obj: src/x86/%.asm -+ $(NASM) -f $(ASM_ARCH) \ -+ -I src/ -I $(BUILD)/ -MQ $@ -MF $@.ndep \ -+ $< -o $@ -+ -+# entry -+ENTRY_OBJS=$(call any,$(ENTRY_BLD), \ -+ lib.c.o \ -+ thread_task.c.o) -+$(ENTRY_BLD)/%.c.o: src/%.c -+ $(CC_CC) -Iinclude -Ibuild/include/dav1d -Isrc/entry $(BLD_INCL) \ -+ -mincoming-stack-boundary=4 -o $@ -c $< -+ -+# src -+SRC_OBJS=$(call any,$(SRC_BLD), \ -+ cdf.o \ -+ cpu.o \ -+ data.o \ -+ decode.o \ -+ dequant_tables.o \ -+ getbits.o \ -+ intra_edge.o \ -+ lf_mask.o \ -+ log.o \ -+ msac.o \ -+ obu.o \ -+ picture.o \ -+ qm.o \ -+ ref.o \ -+ ref_mvs.o \ -+ scan.o \ -+ tables.o \ -+ warpmv.o \ -+ wedge.o \ -+ x86/cpu.c.o) -+$(SRC_BLD)/%.o: src/%.c -+ $(CC_CC) $(BLD_INCL) -pthread -o $@ -c $< -+$(SRC_BLD)/x86/%.c.o: src/x86/%.c -+ $(CC_CC) $(BLD_INCL) -o $@ -c $< -+ -+# bits -+BITS_OBJS= \ -+ cdef_tmpl.o \ -+ cdef_apply_tmpl.o \ -+ fg_apply_tmpl.o \ -+ film_grain_tmpl.o \ -+ ipred_tmpl.o \ -+ ipred_prepare_tmpl.o \ -+ itx_tmpl.o \ -+ lf_apply_tmpl.o \ -+ loopfilter_tmpl.o \ -+ looprestoration_tmpl.o \ -+ lr_apply_tmpl.o \ -+ mc_tmpl.o \ -+ recon_tmpl.o \ -+ x86/cdef_init_tmpl.c.o \ -+ x86/film_grain_init_tmpl.c.o \ -+ x86/ipred_init_tmpl.c.o \ -+ x86/itx_init_tmpl.c.o \ -+ x86/loopfilter_init_tmpl.c.o \ -+ x86/looprestoration_init_tmpl.c.o \ -+ x86/mc_init_tmpl.c.o \ -+ -+BIT8_OBJS=$(call any,$(BIT8_BLD),$(BITS_OBJS)) -+$(BIT8_BLD)/x86/%.c.o: src/x86/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< -+$(BIT8_BLD)/%.o: src/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< -+ -+BIT16_OBJS=$(call any,$(BIT16_BLD),$(BITS_OBJS)) -+$(BIT16_BLD)/x86/%.c.o: src/x86/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< -+$(BIT16_BLD)/%.o: src/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< -+ -+$(BUILD)/config.h: -+ echo > $@ "#pragma once" -+ echo >> $@ "#define ARCH_AARCH64 0" -+ echo >> $@ "#define ARCH_ARM 0" -+ echo >> $@ "#define ARCH_PPC64LE 0" -+ echo >> $@ "#define ARCH_X86 1" -+ echo >> $@ "#define ARCH_X86_32 $(ARCH_X86_32)" -+ echo >> $@ "#define ARCH_X86_64 $(ARCH_X86_64)" -+ echo >> $@ "#define CONFIG_16BPC 1" -+ echo >> $@ "#define CONFIG_8BPC 1" -+ echo >> $@ "#define CONFIG_LOG 1" -+ echo >> $@ "#define ENDIANNESS_BIG 0" -+ echo >> $@ "#define HAVE_ASM 1" -+ echo >> $@ "#define HAVE_POSIX_MEMALIGN 1" -+ echo >> $@ "#define HAVE_UNISTD_H 1" -+ echo >> $@ "#define STACK_ALIGNMENT 32" -+ -+$(BUILD)/config.asm: -+ echo > $@ "%define ARCH_X86_32 $(ARCH_X86_32)" -+ echo >> $@ "%define ARCH_X86_64 $(ARCH_X86_64)" -+ echo >> $@ "%define PIC 1" -+ echo >> $@ "%define STACK_ALIGNMENT 32" -+ -+$(BUILD)/include/vcs_version.h: -+ mkdir -p $(BUILD)/include -+ echo > $@ "#define DAV1D_VERSION \"0.5.0\"" -+ -+$(BUILD)/include/dav1d/version.h: -+ mkdir -p $(BUILD)/include/dav1d -+ echo > $@ "#ifndef DAV1D_VERSION_H" -+ echo >> $@ "#define DAV1D_VERSION_H" -+ echo >> $@ "#define DAV1D_API_VERSION_MAJOR 2" -+ echo >> $@ "#define DAV1D_API_VERSION_MINOR 0" -+ echo >> $@ "#define DAV1D_API_VERSION_PATCH 0" -+ echo >> $@ "#endif /* DAV1D_VERSION_H */" -+ -+$(TOOLS_BLD)/cli_config.h: -+ mkdir -p $(TOOLS_BLD) -+ echo > $@ "#pragma once" -+ echo >> $@ "#define HAVE_CLOCK_GETTIME 1" -+ -+.PHONY: meson_data -+meson_data: -+ make meson_dirs OBJDIR=$(BUILD)/static -+ make meson_dirs OBJDIR=$(BUILD)/shared -+ ln -sf ./include/compat/gcc/stdatomic.h . -+ -+.PHONY: meson_dirs -+meson_dirs: $(OBJDIR) \ -+ $(BUILD)/config.h $(BUILD)/config.asm \ -+ $(BUILD)/include/vcs_version.h \ -+ $(BUILD)/include/dav1d/version.h \ -+ $(TOOLS_BLD)/cli_config.h \ -+ -+LIB_OBJS=$(ENTRY_OBJS) $(NASM_OBJS) $(SRC_OBJS) $(BIT8_OBJS) $(BIT16_OBJS) -+ -+$(STATIC_LIB): DIR?=static -+$(STATIC_LIB): $(LIB_OBJS) -+ rm -f $@ -+ gcc-ar csrD $@ $(LIB_OBJS) -+ -+$(SHARED_LIB): DIR?=shared -+$(SHARED_LIB): $(LIB_OBJS) -+ rm -f $@ -+ cc -o $@ $(LIB_OBJS) $(SHA_OPTS) -+ -+# tools -+DAV1D_OBJS=$(call any,$(TOOLS_BLD),\ -+ dav1d.o \ -+ dav1d_cli_parse.o \ -+ input/annexb.o \ -+ input/ivf.o \ -+ input/input.o \ -+ output/md5.o \ -+ output/null.o \ -+ output/output.o \ -+ output/y4m2.o \ -+ output/yuv.o) -+ -+DAV1DPLAY_OBJS=$(call any,$(TOOLS_BLD),\ -+ dav1dplay.o \ -+ input/annexb.o \ -+ input/ivf.o \ -+ input/input.o) -+ -+$(TOOLS_BLD)/%.o: tools/%.c -+ $(CC_CC) $(TOOLS_INCL) -o $@ -c $< -+ -+DAV1D=$(TOOLS_BLD)/dav1d -+$(DAV1D): $(DAV1D_OBJS) -+ $(CC_CC) -pthread -I$(BUILD) -o $@ $(DAV1D_OBJS) $(STATIC_LIB) -+ -+DAV1DPLAY=$(TOOLS_BLD)/dav1dplay -+$(DAV1DPLAY): $(DAV1DPLAY_OBJS) -+ $(CC_CC) -pthread -o $(TOOLS_BLD)/dav1dplay $(DAV1DPLAY_OBJS) $(STATIC_LIB) -lSDL2 -+ -+TOOLS=$(DAV1D) $(DAV1DPLAY) -+.PHONY: tools -+tools: $(TOOLS) -+ -+# tests -+TESTS_CHKASM=tests/checkasm -+TESTS_CHKASM_BLD=$(TESTS_BLD)/checkasm -+CHKASM_BIT8=$(TESTS_CHKASM_BLD)/bit8 -+CHKASM_BIT16=$(TESTS_CHKASM_BLD)/bit16 -+CHKASM_BITS= \ -+ cdef.o \ -+ ipred.o \ -+ itx.o \ -+ loopfilter.o \ -+ looprestoration.o \ -+ mc.o \ -+ -+CHKASM_BIT8_OBJS=$(call any,$(CHKASM_BIT8),$(CHKASM_BITS)) -+CHKASM_BIT16_OBJS=$(call any,$(CHKASM_BIT16),$(CHKASM_BITS)) -+ -+TESTS_CHKASM_OBJS= \ -+ $(TESTS_CHKASM_BLD)/checkasm.o \ -+ $(TESTS_CHKASM_BLD)/msac.o \ -+ $(CHKASM_BIT8_OBJS) $(CHKASM_BIT16_OBJS) \ -+ $(TESTS_CHKASM_BLD)/x86/checkasm.obj \ -+ -+$(TESTS_CHKASM_BLD)/%.o: $(TESTS_CHKASM)/%.c -+ $(CC_CC) $(BLD_INCL) -o $@ -c $< -+$(CHKASM_BIT8)/%.o: $(TESTS_CHKASM)/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< -+$(CHKASM_BIT16)/%.o: $(TESTS_CHKASM)/%.c -+ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< -+$(TESTS_CHKASM_BLD)/x86/%.obj: $(TESTS_CHKASM)/x86/%.asm -+ @$(NASM) -f $(ASM_ARCH) \ -+ -I src/ -I $(BUILD)/ -MQ $@ -MF $@.ndep \ -+ $< -o $@ -+ -+CHECKASM=$(TESTS_BLD)/checkasm/checkasm -+$(CHECKASM): $(TESTS_CHKASM_OBJS) $(STATIC_LIB) -+ $(CC_CC) -pthread -o $@ $(TESTS_CHKASM_OBJS) $(STATIC_LIB) -lm -+ -+TESTS_FUZZER=tests/libfuzzer -+TESTS_FUZZER_BLD=$(TESTS_BLD)/libfuzzer -+TESTS_FUZZER_OBJS= \ -+ $(TESTS_FUZZER_BLD)/main.o \ -+ $(TESTS_FUZZER_BLD)/dav1d_fuzzer.o \ -+ -+$(TESTS_FUZZER_BLD)/%.o: $(TESTS_FUZZER)/%.c -+ $(CC_CC) $(BLD_INCL) -o $@ -c $< -+ -+DAV1D_FUZZER=$(TESTS_BLD)/dav1d_fuzzer -+$(DAV1D_FUZZER): $(TESTS_FUZZER_OBJS) $(STATIC_LIB) -+ $(CC_CC) -pthread -o $@ $(TESTS_FUZZER_OBJS) $(STATIC_LIB) -+ -+TESTS=$(CHECKASM) $(DAV1D_FUZZER) -+.PHONY: tests -+tests: $(TESTS) -+ -+$(OBJDIR): -+ mkdir -p $@/include/dav1d \ -+ $(BUILD)/src $(BUILD)/include \ -+ $(ENTRY_BLD) $(NASM_BLD) \ -+ $(SRC_BLD)/x86 $(BIT8_BLD)/x86 $(BIT16_BLD)/x86 \ -+ $(TOOLS_BLD) $(TOOLS_BLD)/input $(TOOLS_BLD)/output \ -+ $(TESTS_CHKASM_BLD)/bit8 $(TESTS_CHKASM_BLD)/bit16 \ -+ $(TESTS_CHKASM_BLD)/x86 $(TESTS_FUZZER_BLD) \ -+ -+clean: -+ rm -rf $(BUILD) -+ -+install: -+ mkdir -p $(DESTDIR)$(LIBDIR) -+ cp -a $(STATIC_LIB) $(DESTDIR)$(LIBDIR) -+ cp -a $(SHARED_LIB) $(DESTDIR)$(LIBDIR) -+ mkdir -p $(DESTDIR)$(INCDIR) -+ cp -a include/dav1d $(DESTDIR)$(INCDIR) -+ rm -f $(DESTDIR)$(INCDIR)/dav1d/meson.build -+ rm -f $(DESTDIR)$(INCDIR)/dav1d/version.h.in -+ cp -a $(BUILD)/include/dav1d/version.h $(DESTDIR)$(INCDIR)/version.h -+ diff --git a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.tar.gz b/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.tar.gz deleted file mode 100644 index 805f750d..00000000 Binary files a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.tar.gz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.patch1 b/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.patch1 new file mode 100644 index 00000000..ebfb9ca6 --- /dev/null +++ b/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.patch1 @@ -0,0 +1,372 @@ +diff -ruN a/Makefile b/Makefile +--- a/Makefile 1969-12-31 17:00:00.000000000 -0700 ++++ b/Makefile 2020-03-12 17:08:48.095517451 -0600 +@@ -0,0 +1,368 @@ ++ ++_ARCH := $(shell uname -m) ++ARCH_I32 := $(shell expr "x$(_ARCH)" : 'xi[346]86.*') ++ARCH_X64 := $(shell expr "x$(_ARCH)" : 'x..._64*') ++ ++ifneq ($(ARCH_I32),0) ++ASM_ARCH := elf32 ++ARCH_X86_32 := 1 ++ARCH_X86_64 := 0 ++endif ++ifneq ($(ARCH_X64),0) ++ASM_ARCH := elf64 ++ARCH_X86_32 := 0 ++ARCH_X86_64 := 1 ++endif ++ ++BUILD=build ++DESTDIR=/ ++PREFIX=usr/local ++LIBDIR=$(PREFIX)/lib ++INCDIR=$(PREFIX)/include ++# make Q="" for verbose ++Q?=@echo == $@; ++OBJDIR?=$(BUILD)/static ++NASM_BLD=$(OBJDIR)/nasm ++ENTRY_BLD=$(OBJDIR)/entry ++SRC_BLD=$(OBJDIR)/src ++BIT8_BLD=$(OBJDIR)/bits8 ++BIT16_BLD=$(OBJDIR)/bits16 ++TOOLS_BLD=$(BUILD)/tools ++TESTS_BLD=$(BUILD)/tests ++ ++STATIC_LIB=$(BUILD)/src/libdav1d.a ++SHARED_LIB=$(BUILD)/src/libdav1d.so ++DEFS= -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE ++FUZZ= -DDAV1D_MT_FUZZING ++ ++BLD_INCL= $(DEFS) -I. -Isrc -Iinclude/dav1d -Iinclude \ ++ -I$(BUILD) -I$(BUILD)/include -I$(BUILD)/include/dav1d ++TOOLS_INCL= $(DEFS) -Itools -I. -I$(BUILD) -I$(BUILD)/tools \ ++ -Iinclude -Iinclude/dav1d -I$(BUILD)/include/dav1d \ ++ -I$(BUILD)/include -I/usr/include/SDL2 ++ ++NP?=.NOTPARALLEL: ++$(NP) ++MAKE_P:=$(MAKE) -j NP="" ++ ++all: meson_data ++ $(MAKE_P) $(STATIC_LIB) OBJDIR=$(BUILD)/static ++ $(MAKE_P) $(SHARED_LIB) OBJDIR=$(BUILD)/shared ++# req SDL ++# $(MAKE_P) $(TOOLS) OBJDIR=$(BUILD)/static ++# $(MAKE_P) $(TESTS) OBJDIR=$(BUILD)/static ++ ++CC_DEFS=\ ++ -DNDEBUG \ ++ -D_FILE_OFFSET_BITS=64 \ ++ -D_POSIX_C_SOURCE=200112L \ ++ ++CC_OPTS=\ ++ -pipe \ ++ -Wall \ ++ -Winvalid-pch \ ++ -Wextra \ ++ -std=c99 \ ++ -O3 \ ++ -fvisibility=hidden \ ++ -Wundef \ ++ -Werror=vla \ ++ -Wno-maybe-uninitialized \ ++ -Wno-missing-field-initializers \ ++ -Wno-unused-parameter \ ++ -Werror=missing-prototypes \ ++ -fomit-frame-pointer \ ++ -ffast-math \ ++ -fPIC \ ++ -mpreferred-stack-boundary=6 \ ++ -MD -MQ $@ -MF $@.d \ ++ ++SHA_OPTS=\ ++ -Wl,--no-undefined \ ++ -Wl,--as-needed \ ++ -Wl,-O1 \ ++ -shared \ ++ -fPIC \ ++ -Wl,--start-group \ ++ -Wl,-soname,libdav1d.so.4 \ ++ -Wl,--end-group \ ++ -pthread \ ++ ++CC_CC=$(Q)cc $(CC_OPTS) $(CFLAGS) ++NASM=$(Q)/usr/bin/nasm ++any=$(foreach i,$(2),$(1)/$(i)) ++ ++# nasm ++NASM_OBJS=$(call any,$(NASM_BLD), \ ++ cpuid.obj \ ++ msac.obj \ ++ cdef.obj \ ++ film_grain.obj \ ++ ipred.obj \ ++ itx.obj \ ++ loopfilter.obj \ ++ looprestoration.obj \ ++ mc.obj \ ++ cdef_sse.obj \ ++ film_grain_ssse3.obj \ ++ ipred_ssse3.obj \ ++ itx_ssse3.obj \ ++ loopfilter_ssse3.obj \ ++ looprestoration_ssse3.obj \ ++ mc_ssse3.obj) ++ ++$(NASM_BLD)/%.obj: src/x86/%.asm ++ $(NASM) -f $(ASM_ARCH) \ ++ -I src/ -I $(BUILD)/ -MQ $@ -MF $@.ndep \ ++ $< -o $@ ++ ++# entry ++ENTRY_OBJS=$(call any,$(ENTRY_BLD), \ ++ lib.c.o \ ++ thread_task.c.o) ++$(ENTRY_BLD)/%.c.o: src/%.c ++ $(CC_CC) -Iinclude -Ibuild/include/dav1d -Isrc/entry $(BLD_INCL) \ ++ -mincoming-stack-boundary=4 -o $@ -c $< ++ ++# src ++SRC_OBJS=$(call any,$(SRC_BLD), \ ++ cdf.o \ ++ cpu.o \ ++ data.o \ ++ decode.o \ ++ dequant_tables.o \ ++ getbits.o \ ++ intra_edge.o \ ++ itx_1d.o \ ++ lf_mask.o \ ++ log.o \ ++ msac.o \ ++ obu.o \ ++ picture.o \ ++ qm.o \ ++ ref.o \ ++ ref_mvs.o \ ++ scan.o \ ++ tables.o \ ++ warpmv.o \ ++ wedge.o \ ++ x86/cpu.c.o \ ++ x86/msac_init.c.o) ++$(SRC_BLD)/%.o: src/%.c ++ $(CC_CC) $(BLD_INCL) -pthread -o $@ -c $< ++$(SRC_BLD)/x86/%.c.o: src/x86/%.c ++ $(CC_CC) $(BLD_INCL) -o $@ -c $< ++ ++# bits ++BITS_OBJS= \ ++ cdef_tmpl.o \ ++ cdef_apply_tmpl.o \ ++ fg_apply_tmpl.o \ ++ film_grain_tmpl.o \ ++ ipred_tmpl.o \ ++ ipred_prepare_tmpl.o \ ++ itx_tmpl.o \ ++ lf_apply_tmpl.o \ ++ loopfilter_tmpl.o \ ++ looprestoration_tmpl.o \ ++ lr_apply_tmpl.o \ ++ mc_tmpl.o \ ++ recon_tmpl.o \ ++ x86/cdef_init_tmpl.c.o \ ++ x86/film_grain_init_tmpl.c.o \ ++ x86/ipred_init_tmpl.c.o \ ++ x86/itx_init_tmpl.c.o \ ++ x86/loopfilter_init_tmpl.c.o \ ++ x86/looprestoration_init_tmpl.c.o \ ++ x86/mc_init_tmpl.c.o \ ++ ++BIT8_OBJS=$(call any,$(BIT8_BLD),$(BITS_OBJS)) ++$(BIT8_BLD)/x86/%.c.o: src/x86/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< ++$(BIT8_BLD)/%.o: src/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< ++ ++BIT16_OBJS=$(call any,$(BIT16_BLD),$(BITS_OBJS)) ++$(BIT16_BLD)/x86/%.c.o: src/x86/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< ++$(BIT16_BLD)/%.o: src/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< ++ ++$(BUILD)/config.h: ++ echo > $@ "#pragma once" ++ echo >> $@ "#define ARCH_AARCH64 0" ++ echo >> $@ "#define ARCH_ARM 0" ++ echo >> $@ "#define ARCH_PPC64LE 0" ++ echo >> $@ "#define ARCH_X86 1" ++ echo >> $@ "#define ARCH_X86_32 $(ARCH_X86_32)" ++ echo >> $@ "#define ARCH_X86_64 $(ARCH_X86_64)" ++ echo >> $@ "#define CONFIG_16BPC 1" ++ echo >> $@ "#define CONFIG_8BPC 1" ++ echo >> $@ "#define CONFIG_LOG 1" ++ echo >> $@ "#define ENDIANNESS_BIG 0" ++ echo >> $@ "#define HAVE_ASM 1" ++ echo >> $@ "#define HAVE_POSIX_MEMALIGN 1" ++ echo >> $@ "#define HAVE_UNISTD_H 1" ++ echo >> $@ "#define STACK_ALIGNMENT 64" ++ ++$(BUILD)/config.asm: ++ echo > $@ "%define ARCH_X86_32 $(ARCH_X86_32)" ++ echo >> $@ "%define ARCH_X86_64 $(ARCH_X86_64)" ++ echo >> $@ "%define PIC 1" ++ echo >> $@ "%define STACK_ALIGNMENT 64" ++ ++$(BUILD)/include/vcs_version.h: ++ mkdir -p $(BUILD)/include ++ echo > $@ "#define DAV1D_VERSION \"0.6.0\"" ++ ++$(BUILD)/include/dav1d/version.h: ++ mkdir -p $(BUILD)/include/dav1d ++ echo > $@ "#ifndef DAV1D_VERSION_H" ++ echo >> $@ "#define DAV1D_VERSION_H" ++ echo >> $@ "#define DAV1D_API_VERSION_MAJOR 2" ++ echo >> $@ "#define DAV1D_API_VERSION_MINOR 0" ++ echo >> $@ "#define DAV1D_API_VERSION_PATCH 0" ++ echo >> $@ "#endif /* DAV1D_VERSION_H */" ++ ++$(TOOLS_BLD)/cli_config.h: ++ mkdir -p $(TOOLS_BLD) ++ echo > $@ "#pragma once" ++ echo >> $@ "#define HAVE_CLOCK_GETTIME 1" ++ ++.PHONY: meson_data ++meson_data: ++ make meson_dirs OBJDIR=$(BUILD)/static ++ make meson_dirs OBJDIR=$(BUILD)/shared ++ ln -sf ./include/compat/gcc/stdatomic.h . ++ ++.PHONY: meson_dirs ++meson_dirs: $(OBJDIR) \ ++ $(BUILD)/config.h $(BUILD)/config.asm \ ++ $(BUILD)/include/vcs_version.h \ ++ $(BUILD)/include/dav1d/version.h \ ++ $(TOOLS_BLD)/cli_config.h \ ++ ++LIB_OBJS=$(ENTRY_OBJS) $(NASM_OBJS) $(SRC_OBJS) $(BIT8_OBJS) $(BIT16_OBJS) ++ ++$(STATIC_LIB): DIR?=static ++$(STATIC_LIB): $(LIB_OBJS) ++ rm -f $@ ++ gcc-ar csrD $@ $(LIB_OBJS) ++ ++$(SHARED_LIB): DIR?=shared ++$(SHARED_LIB): $(LIB_OBJS) ++ rm -f $@ ++ cc -o $@ $(LIB_OBJS) $(SHA_OPTS) ++ ++# tools ++DAV1D_OBJS=$(call any,$(TOOLS_BLD),\ ++ dav1d.o \ ++ dav1d_cli_parse.o \ ++ input/annexb.o \ ++ input/ivf.o \ ++ input/input.o \ ++ input/section5.o \ ++ output/md5.o \ ++ output/null.o \ ++ output/output.o \ ++ output/y4m2.o \ ++ output/yuv.o) ++ ++DAV1DPLAY_OBJS=$(call any,$(TOOLS_BLD),\ ++ ../examples/dav1dplay.o \ ++ input/annexb.o \ ++ input/section5.o \ ++ input/ivf.o \ ++ input/input.o) ++ ++$(TOOLS_BLD)/%.o: tools/%.c ++ $(CC_CC) $(TOOLS_INCL) -o $@ -c $< ++ ++DAV1D=$(TOOLS_BLD)/dav1d ++$(DAV1D): $(DAV1D_OBJS) ++ $(CC_CC) -pthread -I$(BUILD) -o $@ $(DAV1D_OBJS) $(STATIC_LIB) ++ ++DAV1DPLAY=$(TOOLS_BLD)/dav1dplay ++$(DAV1DPLAY): $(DAV1DPLAY_OBJS) ++ $(CC_CC) -pthread -o $(TOOLS_BLD)/dav1dplay $(DAV1DPLAY_OBJS) $(STATIC_LIB) -lSDL2 ++ ++TOOLS=$(DAV1D) $(DAV1DPLAY) ++.PHONY: tools ++tools: $(TOOLS) ++ ++# tests ++TESTS_CHKASM=tests/checkasm ++TESTS_CHKASM_BLD=$(TESTS_BLD)/checkasm ++CHKASM_BIT8=$(TESTS_CHKASM_BLD)/bit8 ++CHKASM_BIT16=$(TESTS_CHKASM_BLD)/bit16 ++CHKASM_BITS= \ ++ cdef.o \ ++ ipred.o \ ++ itx.o \ ++ loopfilter.o \ ++ looprestoration.o \ ++ mc.o \ ++ ++CHKASM_BIT8_OBJS=$(call any,$(CHKASM_BIT8),$(CHKASM_BITS)) ++CHKASM_BIT16_OBJS=$(call any,$(CHKASM_BIT16),$(CHKASM_BITS)) ++ ++TESTS_CHKASM_OBJS= \ ++ $(TESTS_CHKASM_BLD)/checkasm.o \ ++ $(TESTS_CHKASM_BLD)/msac.o \ ++ $(CHKASM_BIT8_OBJS) $(CHKASM_BIT16_OBJS) \ ++ $(TESTS_CHKASM_BLD)/x86/checkasm.obj \ ++ ++$(TESTS_CHKASM_BLD)/%.o: $(TESTS_CHKASM)/%.c ++ $(CC_CC) $(BLD_INCL) -o $@ -c $< ++$(CHKASM_BIT8)/%.o: $(TESTS_CHKASM)/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=8 -o $@ -c $< ++$(CHKASM_BIT16)/%.o: $(TESTS_CHKASM)/%.c ++ $(CC_CC) $(BLD_INCL) -DBITDEPTH=16 -o $@ -c $< ++$(TESTS_CHKASM_BLD)/x86/%.obj: $(TESTS_CHKASM)/x86/%.asm ++ @$(NASM) -f $(ASM_ARCH) \ ++ -I src/ -I $(BUILD)/ -MQ $@ -MF $@.ndep \ ++ $< -o $@ ++ ++CHECKASM=$(TESTS_BLD)/checkasm/checkasm ++$(CHECKASM): $(TESTS_CHKASM_OBJS) $(STATIC_LIB) ++ $(CC_CC) -pthread -o $@ $(TESTS_CHKASM_OBJS) $(STATIC_LIB) -lm ++ ++TESTS_FUZZER=tests/libfuzzer ++TESTS_FUZZER_BLD=$(TESTS_BLD)/libfuzzer ++TESTS_FUZZER_OBJS= \ ++ $(TESTS_FUZZER_BLD)/main.o \ ++ $(TESTS_FUZZER_BLD)/dav1d_fuzzer.o \ ++ ++$(TESTS_FUZZER_BLD)/%.o: $(TESTS_FUZZER)/%.c ++ $(CC_CC) $(BLD_INCL) -o $@ -c $< ++ ++DAV1D_FUZZER=$(TESTS_BLD)/dav1d_fuzzer ++$(DAV1D_FUZZER): $(TESTS_FUZZER_OBJS) $(STATIC_LIB) ++ $(CC_CC) -pthread -o $@ $(TESTS_FUZZER_OBJS) $(STATIC_LIB) ++ ++TESTS=$(CHECKASM) $(DAV1D_FUZZER) ++.PHONY: tests ++tests: $(TESTS) ++ ++$(OBJDIR): ++ mkdir -p $@/include/dav1d \ ++ $(BUILD)/src $(BUILD)/include $(BUILD)/examples \ ++ $(ENTRY_BLD) $(NASM_BLD) \ ++ $(SRC_BLD)/x86 $(BIT8_BLD)/x86 $(BIT16_BLD)/x86 \ ++ $(TOOLS_BLD) $(TOOLS_BLD)/input $(TOOLS_BLD)/output \ ++ $(TESTS_CHKASM_BLD)/bit8 $(TESTS_CHKASM_BLD)/bit16 \ ++ $(TESTS_CHKASM_BLD)/x86 $(TESTS_FUZZER_BLD) \ ++ ++clean: ++ rm -rf $(BUILD) ++ ++install: ++ mkdir -p $(DESTDIR)$(LIBDIR) ++ cp -a $(STATIC_LIB) $(DESTDIR)$(LIBDIR) ++ cp -a $(SHARED_LIB) $(DESTDIR)$(LIBDIR) ++ mkdir -p $(DESTDIR)$(INCDIR) ++ cp -a include/dav1d $(DESTDIR)$(INCDIR) ++ rm -f $(DESTDIR)$(INCDIR)/dav1d/meson.build ++ rm -f $(DESTDIR)$(INCDIR)/dav1d/version.h.in ++ cp -a $(BUILD)/include/dav1d/version.h $(DESTDIR)$(INCDIR)/version.h ++ diff --git a/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.tar.xz b/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.tar.xz new file mode 100644 index 00000000..7eaa76b6 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/dav1d-0.6.0.tar.xz differ