change composer to chroma only - no src alpha blend, resize about pref, new expanders...
authorGood Guy <good1.2guy@gmail.com>
Sat, 20 Oct 2018 22:19:00 +0000 (16:19 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sat, 20 Oct 2018 22:19:00 +0000 (16:19 -0600)
13 files changed:
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/canvas.C
cinelerra-5.1/cinelerra/playback3d.C
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/cinelerra/vdevicex11.C
cinelerra-5.1/expanders.txt
cinelerra-5.1/ffmpeg/plugin.opts
cinelerra-5.1/guicast/bccmdl.py
cinelerra-5.1/guicast/bccmodels.C
cinelerra-5.1/guicast/bccmodels.h
cinelerra-5.1/guicast/bclistbox.inc
cinelerra-5.1/guicast/bcxfer.C
cinelerra-5.1/info/plugins.txt

index 218523974a544449663271b79888c6afc7163c59..3f9f9b2fa0a82161d150047d294b992c95c429c9 100644 (file)
@@ -1719,6 +1719,8 @@ void AWindowGUI::sort_assets()
 void AWindowGUI::sort_folders()
 {
        folder_lock->lock("AWindowGUI::update_assets");
+//     folder_list->collapse_recursive(&folders, 0);
+       folder_list->set_autoplacement(&folders, 0, 1);
        sort_picons(&folders);
        folder_list->update_format(folder_list->get_format(), 0);
        folder_lock->unlock();
index 2a478d41a93c5ab04b3902001ee04d3870caf794..2b3953002d58cc03f8dc56321dd223baea9ede1e 100644 (file)
@@ -844,7 +844,16 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
 // OpenGL does YUV->RGB in the compositing step
        if( use_opengl )
                best_color_model = BC_RGB888;
-
+       else if( BC_CModels::has_alpha(best_color_model) ) {
+               best_color_model =
+                       BC_CModels::is_float(best_color_model ) ?
+                               BC_RGB_FLOAT :
+                       BC_CModels::is_yuv(best_color_model ) ?
+                               ( BC_CModels::calculate_pixelsize(best_color_model) > 8 ?
+                                       BC_YUV161616 : BC_YUV888 ) :
+                               ( BC_CModels::calculate_pixelsize(best_color_model) > 8 ?
+                                       BC_RGB161616 : BC_RGB888 ) ;
+       }
        int out_w = output_frame->get_w();
        int out_h = output_frame->get_h();
        if( refresh_frame &&
@@ -869,7 +878,7 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
                get_canvas()->lock_window(" Canvas::output_refresh");
        }
        else
-               refresh_frame->copy_from(output_frame);
+               refresh_frame->transfer_from(output_frame, -1);
 }
 
 
index d7da2f505a92c08a8177cab2003280277f0953ff..2ca2a4c68e4d43f35f03595d76f23e8a6483d1d4 100644 (file)
@@ -724,11 +724,11 @@ void Playback3D::draw_output(Playback3DCommand *command, int flip_y)
                        BC_GL_YUV_TO_RGB(shader);
                }
 
-               if(BC_CModels::components(color_model) == 4)
-               {
-                       glEnable(GL_BLEND);
-                       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-               }
+//             if(BC_CModels::components(color_model) == 4)
+//             {
+//                     glEnable(GL_BLEND);
+//                     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+//             }
 
                command->frame->draw_texture(
                        command->in_x1, command->in_y1, command->in_x2, command->in_y2,
index af64fed165775894bd6c9908a9dfcc946b0e3601..3e6f7ee28abad150eb8fb00910bb23cd2eeb35b4 100644 (file)
@@ -64,7 +64,7 @@
 
 
 
-#define WIDTH 840
+#define WIDTH 860
 #define HEIGHT 700
 
 
index ee1feaa3c8ff092a4638caeff126a842ea0a4dc2..ea8720dbf2f777eea591644eba51bd3a1c13d4ae 100644 (file)
@@ -523,7 +523,7 @@ int VDeviceX11::write_buffer(VFrame *output_channels, EDL *edl)
                                0, 0, output_channels->get_w(), output_channels->get_h(),
                                0, 0, bitmap->get_w(), bitmap->get_h(),
                                output_channels->get_color_model(), bitmap->get_color_model(),
-                               0, output_channels->get_w(), bitmap->get_w());
+                               -1, output_channels->get_w(), bitmap->get_w());
                }
                else {
                        BC_CModels::transfer(bitmap->get_row_pointers(), output_channels->get_rows(), 0, 0, 0,
@@ -531,7 +531,7 @@ int VDeviceX11::write_buffer(VFrame *output_channels, EDL *edl)
                                (int)output_x1, (int)output_y1, (int)(output_x2 - output_x1), (int)(output_y2 - output_y1),
                                0, 0, (int)(canvas_x2 - canvas_x1), (int)(canvas_y2 - canvas_y1),
                                output_channels->get_color_model(), bitmap->get_color_model(),
-                               0, output_channels->get_w(), bitmap->get_w());
+                               -1, output_channels->get_w(), bitmap->get_w());
                }
        }
 
