From: Good Guy Date: Sat, 4 Apr 2020 01:08:31 +0000 (-0600) Subject: add VFrameJpeg for shapewipe shapes, switch to jpeg for shapes, cam/prjr x,y,z range... X-Git-Tag: 2020-04~24 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=6e880be00673eac08e9463e3ce752aaf4c18085b;p=goodguy%2Fcinelerra.git add VFrameJpeg for shapewipe shapes, switch to jpeg for shapes, cam/prjr x,y,z range fix, titler png path fix, cwdw/vwdw panel layout tweaks --- diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index beac0f81..1aff4d6c 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -58,6 +58,7 @@ #include "tracks.h" #include "transportque.h" #include "vtrack.h" +#include "zoombar.h" static double my_zoom_table[] = @@ -2632,6 +2633,11 @@ void CWindowCanvas::reset_keyframe(int do_camera) z_keyframe->set_value(1); gui->sync_parameters(CHANGE_PARAMS, 1, 1); + MWindowGUI *mgui = mwindow->gui; + mgui->lock_window("CWindowCanvas::reset_keyframe"); + gui->mwindow->edl->local_session->reset_view_limits(); + gui->mwindow->gui->zoombar->update_autozoom(); + mgui->unlock_window(); } } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index 8370ab97..f3fd68e3 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -436,6 +436,7 @@ CWindowCoordRange::~CWindowCoordRange() int CWindowCoordRange::update(float scale) { + CWindowCoordSlider *slider = coord->slider; MWindow *mwindow = coord->gui->mwindow; LocalSession *local_session = mwindow->edl->local_session; int group = Automation::autogrouptype(coord->type, 0); @@ -448,22 +449,24 @@ int CWindowCoordRange::update(float scale) case AUTOGROUPTYPE_Y: min = -100; max = 100; break; } } - float range = max - min; - min -= range * scale; - max += range * scale; switch( group ) { - case AUTOGROUPTYPE_ZOOM: + case AUTOGROUPTYPE_ZOOM: { // exp + float lv = log(slider->get_value()); + float lmin = log(min), lmax = log(max); + float lr = (lmax - lmin) * scale; + min = exp(lv - 0.5*lr); + max = exp(lv + 0.5*lr); if( min < 0.001 ) min = 0.001; if( max > 1000. ) max = 1000.; - break; + break; } case AUTOGROUPTYPE_X: - case AUTOGROUPTYPE_Y: - if( min < -32767 ) min = -32767; - if( max > 32767 ) max = 32767; - break; + case AUTOGROUPTYPE_Y: { // linear + float dr = (max - min) * (scale-1); + if( (min -= dr) < -32767 ) min = -32767; + if( (max += dr) > 32767 ) max = 32767; + break; } } - CWindowCoordSlider *slider = coord->slider; - coord->slider->update(slider->get_pointer_motion_range(), + slider->update(slider->get_pointer_motion_range(), slider->get_value(), min, max); unlock_window(); MWindowGUI *mgui = mwindow->gui; @@ -482,11 +485,11 @@ int CWindowCoordRange::update(float scale) int CWindowCoordRange::handle_up_event() { - return update(0.5); + return update(1.25); } int CWindowCoordRange::handle_down_event() { - return update(-0.25); + return update(0.8); } CWindowCropApply::CWindowCropApply(MWindow *mwindow, CWindowCropGUI *crop_gui, int x, int y) diff --git a/cinelerra-5.1/cinelerra/editpanel.C b/cinelerra-5.1/cinelerra/editpanel.C index 85230289..33dcded5 100644 --- a/cinelerra-5.1/cinelerra/editpanel.C +++ b/cinelerra-5.1/cinelerra/editpanel.C @@ -259,16 +259,6 @@ void EditPanel::create_buttons() x1 += paste->get_w(); } - if( use_meters ) { - if( meter_panel ) { - meters = new MeterShow(mwindow, meter_panel, x1, y1); - subwindow->add_subwindow(meters); - x1 += meters->get_w(); - } - else - printf("EditPanel::create_objects: meter_panel == 0\n"); - } - if( use_labels ) { labelbutton = new EditLabelbutton(mwindow, this, x1, y1); subwindow->add_subwindow(labelbutton); @@ -328,6 +318,16 @@ void EditPanel::create_buttons() scope_dialog = new EditPanelScopeDialog(mwindow, this); } + if( use_meters ) { + if( meter_panel ) { + meters = new MeterShow(mwindow, meter_panel, x1, y1); + subwindow->add_subwindow(meters); + x1 += meters->get_w(); + } + else + printf("EditPanel::create_objects: meter_panel == 0\n"); + } + if( use_commercial ) { commercial = new EditCommercial(mwindow, this, x1, y1); subwindow->add_subwindow(commercial); @@ -393,11 +393,6 @@ void EditPanel::reposition_buttons(int x, int y) x1 += paste->get_w(); } - if( use_meters ) { - meters->reposition_window(x1, y1); - x1 += meters->get_w(); - } - if( use_labels ) { labelbutton->reposition_window(x1, y1); x1 += labelbutton->get_w(); @@ -443,6 +438,11 @@ void EditPanel::reposition_buttons(int x, int y) scope->reposition_window(x1, y1-yS(1)); x1 += scope->get_w(); } + + if( use_meters ) { + meters->reposition_window(x1, y1); + x1 += meters->get_w(); + } } void EditPanel::create_objects() diff --git a/cinelerra-5.1/cinelerra/localsession.C b/cinelerra-5.1/cinelerra/localsession.C index 50837a13..e0e8efa8 100644 --- a/cinelerra-5.1/cinelerra/localsession.C +++ b/cinelerra-5.1/cinelerra/localsession.C @@ -80,24 +80,13 @@ LocalSession::LocalSession(EDL *edl) track_start[i] = 0; } + reset_view_limits(); automation_mins[AUTOGROUPTYPE_AUDIO_FADE] = -80; automation_maxs[AUTOGROUPTYPE_AUDIO_FADE] = 6; - automation_mins[AUTOGROUPTYPE_VIDEO_FADE] = 0; automation_maxs[AUTOGROUPTYPE_VIDEO_FADE] = 100; - - automation_mins[AUTOGROUPTYPE_ZOOM] = 0.005; - automation_maxs[AUTOGROUPTYPE_ZOOM] = 5.000; - automation_mins[AUTOGROUPTYPE_SPEED] = 0.005; automation_maxs[AUTOGROUPTYPE_SPEED] = 5.000; - - automation_mins[AUTOGROUPTYPE_X] = -100; - automation_maxs[AUTOGROUPTYPE_X] = 100; - - automation_mins[AUTOGROUPTYPE_Y] = -100; - automation_maxs[AUTOGROUPTYPE_Y] = 100; - automation_mins[AUTOGROUPTYPE_INT255] = 0; automation_maxs[AUTOGROUPTYPE_INT255] = 255; @@ -505,3 +494,13 @@ int LocalSession::outpoint_valid() return out_point >= 0; } +void LocalSession::reset_view_limits() +{ + automation_mins[AUTOGROUPTYPE_ZOOM] = 0.005; + automation_maxs[AUTOGROUPTYPE_ZOOM] = 5.000; + automation_mins[AUTOGROUPTYPE_X] = -100; + automation_maxs[AUTOGROUPTYPE_X] = 100; + automation_mins[AUTOGROUPTYPE_Y] = -100; + automation_maxs[AUTOGROUPTYPE_Y] = 100; +} + diff --git a/cinelerra-5.1/cinelerra/localsession.h b/cinelerra-5.1/cinelerra/localsession.h index d2b28945..1fa25f0c 100644 --- a/cinelerra-5.1/cinelerra/localsession.h +++ b/cinelerra-5.1/cinelerra/localsession.h @@ -67,6 +67,7 @@ public: void synchronize_params(LocalSession *that); void boundaries(); + void reset_view_limits(); EDL *edl; diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index 71bb2399..1700a5b3 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -735,28 +735,30 @@ SET_TRACE int buttons_h = get_image("rewind")->get_h() + widget_border; + int panel_y = mwindow->session->cwindow_h - buttons_h + yS(4); ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - buttons_h - widget_border; if( ctransport_x + transport_w + widget_border + edit_w + widget_border + zoom_w + widget_border + division_w + status_w > cmeter_x ) { - buttons_h += EditPanel::calculate_h(mwindow) + widget_border; - cedit_x = widget_border; - cedit_y = mwindow->session->cwindow_h - buttons_h; + ctransport_y = panel_y; czoom_x = ctransport_x + transport_w + widget_border; - czoom_y = ctransport_y + widget_border; + czoom_y = panel_y; cstatus_x = xS(440); - cstatus_y = cedit_y + yS(20); + cstatus_y = panel_y - yS(2); + int edit_h = EditPanel::calculate_h(mwindow) + widget_border; + buttons_h += edit_h; panel_y -= edit_h; + cedit_x = widget_border; + cedit_y = panel_y; } else { ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - buttons_h; + ctransport_y = panel_y; cedit_x = ctransport_x + transport_w + widget_border; - cedit_y = ctransport_y; + cedit_y = panel_y; czoom_x = cedit_x + edit_w + widget_border; - czoom_y = cedit_y + widget_border; + czoom_y = panel_y; cstatus_x = czoom_x + zoom_w + division_w; - cstatus_y = ctransport_y; + cstatus_y = panel_y; } buttons_h += ctimebar_h; @@ -930,27 +932,29 @@ void Theme::get_vwindow_sizes(VWindowGUI *gui) vcanvas_w = vmeter_x - vcanvas_x - widget_border; int buttons_h = get_image("rewind")->get_h() + widget_border; + int panel_y = mwindow->session->vwindow_h - buttons_h + yS(4); vtransport_x = widget_border; - vtransport_y = mwindow->session->vwindow_h - buttons_h - widget_border; if( vtransport_x + transport_w + widget_border + edit_w + widget_border + vtime_w + xS(40) + widget_border > vmeter_x ) { - buttons_h += EditPanel::calculate_h(mwindow) + widget_border; - vedit_x = widget_border; - vedit_y = mwindow->session->vwindow_h - buttons_h; + vtransport_y = panel_y; vzoom_x = vtransport_x + transport_w + widget_border; - vzoom_y = vtransport_y + widget_border; - vdivision_x = xS(280); + vzoom_y = panel_y; + vdivision_x = xS(320); vtime_x = vdivision_x; - vtime_y = vtransport_y + widget_border;; + vtime_y = panel_y; + int edit_h = EditPanel::calculate_h(mwindow) + widget_border; + buttons_h += edit_h; panel_y -= edit_h; + vedit_x = widget_border; + vedit_y = panel_y; } else { vtransport_x = widget_border; - vtransport_y = mwindow->session->vwindow_h - buttons_h; + vtransport_y = panel_y; vedit_x = vtransport_x + transport_w + widget_border; - vedit_y = vtransport_y; + vedit_y = panel_y; vdivision_x = vedit_x + edit_w + division_w; vtime_x = vdivision_x + vtime_border; - vtime_y = vtransport_y + widget_border;; + vtime_y = panel_y; } buttons_h += vtimebar_h; diff --git a/cinelerra-5.1/expanders.es b/cinelerra-5.1/expanders.es index 31c8a28e..4569ac8d 100644 --- a/cinelerra-5.1/expanders.es +++ b/cinelerra-5.1/expanders.es @@ -68,6 +68,7 @@ Video Effects F_deshake - Desenfoque Blur + BoxBlur Edge Linear Blur Motion Blur diff --git a/cinelerra-5.1/expanders.txt b/cinelerra-5.1/expanders.txt index 425026c7..0ef0fd23 100644 --- a/cinelerra-5.1/expanders.txt +++ b/cinelerra-5.1/expanders.txt @@ -68,6 +68,7 @@ Video Effects F_deshake - Blur Blur + BoxBlur Edge Linear Blur Motion Blur diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index 869bba0e..c1ff0523 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -782,8 +783,7 @@ int VFramePng::read_png(const unsigned char *data, long sz, double xscale, doubl if (src_color_model == PNG_COLOR_TYPE_GRAY && png_get_bit_depth(png_ptr, info_ptr) < 8) png_set_expand(png_ptr); - if (src_color_model == PNG_COLOR_TYPE_GRAY || - src_color_model == PNG_COLOR_TYPE_GRAY_ALPHA) + if (src_color_model == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_gray_to_rgb(png_ptr); /* expand paletted or RGB images with transparency to full alpha channels @@ -793,26 +793,22 @@ int VFramePng::read_png(const unsigned char *data, long sz, double xscale, doubl png_set_expand(png_ptr); } - switch(src_color_model) - { - case PNG_COLOR_TYPE_GRAY: - case PNG_COLOR_TYPE_RGB: - new_color_model = BC_RGB888; - break; - - case PNG_COLOR_TYPE_GRAY_ALPHA: - case PNG_COLOR_TYPE_RGB_ALPHA: - default: - new_color_model = BC_RGBA8888; - break; - - case PNG_COLOR_TYPE_PALETTE: - if(have_alpha) - new_color_model = BC_RGBA8888; - else - new_color_model = BC_RGB888; + switch(src_color_model) { + case PNG_COLOR_TYPE_GRAY: + new_color_model = BC_GREY8; + break; + case PNG_COLOR_TYPE_RGB: + new_color_model = BC_RGB888; + break; + case PNG_COLOR_TYPE_PALETTE: + new_color_model = have_alpha ? BC_RGBA8888 : BC_RGB888; + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: + case PNG_COLOR_TYPE_RGB_ALPHA: + default: + new_color_model = BC_RGBA8888; + break; } - reallocate(NULL, -1, 0, 0, 0, w, h, new_color_model, -1); //printf("VFrame::read_png %d %d %d %p\n", __LINE__, w, h, get_rows()); @@ -1850,3 +1846,255 @@ void VFrame::draw_t(int x, int y, int sz) } +// jpeg decompress +class jpeg_err : public jpeg_error_mgr +{ + static void s_error_exit(j_common_ptr cp); + static void s_output_message(j_common_ptr cp); +public: + jpeg_err() { + jpeg_std_error((jpeg_error_mgr *)this); + error_exit = s_error_exit; + output_message = s_output_message; + } + ~jpeg_err() {} +}; + +class jpeg_src : public jpeg_source_mgr +{ + static void s_init_source(j_decompress_ptr jp); + static boolean s_fill_input_buffer(j_decompress_ptr jp); + static void s_skip_input_data(j_decompress_ptr jp, long len); + static void s_term_source(j_decompress_ptr jp); + static boolean s_resync_to_restart(j_decompress_ptr jp, int v); +public: + jpeg_src(); + ~jpeg_src(); + int jpeg_file(int fd); + int jpeg_mem(const unsigned char *bfr, long len); + + int fd; + unsigned char *mbfr; + long mlen; + enum { buffer_sz=0x10000, file_sz=0x100000, }; + unsigned char *buffer; + boolean fill_buffer(); + void skip_data(long len); +}; + +class JpegVFrame : public jpeg_decompress_struct +{ +public: + JpegVFrame(); + ~JpegVFrame(); + int read_jpeg(VFrame *vfrm, double xs, double ys, int jpeg_model); + + jpeg_err jerr; + jpeg_src jsrc; + int debug, ret; +}; + + +void jpeg_err:: s_error_exit(j_common_ptr cp) +{ + JpegVFrame *jpeg = (JpegVFrame *)cp; + jpeg->ret = 1; + if( !jpeg->debug ) return; + printf("s_error_exit()\n"); +} + +void jpeg_err:: +s_output_message(j_common_ptr cp) +{ + JpegVFrame *jpeg = (JpegVFrame *)cp; + if( !jpeg->debug ) return; + char msg[JMSG_LENGTH_MAX]; + (*cp->err->format_message)(cp, msg); + printf("s_output_message() = %s\n",&msg[0]); +} + + +jpeg_src::jpeg_src() +{ + init_source = s_init_source; + fill_input_buffer = s_fill_input_buffer; + skip_input_data = s_skip_input_data; + resync_to_restart = s_resync_to_restart; + term_source = s_term_source; + + fd = -1; + buffer = 0; + mbfr = 0; + mlen = -1; +} + +jpeg_src::~jpeg_src() +{ + if( mbfr ) ::munmap(mbfr, mlen); + delete [] buffer; +} + +int jpeg_src::jpeg_file(int fd) +{ + this->fd = fd; + struct stat st; + if( fstat(fd, &st) || !st.st_size ) return 0; + if( st.st_size < file_sz ) { + mbfr = (unsigned char *)::mmap(0, mlen = st.st_size, + PROT_READ, MAP_SHARED, fd, 0); + if( mbfr == MAP_FAILED ) return 0; + next_input_byte = mbfr; + bytes_in_buffer = mlen; + } + else { + buffer = new unsigned char[buffer_sz]; + next_input_byte = &buffer[0]; + bytes_in_buffer = 0; + } + return 1; +} +int jpeg_src::jpeg_mem(const unsigned char *bfr, long len) +{ + next_input_byte = bfr; + bytes_in_buffer = len; + return 1; +} + +void jpeg_src::s_init_source(j_decompress_ptr jp) {} +void jpeg_src::s_term_source(j_decompress_ptr jp) {} + +boolean jpeg_src::s_resync_to_restart(j_decompress_ptr jp, int v) +{ + return jpeg_resync_to_restart(jp, v); +} + +boolean jpeg_src::s_fill_input_buffer(j_decompress_ptr jp) +{ + JpegVFrame *jpeg = (JpegVFrame *)jp; + return jpeg->jsrc.fill_buffer(); +} + +boolean jpeg_src::fill_buffer() +{ + if( mbfr || fd < 0 ) return 0; + long n = ::read(fd, buffer, buffer_sz); + if( n < 0 ) perror("jpeg read"); + if( !n ) return 0; + next_input_byte = buffer; + bytes_in_buffer = n; + return 1; +} + +void jpeg_src::s_skip_input_data(j_decompress_ptr jp, long len) +{ + JpegVFrame *jpeg = (JpegVFrame *)jp; + jpeg->jsrc.skip_data(len); +} + +void jpeg_src::skip_data(long len) +{ + while( len > (long) bytes_in_buffer ) { + len -= (long) bytes_in_buffer; + if( !fill_buffer() ) return; + } + next_input_byte += len; + bytes_in_buffer -= len; +} + + +JpegVFrame::JpegVFrame() +{ + jpeg_create_decompress(this); + debug = 1; ret = 0; + err = &jerr; src = &jsrc; +} +JpegVFrame::~JpegVFrame() +{ + jpeg_destroy_decompress(this); +} + +int JpegVFrame::read_jpeg(VFrame *vfrm, double xs, double ys, int jpeg_model) +{ + VFrame *xfrm = vfrm; + int color_model = xfrm->get_color_model(); + if( color_model == BC_COMPRESSED ) color_model = jpeg_model; + jpeg_abort((jpeg_common_struct *)this); + if( jpeg_read_header(this, TRUE) != JPEG_HEADER_OK ) return 0; + jpeg_calc_output_dimensions(this); + quantize_colors = FALSE; + out_color_space = + jpeg_model == BC_YUV888 ? JCS_YCbCr : + jpeg_model == BC_GREY8 ? JCS_GRAYSCALE : JCS_RGB; + jpeg_calc_output_dimensions(this); + int w = bmax(image_width*xs, 1.); + int h = bmax(image_height*ys, 1.); + vfrm->reallocate(0, -1, 0, 0, 0, w, h, color_model, -1); + if( w != (int)image_width || h != (int)image_height || + color_model != jpeg_model ) + xfrm = new VFrame(image_width, image_height, jpeg_model); + unsigned char *pic = xfrm->get_data(); + int linesz = xfrm->get_bytes_per_line(); + jpeg_start_decompress(this); + while( !ret && output_scanline < image_height ) { + JSAMPROW rowptr = (JSAMPROW) &pic[output_scanline * linesz]; + jpeg_read_scanlines(this, &rowptr, (JDIMENSION) 1); + } + jpeg_finish_decompress(this); + if( vfrm != xfrm ) { + vfrm->transfer_from(xfrm); + delete xfrm; + } + return 1; +} + +int VFrameJpeg::read_jpeg(const unsigned char *data, long sz, + double xscale, double yscale, int jpeg_model) +{ + JpegVFrame jpeg; + jpeg.jsrc.jpeg_mem(data, sz); + return jpeg.read_jpeg(this, xscale, yscale, jpeg_model); +} + +VFrameJpeg::VFrameJpeg(const unsigned char *jpeg_data, double s) +{ + long image_size = + ((long)jpeg_data[0] << 24) | ((long)jpeg_data[1] << 16) | + ((long)jpeg_data[2] << 8) | (long)jpeg_data[3]; + if( !s ) s = BC_WindowBase::get_resources()->icon_scale; + read_jpeg(jpeg_data+4, image_size, s, s, BC_RGB888); +} + +VFrameJpeg::VFrameJpeg(const unsigned char *jpeg_data, long image_size, double xs, double ys) +{ + if( !xs ) xs = BC_WindowBase::get_resources()->icon_scale; + if( !ys ) ys = BC_WindowBase::get_resources()->icon_scale; + read_jpeg(jpeg_data, image_size, xs, ys, BC_RGB888); +} + +VFrameJpeg::~VFrameJpeg() +{ +} + + +VFrame *VFrameJpeg::vframe_jpeg(int fd, double xs, double ys, int jpeg_model) +{ + JpegVFrame jpeg; + jpeg.jsrc.jpeg_file(fd); + VFrame *vfrm = new VFrame(); + if( !jpeg.read_jpeg(vfrm, xs, ys, jpeg_model) ) { + delete vfrm; vfrm = 0; + } + return vfrm; +} + +VFrame *VFrameJpeg::vframe_jpeg(const char *jpeg_path, double xs, double ys, int jpeg_model) +{ + VFrame *vframe = 0; + int fd = ::open(jpeg_path, O_RDONLY); + if( fd >= 0 ) { + vframe = vframe_jpeg(fd, xs, ys, jpeg_model); + ::close(fd); + } + return vframe; +} + diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index 21b6497a..589fce1c 100644 --- a/cinelerra-5.1/guicast/vframe.h +++ b/cinelerra-5.1/guicast/vframe.h @@ -56,6 +56,7 @@ public: class VFrame { friend class VFramePng; + friend class VFrameJpeg; friend class PngReadFunction; public: // Create new frame with shared data if *data is nonzero. @@ -486,4 +487,21 @@ public: static VFrame *vframe_png(const char *png_path, double xs=1, double ys=1); }; +// Create a frame with the jpeg image +// jpeg_model must be BC_RGB888, BC_YUV888, or BC_GREY8 +class VFrameJpeg : public VFrame +{ +// Read a JPEG into the frame (no alpha) + int read_jpeg(const unsigned char *data, long sz, + double xscale, double yscale, int jpeg_model); +public: + VFrameJpeg(const unsigned char *jpeg_data, double s=0); + VFrameJpeg(const unsigned char *jpeg_data, long image_size, double xs=0, double ys=0); + virtual ~VFrameJpeg(); + static VFrame *vframe_jpeg(int fd, + double xs=1, double ys=1, int jpeg_model=BC_RGB888); + static VFrame *vframe_jpeg(const char *jpeg_path, + double xs=1, double ys=1, int jpeg_model=BC_RGB888); +}; + #endif diff --git a/cinelerra-5.1/plugins/shapes/16-9_boart.jpg b/cinelerra-5.1/plugins/shapes/16-9_boart.jpg new file mode 100644 index 00000000..f68aab8d Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_boart.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_boxes.jpg b/cinelerra-5.1/plugins/shapes/16-9_boxes.jpg new file mode 100644 index 00000000..6d6343ee Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_boxes.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_cat_eyes.jpg b/cinelerra-5.1/plugins/shapes/16-9_cat_eyes.jpg new file mode 100644 index 00000000..46f9d287 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_cat_eyes.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_film_bands.jpg b/cinelerra-5.1/plugins/shapes/16-9_film_bands.jpg new file mode 100644 index 00000000..954c6344 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_film_bands.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_multi_circle.jpg b/cinelerra-5.1/plugins/shapes/16-9_multi_circle.jpg new file mode 100644 index 00000000..cd08b7b0 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_multi_circle.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_multi_spiral.jpg b/cinelerra-5.1/plugins/shapes/16-9_multi_spiral.jpg new file mode 100644 index 00000000..274bc18d Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_multi_spiral.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_multi_square.jpg b/cinelerra-5.1/plugins/shapes/16-9_multi_square.jpg new file mode 100644 index 00000000..bf6c7f39 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_multi_square.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_rare_spiral.jpg b/cinelerra-5.1/plugins/shapes/16-9_rare_spiral.jpg new file mode 100644 index 00000000..3b4d2336 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_rare_spiral.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_rectangles.jpg b/cinelerra-5.1/plugins/shapes/16-9_rectangles.jpg new file mode 100644 index 00000000..a4efb4e6 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_rectangles.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_star.jpg b/cinelerra-5.1/plugins/shapes/16-9_star.jpg new file mode 100644 index 00000000..44850925 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_star.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_stars.jpg b/cinelerra-5.1/plugins/shapes/16-9_stars.jpg new file mode 100644 index 00000000..ce0ba983 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_stars.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/16-9_wood.jpg b/cinelerra-5.1/plugins/shapes/16-9_wood.jpg new file mode 100644 index 00000000..0a8a8685 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/16-9_wood.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Butterfly.jpg b/cinelerra-5.1/plugins/shapes/Butterfly.jpg new file mode 100644 index 00000000..c133050e Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Butterfly.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Butterfly.png b/cinelerra-5.1/plugins/shapes/Butterfly.png deleted file mode 100644 index 3d36cfef..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Butterfly.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Heavy.jpg b/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Heavy.jpg new file mode 100644 index 00000000..33678a8c Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Heavy.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Light.jpg b/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Light.jpg new file mode 100644 index 00000000..ad0e772c Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Cinelerra16-9-Light.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/CinelerraGG.jpg b/cinelerra-5.1/plugins/shapes/CinelerraGG.jpg new file mode 100644 index 00000000..54e05f8b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/CinelerraGG.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-h_01.jpg b/cinelerra-5.1/plugins/shapes/Circle-h_01.jpg new file mode 100644 index 00000000..fa2fa60a Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Circle-h_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-h_01.png b/cinelerra-5.1/plugins/shapes/Circle-h_01.png deleted file mode 100644 index 8db39c96..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Circle-h_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-h_02.jpg b/cinelerra-5.1/plugins/shapes/Circle-h_02.jpg new file mode 100644 index 00000000..e7677cbb Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Circle-h_02.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-h_02.png b/cinelerra-5.1/plugins/shapes/Circle-h_02.png deleted file mode 100644 index d273de92..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Circle-h_02.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-v_01.jpg b/cinelerra-5.1/plugins/shapes/Circle-v_01.jpg new file mode 100644 index 00000000..1b090c58 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Circle-v_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-v_01.png b/cinelerra-5.1/plugins/shapes/Circle-v_01.png deleted file mode 100644 index 6b53ef8f..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Circle-v_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-v_02.jpg b/cinelerra-5.1/plugins/shapes/Circle-v_02.jpg new file mode 100644 index 00000000..362e202a Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Circle-v_02.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Circle-v_02.png b/cinelerra-5.1/plugins/shapes/Circle-v_02.png deleted file mode 100644 index 1b34eefc..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Circle-v_02.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Clouds_01.jpg b/cinelerra-5.1/plugins/shapes/Clouds_01.jpg new file mode 100644 index 00000000..6b17ac98 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Clouds_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Clouds_01.png b/cinelerra-5.1/plugins/shapes/Clouds_01.png deleted file mode 100644 index 9cb95712..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Clouds_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Clouds_02.jpg b/cinelerra-5.1/plugins/shapes/Clouds_02.jpg new file mode 100644 index 00000000..2c9d4811 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Clouds_02.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Clouds_02.png b/cinelerra-5.1/plugins/shapes/Clouds_02.png deleted file mode 100644 index 5faa0960..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Clouds_02.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Cross-Iris_01.jpg b/cinelerra-5.1/plugins/shapes/Cross-Iris_01.jpg new file mode 100644 index 00000000..c061c3e5 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Cross-Iris_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Cross-Iris_01.png b/cinelerra-5.1/plugins/shapes/Cross-Iris_01.png deleted file mode 100644 index f9f8ba2e..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Cross-Iris_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Cross_01.jpg b/cinelerra-5.1/plugins/shapes/Cross_01.jpg new file mode 100644 index 00000000..ab980e5e Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Cross_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Cross_01.png b/cinelerra-5.1/plugins/shapes/Cross_01.png deleted file mode 100644 index d2971b3d..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Cross_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diagonal-Curve.jpg b/cinelerra-5.1/plugins/shapes/Diagonal-Curve.jpg new file mode 100644 index 00000000..1d2012de Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diagonal-Curve.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diagonal-Curve.png b/cinelerra-5.1/plugins/shapes/Diagonal-Curve.png deleted file mode 100644 index 64e02489..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diagonal-Curve.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diagonal-Linear.jpg b/cinelerra-5.1/plugins/shapes/Diagonal-Linear.jpg new file mode 100644 index 00000000..4e0f2f7c Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diagonal-Linear.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diagonal-Linear.png b/cinelerra-5.1/plugins/shapes/Diagonal-Linear.png deleted file mode 100644 index cfa558b2..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diagonal-Linear.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.jpg b/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.jpg new file mode 100644 index 00000000..40c2fe50 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.png b/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.png deleted file mode 100644 index 62031ecd..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diamond-Iris_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_01.jpg b/cinelerra-5.1/plugins/shapes/Diamond_01.jpg new file mode 100644 index 00000000..ba030072 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diamond_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_01.png b/cinelerra-5.1/plugins/shapes/Diamond_01.png deleted file mode 100644 index 667c246e..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diamond_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_02.jpg b/cinelerra-5.1/plugins/shapes/Diamond_02.jpg new file mode 100644 index 00000000..31ad312b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diamond_02.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_02.png b/cinelerra-5.1/plugins/shapes/Diamond_02.png deleted file mode 100644 index eb0e799c..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diamond_02.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_03.jpg b/cinelerra-5.1/plugins/shapes/Diamond_03.jpg new file mode 100644 index 00000000..187a0e5b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Diamond_03.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Diamond_03.png b/cinelerra-5.1/plugins/shapes/Diamond_03.png deleted file mode 100644 index ad4e8ef4..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Diamond_03.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Double-Door-h.jpg b/cinelerra-5.1/plugins/shapes/Double-Door-h.jpg new file mode 100644 index 00000000..e9da2f4b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Double-Door-h.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Double-Door-h.png b/cinelerra-5.1/plugins/shapes/Double-Door-h.png deleted file mode 100644 index ac1b9027..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Double-Door-h.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Double-Door-v.jpg b/cinelerra-5.1/plugins/shapes/Double-Door-v.jpg new file mode 100644 index 00000000..05284d1c Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Double-Door-v.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Double-Door-v.png b/cinelerra-5.1/plugins/shapes/Double-Door-v.png deleted file mode 100644 index f809050a..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Double-Door-v.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Gravity.jpg b/cinelerra-5.1/plugins/shapes/Gravity.jpg new file mode 100644 index 00000000..d27ba13b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Gravity.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Gravity.png b/cinelerra-5.1/plugins/shapes/Gravity.png deleted file mode 100644 index 2ec38b63..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Gravity.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Linear-h.jpg b/cinelerra-5.1/plugins/shapes/Linear-h.jpg new file mode 100644 index 00000000..0f7b3182 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Linear-h.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Linear-h.png b/cinelerra-5.1/plugins/shapes/Linear-h.png deleted file mode 100644 index fe000425..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Linear-h.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Linear-v.jpg b/cinelerra-5.1/plugins/shapes/Linear-v.jpg new file mode 100644 index 00000000..f663ae4a Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Linear-v.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Linear-v.png b/cinelerra-5.1/plugins/shapes/Linear-v.png deleted file mode 100644 index f456883a..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Linear-v.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Plasma_01.jpg b/cinelerra-5.1/plugins/shapes/Plasma_01.jpg new file mode 100644 index 00000000..de7756c2 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Plasma_01.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Plasma_01.png b/cinelerra-5.1/plugins/shapes/Plasma_01.png deleted file mode 100644 index 17257752..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Plasma_01.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.jpg b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.jpg new file mode 100644 index 00000000..98ebc39b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.png b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.png deleted file mode 100644 index 8f615633..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x05.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.jpg b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.jpg new file mode 100644 index 00000000..2a4fe61d Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.png b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.png deleted file mode 100644 index 58dccf38..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-h-x10.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.jpg b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.jpg new file mode 100644 index 00000000..fc4a2e91 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.png b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.png deleted file mode 100644 index a9d61bd6..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x05.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.jpg b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.jpg new file mode 100644 index 00000000..e38f387b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.png b/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.png deleted file mode 100644 index 5d4ab073..00000000 Binary files a/cinelerra-5.1/plugins/shapes/Venetian-Blinds-v-x10.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/asimetric_clocks.jpg b/cinelerra-5.1/plugins/shapes/asimetric_clocks.jpg new file mode 100644 index 00000000..bee821e6 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/asimetric_clocks.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/asimetric_clocks_2.jpg b/cinelerra-5.1/plugins/shapes/asimetric_clocks_2.jpg new file mode 100644 index 00000000..4b4ed6b0 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/asimetric_clocks_2.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/asymmetric_clocks.png b/cinelerra-5.1/plugins/shapes/asymmetric_clocks.png deleted file mode 100644 index a5e4bac0..00000000 Binary files a/cinelerra-5.1/plugins/shapes/asymmetric_clocks.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/audio.jpg b/cinelerra-5.1/plugins/shapes/audio.jpg new file mode 100644 index 00000000..18798304 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/audio.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/audio.png b/cinelerra-5.1/plugins/shapes/audio.png deleted file mode 100644 index 9a5651b5..00000000 Binary files a/cinelerra-5.1/plugins/shapes/audio.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/burst.jpg b/cinelerra-5.1/plugins/shapes/burst.jpg new file mode 100644 index 00000000..90682e96 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/burst.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/burst.png b/cinelerra-5.1/plugins/shapes/burst.png deleted file mode 100644 index b605c6df..00000000 Binary files a/cinelerra-5.1/plugins/shapes/burst.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/circle.jpg b/cinelerra-5.1/plugins/shapes/circle.jpg new file mode 100644 index 00000000..0d6c90fd Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/circle.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/circle.png b/cinelerra-5.1/plugins/shapes/circle.png deleted file mode 100644 index 610fe6cb..00000000 Binary files a/cinelerra-5.1/plugins/shapes/circle.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/clock.jpg b/cinelerra-5.1/plugins/shapes/clock.jpg new file mode 100644 index 00000000..999738d9 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/clock.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/clock.png b/cinelerra-5.1/plugins/shapes/clock.png deleted file mode 100644 index 0a3f1411..00000000 Binary files a/cinelerra-5.1/plugins/shapes/clock.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/crazy_clock.jpg b/cinelerra-5.1/plugins/shapes/crazy_clock.jpg new file mode 100644 index 00000000..be36898e Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/crazy_clock.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/crazy_clock.png b/cinelerra-5.1/plugins/shapes/crazy_clock.png deleted file mode 100644 index 52b2b859..00000000 Binary files a/cinelerra-5.1/plugins/shapes/crazy_clock.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/cream.jpg b/cinelerra-5.1/plugins/shapes/cream.jpg new file mode 100644 index 00000000..0d980eec Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/cream.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/cream.png b/cinelerra-5.1/plugins/shapes/cream.png deleted file mode 100644 index 6b4933ce..00000000 Binary files a/cinelerra-5.1/plugins/shapes/cream.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/film.jpg b/cinelerra-5.1/plugins/shapes/film.jpg new file mode 100644 index 00000000..466ec5b5 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/film.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/film.png b/cinelerra-5.1/plugins/shapes/film.png deleted file mode 100644 index c1382ece..00000000 Binary files a/cinelerra-5.1/plugins/shapes/film.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/film2.jpg b/cinelerra-5.1/plugins/shapes/film2.jpg new file mode 100644 index 00000000..72183d8b Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/film2.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/heart.jpg b/cinelerra-5.1/plugins/shapes/heart.jpg new file mode 100644 index 00000000..1385c81d Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/heart.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/heart.png b/cinelerra-5.1/plugins/shapes/heart.png deleted file mode 100644 index 76793239..00000000 Binary files a/cinelerra-5.1/plugins/shapes/heart.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/mosaic.jpg b/cinelerra-5.1/plugins/shapes/mosaic.jpg new file mode 100644 index 00000000..ff95e68d Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/mosaic.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/mosaic.png b/cinelerra-5.1/plugins/shapes/mosaic.png deleted file mode 100644 index eea4177b..00000000 Binary files a/cinelerra-5.1/plugins/shapes/mosaic.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/multi_box.jpg b/cinelerra-5.1/plugins/shapes/multi_box.jpg new file mode 100644 index 00000000..89185b9e Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/multi_box.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/multi_box.png b/cinelerra-5.1/plugins/shapes/multi_box.png deleted file mode 100644 index 4d71a8d7..00000000 Binary files a/cinelerra-5.1/plugins/shapes/multi_box.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/rare_spiral.jpg b/cinelerra-5.1/plugins/shapes/rare_spiral.jpg new file mode 100644 index 00000000..c30bcab1 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/rare_spiral.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/rare_spiral.png b/cinelerra-5.1/plugins/shapes/rare_spiral.png deleted file mode 100644 index d31a9f0b..00000000 Binary files a/cinelerra-5.1/plugins/shapes/rare_spiral.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/specks.jpg b/cinelerra-5.1/plugins/shapes/specks.jpg new file mode 100644 index 00000000..c1cd5276 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/specks.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/specks.png b/cinelerra-5.1/plugins/shapes/specks.png deleted file mode 100644 index 63a75b69..00000000 Binary files a/cinelerra-5.1/plugins/shapes/specks.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/spiral.jpg b/cinelerra-5.1/plugins/shapes/spiral.jpg new file mode 100644 index 00000000..b420ab45 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/spiral.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/spiral.png b/cinelerra-5.1/plugins/shapes/spiral.png deleted file mode 100644 index e2eaa805..00000000 Binary files a/cinelerra-5.1/plugins/shapes/spiral.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/spiral_clock.jpg b/cinelerra-5.1/plugins/shapes/spiral_clock.jpg new file mode 100644 index 00000000..944c1708 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/spiral_clock.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/spiral_clock.png b/cinelerra-5.1/plugins/shapes/spiral_clock.png deleted file mode 100644 index 0e5e15d7..00000000 Binary files a/cinelerra-5.1/plugins/shapes/spiral_clock.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/square.jpg b/cinelerra-5.1/plugins/shapes/square.jpg new file mode 100644 index 00000000..7e17cabf Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/square.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/square.png b/cinelerra-5.1/plugins/shapes/square.png deleted file mode 100644 index 239d632a..00000000 Binary files a/cinelerra-5.1/plugins/shapes/square.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/squares.jpg b/cinelerra-5.1/plugins/shapes/squares.jpg new file mode 100644 index 00000000..ebc160ae Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/squares.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/squares.png b/cinelerra-5.1/plugins/shapes/squares.png deleted file mode 100644 index 3a584715..00000000 Binary files a/cinelerra-5.1/plugins/shapes/squares.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/star.jpg b/cinelerra-5.1/plugins/shapes/star.jpg new file mode 100644 index 00000000..181a9442 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/star.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/star.png b/cinelerra-5.1/plugins/shapes/star.png deleted file mode 100644 index ca97e5a7..00000000 Binary files a/cinelerra-5.1/plugins/shapes/star.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/tile2x2h.jpg b/cinelerra-5.1/plugins/shapes/tile2x2h.jpg new file mode 100644 index 00000000..eed469ec Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/tile2x2h.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/tile2x2h.png b/cinelerra-5.1/plugins/shapes/tile2x2h.png deleted file mode 100644 index b1066717..00000000 Binary files a/cinelerra-5.1/plugins/shapes/tile2x2h.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/tile2x2v.jpg b/cinelerra-5.1/plugins/shapes/tile2x2v.jpg new file mode 100644 index 00000000..a45596c4 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/tile2x2v.jpg differ diff --git a/cinelerra-5.1/plugins/shapes/tile2x2v.png b/cinelerra-5.1/plugins/shapes/tile2x2v.png deleted file mode 100644 index 7734f59c..00000000 Binary files a/cinelerra-5.1/plugins/shapes/tile2x2v.png and /dev/null differ diff --git a/cinelerra-5.1/plugins/shapes/water.jpg b/cinelerra-5.1/plugins/shapes/water.jpg new file mode 100644 index 00000000..02dd81d4 Binary files /dev/null and b/cinelerra-5.1/plugins/shapes/water.jpg differ diff --git a/cinelerra-5.1/plugins/shapewipe/shapewipe.C b/cinelerra-5.1/plugins/shapewipe/shapewipe.C index b11006d0..a0128fea 100644 --- a/cinelerra-5.1/plugins/shapewipe/shapewipe.C +++ b/cinelerra-5.1/plugins/shapewipe/shapewipe.C @@ -34,6 +34,7 @@ #include #include #include +#include #include #define SHAPE_SEARCHPATH "/shapes" @@ -346,8 +347,6 @@ ShapeWipeMain::ShapeWipeMain(PluginServer *server) current_filename[0] = '\0'; current_name[0] = 0; pattern_image = 0; - min_value = 255; - max_value = 0; last_preserve_aspect = 0; shapes_initialized = 0; shape_paths.set_array_delete(); @@ -381,7 +380,7 @@ void ShapeWipeMain::init_shapes() { if( !shapes_initialized ) { FileSystem fs; - fs.set_filter("*.png"); + fs.set_filter("[*.png][*.jpg]"); char shape_path[BCTEXTLEN]; sprintf(shape_path, "%s%s", get_plugin_dir(), SHAPE_SEARCHPATH); fs.update(shape_path); @@ -401,7 +400,6 @@ void ShapeWipeMain::init_shapes() } } - int ShapeWipeMain::load_configuration() { read_data(get_prev_keyframe(get_source_position())); @@ -409,89 +407,37 @@ int ShapeWipeMain::load_configuration() } int ShapeWipeMain::read_pattern_image(char *shape_name, - int new_frame_width, int new_frame_height) -{ - png_byte header[8]; - int is_png; - int row, col; - int pixel_width; - unsigned char value; - png_uint_32 width; - png_uint_32 height; - png_byte color_type; - png_byte bit_depth; - png_structp png_ptr = 0; - png_infop info_ptr = 0; - png_infop end_info = 0; - png_bytep *image = 0; - FILE *fp = 0; - frame_width = new_frame_width; - frame_height = new_frame_height; - int ret = 0; - + int frame_width, int frame_height) +{ + VFrame *pattern = 0; + int ret = 0, fd = -1; + int is_png = 0; + unsigned char header[10]; // Convert name to filename - int k = shape_paths.size(); + int k = shape_paths.size(), hsz = sizeof(header); while( --k>=0 && strcmp(shape_titles[k], shape_name) ); if( k < 0 ) ret = 1; if( !ret ) { strcpy(current_filename, shape_paths[k]); - fp = fopen(current_filename, "rb"); - if( !fp ) ret = 1; + fd = ::open(current_filename, O_RDONLY); + if( fd < 0 || read(fd,header,hsz) != hsz ) ret = 1; } if( !ret ) { - fread(header, 1, 8, fp); - is_png = !png_sig_cmp(header, 0, 8); - if( !is_png ) ret = 1; + is_png = !png_sig_cmp(header, 0, hsz); + if( !is_png && strncmp("JFIF", (char*)header+6, 4) ) ret = 1; } if( !ret ) { - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); - if( !png_ptr ) ret = 1; + lseek(fd, 0, SEEK_SET); + pattern = is_png ? + VFramePng::vframe_png(fd, 1, 1) : + VFrameJpeg::vframe_jpeg(fd, 1, 1, BC_GREY8); + if( !pattern ) ret = 1; } - if( !ret ) { - /* Tell libpng we already checked the first 8 bytes */ - png_set_sig_bytes(png_ptr, 8); - info_ptr = png_create_info_struct(png_ptr); - if( !info_ptr ) ret = 1; - } - if( !ret ) { - end_info = png_create_info_struct(png_ptr); - if( !end_info ) ret = 1; + if( fd >= 0 ) { + close(fd); fd = -1; } if( !ret ) { - png_init_io(png_ptr, fp); - png_read_info(png_ptr, info_ptr); - - color_type = png_get_color_type(png_ptr, info_ptr); - bit_depth = png_get_bit_depth(png_ptr, info_ptr); - width = png_get_image_width (png_ptr, info_ptr); - height = png_get_image_height(png_ptr, info_ptr); - - /* Skip the alpha channel if present - * stripping alpha currently doesn't work in conjunction with - * converting to grayscale in libpng */ - pixel_width = color_type & PNG_COLOR_MASK_ALPHA ? 2 : 1; - /* Convert 16 bit data to 8 bit */ - if( bit_depth == 16 ) png_set_strip_16(png_ptr); - /* Expand to 1 pixel per byte if necessary */ - if( bit_depth < 8 ) png_set_packing(png_ptr); - - /* Convert to grayscale */ - if( color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA ) - png_set_rgb_to_gray_fixed(png_ptr, 1, -1, -1); - - /* Allocate memory to hold the original png image */ - image = (png_bytep*)new png_bytep[height]; - for( row=0; row<(int)height; ++row ) - image[row] = new png_byte[width*pixel_width]; - - /* Allocate memory for the pattern image that will actually be - * used for the wipe */ - pattern_image = new unsigned char*[frame_height]; - - png_read_image(png_ptr, image); - png_read_end(png_ptr, end_info); - + int width = pattern->get_w(), height = pattern->get_h(); double row_factor, col_factor; double row_offset = 0.5, col_offset = 0.5; // for rounding @@ -514,39 +460,41 @@ int ShapeWipeMain::read_pattern_image(char *shape_name, row_factor = (double)(height-1)/(double)(frame_height-1); col_factor = (double)(width-1)/(double)(frame_width-1); } + int out_w = width * col_factor, out_h = height * row_factor; + if( out_w != width || out_h != height ) { + VFrame *new_pattern = new VFrame(frame_width, frame_height, BC_GREY8); + new_pattern->transfer_from(pattern, 0, col_offset,row_offset, + frame_width*col_factor, frame_height*row_factor); + delete pattern; pattern = new_pattern; + } + unsigned char **rows = pattern->get_rows(); + unsigned char min = 0xff, max = 0x00; // first, determine range min..max for( int y=0; y max_value ) max_value = value; + unsigned char value = row[x]; + if( value < min ) min = value; + if( value > max ) max = value; } } - int range = max_value - min_value; + if( min > max ) min = max; + int range = max - min; if( !range ) range = 1; + pattern_image = new unsigned char*[frame_height]; // scale to fade normalized pattern_image for( int y=0; yframe_width = frame_width; + this->frame_height = frame_height; } - if( png_ptr || info_ptr || end_info ) - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - if( fp ) - fclose(fp); - if( image ) { - for( row=0; row<(int)height; ++row ) - delete [] image[row]; - delete [] image; - } return ret; } @@ -556,8 +504,6 @@ void ShapeWipeMain::reset_pattern_image() for( int y=0; yget_submitted_path(); - char txt[BCSTRLEN]; sprintf(txt, "<%s %s>", _(KW_PNG), path); + char txt[BCTEXTLEN]; sprintf(txt, "<%s %s>", _(KW_PNG), path); window->lock_window("TitlePngPopup::handle_done_event"); window->insert_ibeam(txt); window->unlock_window(); diff --git a/cinelerra-5.1/thirdparty/downloads.txt b/cinelerra-5.1/thirdparty/downloads.txt index 2c54c32e..cb23cf27 100644 --- a/cinelerra-5.1/thirdparty/downloads.txt +++ b/cinelerra-5.1/thirdparty/downloads.txt @@ -2,7 +2,8 @@ https://www.dechifro.org/dcraw/dcraw.c http://download-mirror.savannah.gnu.org/releases//openexr/ilmbase-2.2.1.tar.gz http://gnu.mirrors.pair.com/savannah/savannah//openexr/openexr-2.2.1.tar.gz -https://sourceforge.net/projects/opencvlibrary/files/latest/download?source=directory = 3.2.0 +https://sourceforge.net/projects/opencvlibrary/files/ +https://github.com/opencv/opencv_contrib/archive/ #https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-2.2.0.tar.gz/download http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz https://ieee1394.wiki.kernel.org/index.php/Libraries @@ -33,7 +34,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.6.0/dav1d-0.6.0.tar.gz +https://code.videolan.org/videolan/dav1d/-/archive/0.5.1/dav1d-0.5.1.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