From: Good Guy Date: Wed, 31 Jul 2019 00:33:22 +0000 (-0600) Subject: repair clear_frame for alpha only cmodels, update msg txt X-Git-Tag: 2019-08~8 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=048758971ba1956419f8f6d60100c2de28f1b16f;p=goodguy%2Fcinelerra.git repair clear_frame for alpha only cmodels, update msg txt --- diff --git a/cinelerra-5.1/guicast/bccmdl.py b/cinelerra-5.1/guicast/bccmdl.py index 9d848c55..92499b63 100755 --- a/cinelerra-5.1/guicast/bccmdl.py +++ b/cinelerra-5.1/guicast/bccmdl.py @@ -743,7 +743,7 @@ fd = open(xfn + ".C", "w") # transfer switch print("#include \"xfer.h\"", file=fd) print("", file=fd) -print("void %sxfer()" % class_qual, file=fd) +print("int %sxfer()" % class_qual, file=fd) print("{", file=fd) mx_no = mx_bcmdl + 1 print(" static xfer_fn xfns[%d][%d] = {" % (mx_no, mx_no), file=fd) @@ -765,7 +765,7 @@ for fr_no in range(mx_no): print("}, ", file=fd) print(" }; ", file=fd) print(" xfn = xfns[in_colormodel][out_colormodel];", file=fd) -print(" xfer_slices(out_w*out_h/0x80000+1);", file=fd) +print(" return xfer_slices(out_w*out_h/0x80000+1);", file=fd) print("}", file=fd) print("", file=fd) print("#include \"bcxfer.C\"", file=fd) diff --git a/cinelerra-5.1/guicast/bccmodels.h b/cinelerra-5.1/guicast/bccmodels.h index 20d2a899..28b58459 100644 --- a/cinelerra-5.1/guicast/bccmodels.h +++ b/cinelerra-5.1/guicast/bccmodels.h @@ -135,7 +135,7 @@ public: int in_x, int in_y, int in_w, int in_h, int in_rowspan, int bg_color); // paint buffer solid color - static void init_color(int color, int alpha, + static int init_color(int color, int alpha, unsigned char **output_rows, int out_colormodel, unsigned char *out_yp, unsigned char *out_up, unsigned char *out_vp, int out_x, int out_y, int out_w, int out_h, int out_rowspan); diff --git a/cinelerra-5.1/guicast/bcxfer.C b/cinelerra-5.1/guicast/bcxfer.C index 4b98f118..263daaa9 100644 --- a/cinelerra-5.1/guicast/bcxfer.C +++ b/cinelerra-5.1/guicast/bcxfer.C @@ -180,7 +180,8 @@ void BC_CModels::transfer(unsigned char **output_rows, unsigned char **input_row out_yp, out_up, out_vp, in_yp, in_up, in_vp, in_x, in_y, in_w, in_h, out_x, out_y, out_w, out_h, in_colormodel, out_colormodel, bg_color,0xff, in_rowspan, out_rowspan); - xfer.xfer(); + if( xfer.xfer() ) + printf("BC_CModels::transfer failed: %d to %d\n", in_colormodel, out_colormodel); } void BC_CModels::transfer( @@ -194,11 +195,12 @@ void BC_CModels::transfer( output_ptrs, out_colormodel, out_x, out_y, out_w, out_h, out_rowspan, input_ptrs, in_colormodel, in_x, in_y, in_w, in_h, in_rowspan, bg_color,0xff); - xfer.xfer(); + if( xfer.xfer() ) + printf("BC_CModels::transfer failed: %d to %d\n", in_colormodel, out_colormodel); } // color is rgb -void BC_CModels::init_color(int color, int alpha, +int BC_CModels::init_color(int color, int alpha, unsigned char **output_rows, int out_colormodel, unsigned char *out_yp, unsigned char *out_up, unsigned char *out_vp, int out_x, int out_y, int out_w, int out_h, int out_rowspan) @@ -206,7 +208,7 @@ void BC_CModels::init_color(int color, int alpha, BC_Xfer xfer(output_rows, 0, out_yp,out_up,out_vp, 0,0,0, 0,0,0,0, out_x,out_y,out_w,out_h, BC_TRANSPARENCY, out_colormodel, color,alpha, 0, out_rowspan); - xfer.xfer(); + return xfer.xfer(); } // specialized functions @@ -262,9 +264,9 @@ BC_Xfer::Slicer *BC_Xfer::SlicerList::get_slicer(BC_Xfer *xp) return slicer; } -void BC_Xfer::xfer_slices(int slices) +int BC_Xfer::xfer_slices(int slices) { - if( !xfn ) return; + if( !xfn ) return 1; int max_slices = BC_Resources::machine_cpus/2; if( slices > max_slices ) slices = max_slices; if( slices < 1 ) slices = 1; @@ -291,6 +293,7 @@ void BC_Xfer::xfer_slices(int slices) slicers.append(active[i]); slicers.unlock(); } + return 0; } BC_Xfer::Slicer::Slicer(BC_Xfer *xp) diff --git a/cinelerra-5.1/guicast/bcxfer.h b/cinelerra-5.1/guicast/bcxfer.h index c1234604..d743956f 100644 --- a/cinelerra-5.1/guicast/bcxfer.h +++ b/cinelerra-5.1/guicast/bcxfer.h @@ -244,8 +244,8 @@ public: uint32_t bg_r, bg_g, bg_b, bg_a; float bg_fr, bg_fg, bg_fb, bg_fa; - void xfer(); - void xfer_slices(int slices); + int xfer(); + int xfer_slices(int slices); typedef void (BC_Xfer::*xfer_fn)(unsigned y0, unsigned y1); xfer_fn xfn; diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index 4960ff26..4c1aa390 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -998,12 +998,12 @@ int VFrame::get_clear_alpha() { return clear_alpha; } void VFrame::clear_frame() { - if( clear_color >= 0 ) { - BC_CModels::init_color(clear_color, clear_alpha, get_rows(), get_color_model(), - get_y(), get_u(), get_v(), 0,0, get_w(),get_h(), get_bytes_per_line()); - } - else - black_frame(); + if( clear_color >= 0 && + !BC_CModels::init_color(clear_color, clear_alpha, + get_rows(), get_color_model(), get_y(), get_u(), get_v(), + 0,0, get_w(),get_h(), get_bytes_per_line()) ) + return; + black_frame(); } void VFrame::rotate90() diff --git a/cinelerra-5.1/msg/txt b/cinelerra-5.1/msg/txt index edb45636..54df9239 100644 --- a/cinelerra-5.1/msg/txt +++ b/cinelerra-5.1/msg/txt @@ -8,6 +8,11 @@ Cinfinity icons selected in Preferences Sam (CC BY 3.0, Cakewalk and Neophyte themes by Olaf Wolff (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/) . +July 2019 New Features of note: + Completion of Masking improvements with Preset Shapes, Center + and Normalize buttons, plus x/y scaling in 1 direction only. + Provision for usage of Rectified Audio waveforms was added. + Spanning Keyframes is now isolated to avoid interference. June 2019 New Features of note: Hardware acceleration Nvenc for Nvidia boards rendering in. More masking improvements to include tracks, solo, & gangs.