index 7445d4d102ac4d0744a14f4ca023f973d7962cf7..b4a2d6e90680c4b629cbda6cd4b7826ed74bb478 100644 (file)
@@ -9,13 +9,22 @@ Video Effects
                Histogram
                Histogram Bezier
                Hue saturation
+               Interpolate Bayer
+               RGB - 601
+               Reroute
+               Swap channels
+               Threshold
                VideoScope
+               YUV411
        - FF_Color_Correction
-               F_color
+               F_ciescope
                F_colorbalance
                F_colorchannelmixer
                F_colorkey
                F_colorlevels
+               F_colormatrix
+               F_curves
+               F_elbg
                F_eq
                F_floodfill
                F_histeq
@@ -25,9 +34,14 @@ Video Effects
                F_lutrgb
                F_lutyuv
                F_normalize
+               F_pixscope
                F_pseudocolor
+               F_setrange
+               F_shuffleplanes
+               F_swapuv
                F_tlut2
                F_vectorscope
+               F_vignette
        - Motion
                Motion
                Motion 2 Point
@@ -35,17 +49,81 @@ Video Effects
                MotionCV
                MotionHV
                F_deshake
+               F_mestimate
        - Blur
                Blur
+               Edge
                Linear Blur
                Motion Blur
                Radial Blur
+               Sharpen
+               Unsharp
                Zoom Blur
                F_avgblur
                F_boxblur
+               F_edgedetect
                F_gblur
+               F_sab
                F_smartblur
                F_unsharp
+       - Denoise
+               DeScratch
+               Denoise video
+               DotTV
+               Selective Temporal Averaging
+               Time Average
+               F_atadenoise
+               F_bitplanenoise
+               F_dctdnoiz
+               F_hqdn3d
+               F_nlmeans
+               F_noise
+               F_owdenoise
+               F_removegrain
+               F_vaguedenoiser
+       - Extract Keys
+               Chroma key
+               Chroma key (HSV)
+               CriKey
+               Difference key
+               F_chromakey
+               F_despill
+               F_lumakey
+       - Geometry
+               Auto Scale
+               Flip
+               Lens
+               Perspective
+               Polar
+               Rotate
+               Scale
+               Scale Ratio
+               Sphere Cam
+               Translate
+               Whirl
+               Wave
+               F_cropdetect
+               F_crop
+               F_cover_rect
+               F_drawbox
+               F_drawgraph
+               F_drawgrid
+               F_hflip
+               F_lenscorrection
+               F_perspective
+               F_rotate
+               F_scale
+               F_super2xsai
+               F_transpose
+               F_vflip
+       - Scale
+               Auto Scale
+               F_hqx
+               F_scale
+               F_super2xsai
+               F_xbr
+               Scale
+               Scale Ratio
 Audio Effects
        - Calf
                - Instruments / Generators
index e8863091ed828cc0b69271802d364b4b390aa9a7..dca6523b21e09cdf79dea8674a56ebb204d68c3b 100644 (file)
@@ -163,7 +163,7 @@ interlace
 #join
 kerndeint
 lenscorrection
-#life ratio=2/3:s=200x200
+life ratio=2/3:s=200x200
 loudnorm
 lowpass
 lut
@@ -193,7 +193,7 @@ noise
 #nullsrc
 #overlay x=main_w-overlay_w-10:y=main_h-overlay_h-10
 owdenoise
-#pad
+pad
 #palettegen
 #paletteuse
 #pan 1c|c0=0.9*c0+0.1*c1
index 97b2fc0ebfa78b881eccb85e87d6ff40642e83b0..6b5b9363ee6adc68b03bbcf504b691441ae33fb9 100755 (executable)
@@ -420,6 +420,49 @@ base = {
       "w": " *aop++ = fa;",
     },
   },
