disable dav1d tools bld, max gl feather radius=1000
authorGood Guy <good1.2guy@gmail.com>
Tue, 27 Aug 2019 19:15:17 +0000 (13:15 -0600)
committerGood Guy <good1.2guy@gmail.com>
Tue, 27 Aug 2019 19:15:17 +0000 (13:15 -0600)
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/maskauto.h
cinelerra-5.1/cinelerra/playback3d.C
cinelerra-5.1/thirdparty/Makefile

index 371464e..25c436a 100644 (file)
@@ -2139,6 +2139,8 @@ int CWindowMaskFeather::update_value(float v)
 int CWindowMaskFeather::handle_event()
 {
        float v = atof(get_text());
+       if( fabsf(v) > MAX_FEATHER )
+               BC_TumbleTextBox::update((float)(v>=0 ? MAX_FEATHER : -MAX_FEATHER));
        gui->feather_slider->update(v);
        return gui->feather->update_value(v);
 }
@@ -2165,6 +2167,8 @@ int CWindowMaskFeatherSlider::handle_event()
 {
        int sticky = 0;
        float v = get_value();
+       if( fabsf(v) > MAX_FEATHER )
+               v = v>=0 ? MAX_FEATHER : -MAX_FEATHER;
        if( stick && timer->get_difference() >= 250 )
                stick = 0; // no events for .25 sec
        if( stick && (last_v * (v-last_v)) < 0 )
@@ -2177,6 +2181,7 @@ int CWindowMaskFeatherSlider::handle_event()
                }
                if( last_v ) {
                        max *= 1.25;
+                       if( max > MAX_FEATHER ) max = MAX_FEATHER;
                        update(get_w(), v=last_v, -max-5, max+5);
                        button_release_event();
                }
@@ -2193,6 +2198,7 @@ int CWindowMaskFeatherSlider::handle_event()
 int CWindowMaskFeatherSlider::update(float v)
 {
        float vv = fabsf(v);
+       if( vv > MAX_FEATHER ) vv = MAX_FEATHER;
        while( max < vv ) max *= 1.25;
        return update(get_w(), v, -max-5, max+5);
 }
index a3baeb4..a1338f4 100644 (file)
@@ -80,6 +80,8 @@ public:
 };
 
 #define FEATHER_MAX 100
+// GL reg limit 1024 incls shader param list
+#define MAX_FEATHER 1000
 
 class SubMask
 {
@@ -95,8 +97,8 @@ public:
        void dump(FILE *fp);
 
        char name[BCSTRLEN];
-       float fader; // -100 - 100
-       float feather; // -100 - 100
+       float fader;
+       float feather;
        MaskPoints points;
        MaskAuto *keyframe;
 };
index 503e571..a7f185b 100644 (file)
@@ -271,7 +271,7 @@ static const char *feather_frag =
        "#version 430\n"
        "layout(location=0) out vec4 color;\n"
        "uniform sampler2D tex;\n"
-       "const int MAX = 1024;\n"
+       "const int MAX = " SS(MAX_FEATHER) "+1;\n"
        "uniform float psf[MAX];\n"
        "uniform int n;\n"
        "uniform vec2 dxy;\n"
@@ -1408,7 +1408,7 @@ void Playback3D::do_mask_sync(Playback3DCommand *command)
                                if( r ) {
                                        double sig2 = -log(255.0)/(r*r);
                                        int n = abs((int)r) + 1;
-                                       if( n > 1024 ) n = 1024; // MAX
+                                       if( n > MAX_FEATHER+1 ) n = MAX_FEATHER+1;
                                        float psf[n];  // point spot fn
                                        for( int i=0; i<n; ++i )
                                                psf[i] = exp(i*i * sig2);
index 426f3c9..715cabf 100644 (file)
@@ -185,7 +185,11 @@ libaom.cfg_vars?=$(call cmake_config,aom-master)
 libaom.cfg_params?= -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
  -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local
 libaom.mak_params?= ; $(MAKE) -C libaom* install
-dav1d.cfg_vars?=echo "meson build --buildtype release --default-library=both" > configure; chmod +x ./configure;
+dav1d.cfg_vars?=\
+ echo "meson build" > configure; \
+ echo "meson configure build -Denable_tools=false" >> configure; \
+ echo "meson build --buildtype release --default-library=both" >> configure; \
+ chmod +x ./configure;
 dav1d.mak_vars?=(echo "all:"; echo "   ninja -C build") > $(call bld_path,dav1d)/Makefile;
 dav1d.mak_params?=; cd "$(call bld_path,dav1d)"; DESTDIR="$(call bld_path,dav1d)" meson install -C build
 libwebp.cfg_vars?= mkdir build && cd build && $(call cmake_config,..)