+  # no src alpha blend
+  "x8": {
+    "i8": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xff;",
+    },
+    "i16": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xff;",
+    },
+    "fp": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xff;",
+    },
+  },
+  "x16": {
+    "i8": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xffff;",
+    },
+    "i16": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xffff;",
+    },
+    "fp": {
+      "r": " ++inp;",
+      "w": " *out++ = 0xffff;",
+    },
+  },
+  "xfp": {
+    "i8": {
+      "r": " ++inp;",
+      "w": " *out++ = 1.f;",
+    },
+    "i16": {
+      "r": " ++inp;",
+      "w": " *out++ = 1.f;",
+    },
+    "fp": {
+      "r": " ++inp;",
+      "w": " *out++ = 1.f;",
+    },
+  },
   # alpha blend rgb/black, yuv/black, rgb/bg_color
   "brgb": {
     "i8": " r = r*a/0xffu; g = g*a/0xffu; b = b*a/0xffu;",
@@ -506,6 +549,12 @@ add_cmodel(36, "bc_grey8", "i8", "grey8")
 add_cmodel(37, "bc_grey16", "i16", "grey16")
 add_cmodel(38, "bc_gbrp", "i8", "gbrp")
 
+add_cmodel(39, "bc_rgbx8888", "i8", "rgb888", "x8")
+add_cmodel(40, "bc_rgbx16161616", "i16", "rgb161616", "x16")
+add_cmodel(41, "bc_yuvx8888", "i8", "yuv888", "x8")
+add_cmodel(42, "bc_yuvx16161616", "i16", "yuv161616", "x16")
+add_cmodel(43, "bc_rgbx_float", "fp", "rgbfloat", "xfp")
+
 specialize("bc_rgba8888", "bc_transparency", "XFER_rgba8888_to_transparency")
 
 ctype = {
@@ -539,20 +588,23 @@ def is_rgb(nm):
     "bc_bgr888", "bc_bgr8888", "bc_rgb888", "bc_rgba8888", \
     "bc_argb8888", "bc_abgr8888", "bc_rgb", "bc_rgb161616", \
     "bc_rgba16161616", "bc_rgb_float", "bc_rgba_float", \
-    "bc_rgb_floatp", "bc_rgba_floatp", "bc_gbrp", ]
+    "bc_rgb_floatp", "bc_rgba_floatp", "bc_gbrp", \
+    "bc_rgbx8888", "bc_rgbx16161616", "bc_rgbx_float", ]
 
 def is_yuv(nm):
   return nm in [ "bc_yuv888", "bc_yuva8888", "bc_yuv161616", \
     "bc_yuva16161616", "bc_ayuv16161616", "bc_yuv422", "bc_uvy422", "bc_yuv101010", \
     "bc_vyu888", "bc_uyva8888", "bc_yuv420p", "bc_yuv420pi", "bc_yuv422p", \
-    "bc_yuv444p", "bc_yuv411p", "bc_yuv410p", "bc_grey8", "bc_grey16", ]
+    "bc_yuv444p", "bc_yuv411p", "bc_yuv410p", "bc_grey8", "bc_grey16", \
+    "bc_yuvx8888", "bc_yuvx16161616", ]
 
 def is_planar(nm):
   return nm in [ "bc_yuv420p", "bc_yuv420pi", "bc_yuv422p", "bc_yuv444p", \
     "bc_yuv411p", "bc_yuv410p", "bc_rgb_floatp", "bc_rgba_floatp", "bc_gbrp", ]
 
 def is_float(nm):
-  return nm in ["bc_rgb_float", "bc_rgba_float", "bc_rgb_floatp", "bc_rgba_floatp", ]
+  return nm in [ "bc_rgb_float", "bc_rgba_float", "bc_rgbx_float", \
+    "bc_rgb_floatp", "bc_rgba_floatp", ]
 
 def gen_xfer_proto(fd, pfx, cls, fr_cmdl, to_cmdl):
   global dtype, ctype
index 5d3da1ec5e058aa8333fbce24581b55860b77fef..13df1c31ad11ee0ab7c7b5de7177dc45520a59bb 100644 (file)
@@ -58,12 +58,17 @@ int BC_CModels::components(int colormodel)
        case BC_VYU888:
                return 3;
        case BC_RGBA8888:
+       case BC_RGBX8888:
        case BC_ARGB8888:
        case BC_ABGR8888:
        case BC_RGBA16161616:
+       case BC_RGBX16161616:
        case BC_RGBA_FLOAT:
+       case BC_RGBX_FLOAT:
        case BC_YUVA8888:
+       case BC_YUVX8888:
        case BC_YUVA16161616:
+       case BC_YUVX16161616:
        case BC_UYVA8888:
        case BC_AYUV16161616:
                return 4;
@@ -96,18 +101,23 @@ int BC_CModels::calculate_pixelsize(int colormodel)
        case BC_ARGB8888:     return 4;
        case BC_ABGR8888:     return 4;
        case BC_RGBA8888:     return 4;
+       case BC_RGBX8888:     return 4;
        case BC_RGB161616:    return 6;
        case BC_RGBA16161616: return 8;
+       case BC_RGBX16161616: return 8;
        case BC_YUV888:       return 3;
        case BC_YUVA8888:     return 4;
+       case BC_YUVX8888:     return 4;
        case BC_YUV161616:    return 6;
        case BC_YUVA16161616: return 8;
+       case BC_YUVX16161616: return 8;
        case BC_AYUV16161616: return 8;
        case BC_YUV101010:    return 4;
        case BC_VYU888:       return 3;
        case BC_UYVA8888:     return 4;
        case BC_RGB_FLOAT:    return 12;
        case BC_RGBA_FLOAT:   return 16;
+       case BC_RGBX_FLOAT:   return 16;
        case BC_GREY8:        return 1;
        case BC_GREY16:       return 2;
 // Planar
@@ -135,15 +145,20 @@ int BC_CModels::calculate_max(int colormodel)
        case BC_A_FLOAT:      return 1;
        case BC_RGB888:       return 0xff;
        case BC_RGBA8888:     return 0xff;
+       case BC_RGBX8888:     return 0xff;
        case BC_RGB161616:    return 0xffff;
        case BC_RGBA16161616: return 0xffff;
+       case BC_RGBX16161616: return 0xffff;
        case BC_YUV888:       return 0xff;
        case BC_YUVA8888:     return 0xff;
+       case BC_YUVX8888:     return 0xff;
        case BC_YUV161616:    return 0xffff;
        case BC_YUVA16161616: return 0xffff;
+       case BC_YUVX16161616: return 0xffff;
        case BC_AYUV16161616: return 0xffff;
        case BC_RGB_FLOAT:    return 1;
        case BC_RGBA_FLOAT:   return 1;
+       case BC_RGBX_FLOAT:   return 1;
        case BC_RGB_FLOATP:   return 1;
        case BC_RGBA_FLOATP:  return 1;
        case BC_GREY8:        return 0xff;
@@ -242,6 +257,7 @@ int BC_CModels::is_float(int colormodel)
        switch(colormodel) {
        case BC_RGB_FLOAT:
        case BC_RGBA_FLOAT:
+       case BC_RGBX_FLOAT:
        case BC_RGB_FLOATP:
        case BC_RGBA_FLOATP:
                return 1;
@@ -255,8 +271,10 @@ int BC_CModels::is_yuv(int colormodel)
        switch(colormodel) {
        case BC_YUV888:
        case BC_YUVA8888:
+       case BC_YUVX8888:
        case BC_YUV161616:
        case BC_YUVA16161616:
+       case BC_YUVX16161616:
        case BC_AYUV16161616:
        case BC_YUV422:
        case BC_UVY422:
index 6597bc75ca4108b08701e96589d8c752069c8b10..57843aa9e063c45e011d72744d930ab4770ad3e9 100644 (file)
@@ -66,6 +66,12 @@ enum BC_CModel {
        BC_AYUV16161616 = 35,
        BC_GREY8        = 36,
        BC_GREY16       = 37,
+//only used for chroma only xfers (transfer with bg_color < 0)
+       BC_RGBX8888     = 39,
+       BC_RGBX16161616 = 40,
+       BC_YUVX8888     = 41,
+       BC_YUVX16161616 = 42,
+       BC_RGBX_FLOAT   = 43,
 };
 
 // Colormodels purely used by Quicktime are done in Quicktime.
@@ -117,7 +123,7 @@ public:
                int out_h,
                int in_colormodel,
                int out_colormodel,
-               int bg_color,         /* When transfering BC_RGBA8888 to non-alpha this is the background color in 0xRRGGBB hex */
+               int bg_color,         /* -1 for chroma only xfer, else bg color for BC_RGBA8888 to non-alpha */
                int in_rowspan,       /* For planar use the luma rowspan */
                int out_rowspan);     /* For planar use the luma rowspan */
 
index ad53547179eb82d410451abb82552437c58e7fc7..0073019c6550e32f384b1922bf5afaeb241c3637 100644 (file)
@@ -41,7 +41,7 @@
 // Distance from sides of window
 #define LISTBOX_BORDER   2
 #define ICON_MARGIN      2
-#define LISTBOX_INDENT   10
+#define LISTBOX_INDENT   18
 
 // Justification for popup listbox
 #define LISTBOX_LEFT     0
index 44258127849b654483f7f52cc719b53735862e42..95e0c8e52b27a525c1d9e823c8de3ed4bbf06216 100644 (file)
@@ -6,6 +6,21 @@ void BC_Xfer::init(
                uint8_t *in_yp, uint8_t *in_up, uint8_t *in_vp, uint8_t *in_ap, int in_rowspan,
        int bg_color)
 {
+       this->bg_color = bg_color;
+       if( bg_color >= 0 ) {
+               this->bg_r = (bg_color>>16) & 0xff;
+               this->bg_g = (bg_color>>8) & 0xff;
+               this->bg_b = (bg_color>>0) & 0xff;
+       }
+       else { // bg_color < 0, no src blending
+               switch( in_colormodel ) {
+               case BC_RGBA8888:       in_colormodel = BC_RGBX8888;            break;
+               case BC_RGBA16161616:   in_colormodel = BC_RGBX16161616;        break;
+               case BC_YUVA8888:       in_colormodel = BC_YUVX8888;            break;
+               case BC_YUVA16161616:   in_colormodel = BC_YUVX16161616;        break;
+               case BC_RGBA_FLOAT:     in_colormodel = BC_RGBX_FLOAT;          break;
+               }
+       }
        // prevent bounds errors on poorly dimensioned macro pixel formats
        switch( in_colormodel ) {
        case BC_UVY422:
@@ -67,11 +82,6 @@ void BC_Xfer::init(
                break;
        }
        this->total_out_w = out_rowspan;
-       this->bg_color = bg_color;
-       this->bg_r = (bg_color>>16) & 0xff;
-       this->bg_g = (bg_color>>8) & 0xff;
-       this->bg_b = (bg_color>>0) & 0xff;
-
        this->in_pixelsize = BC_CModels::calculate_pixelsize(in_colormodel);
        this->out_pixelsize = BC_CModels::calculate_pixelsize(out_colormodel);
        this->scale = (out_w != in_w) || (in_x != 0);
index 8054ae49937178a1ea06e0bae1b15dae28dae4a9..86e83395b0d0a83e55561dbe46af179cee3d7574 100644 (file)
@@ -300,6 +300,7 @@ F_inflate:  Applies inflate effect.
 F_interlace:   Convert progressive video into interlaced.
 F_kerndeint:   Applies kernel deinterlacing to the input.
 F_lenscorrection: Rectifies the image by correcting for lens distortion.
+F_Life:                Generate a life pattern.
 F_limiter:     Limit pixels components to the specified range.
 F_loop:                Loops video frames.
 F_lumakey:     Turns a certain luma into transparency.
@@ -325,6 +326,8 @@ F_owdenoise:        Denoises using wavelets.
 F_oscilloscope:        2D video oscilloscope.  Useful to measure spatial impulse,
                step responses, and chroma delays.
 F_owndenoise:  Denoises using wavelets.
+F_Pad:         Add paddings to the input image, and place the original
+               input at the provided x, y coordinates.
 F_perms:       Set permissions for the output video frame.
 F_perspective: Corrects the perspective of video.
 F_phase:       Phases shift fields.
@@ -343,7 +346,7 @@ F_realtime: Slows down filtering to match realtime.
 F_removegrain: Removes grain.
 F_repeatfields:        Hard repeat fields based on MPEG repeat field flag.
 F_roberts:     Apply roberts cross operator which performs a simple/quick 2-D
-               spatial gradient measurement on the video (usually a graysacle
+               spatial gradient measurement on the video (usually a grayscale
                image).  It highlights regions of high spatial frequency which
                most likely correspond to edges.
 F_rotate:      Rotates the input image.