]> git.sesse.net Git - mlt/commitdiff
Update module to work with the latest vid.stab version 0.98.
authorJakub Ksiezniak <jksiezniak@gmail.com>
Tue, 7 Jan 2014 17:34:02 +0000 (18:34 +0100)
committerBrian Matherly <pez4brian@yahoo.com>
Tue, 7 Jan 2014 21:01:25 +0000 (15:01 -0600)
* Added a new property "zoomspeed" for adaptive zooming feature.
* Removed a no longer used "sharpen" property.

src/modules/vid.stab/filter_deshake.cpp
src/modules/vid.stab/filter_deshake.yml
src/modules/vid.stab/filter_detect.cpp
src/modules/vid.stab/filter_detect.yml
src/modules/vid.stab/filter_transform.cpp
src/modules/vid.stab/filter_transform.yml

index b998726f104532f16a10c472fecaa896347a510c..ccae5a8f77fbafc60b4a2068188593f383576c03 100644 (file)
@@ -66,6 +66,7 @@ int init_deshake(DeshakeData *data, mlt_properties properties,
        tdconf.crop = (VSBorderType) mlt_properties_get_int(properties, "crop");
        tdconf.zoom = mlt_properties_get_int(properties, "zoom");
        tdconf.optZoom = mlt_properties_get_int(properties, "optzoom");
+       tdconf.zoomSpeed = mlt_properties_get_double(properties, "zoomspeed");
        tdconf.relative = 1;
        tdconf.invert = 0;
 
@@ -131,7 +132,7 @@ static int get_image(mlt_frame frame, uint8_t **image, mlt_image_format *format,
                vsFrameFillFromBuffer(&vsFrame, *image, &md->fi);
                vsMotionDetection(md, &localmotions, &vsFrame);
 
-               motion = vsSimpleMotionsToTransform(td, &localmotions);
+               motion = vsSimpleMotionsToTransform(md->fi, FILTER_NAME, &localmotions);
                vs_vector_del(&localmotions);
 
                vsTransformPrepare(td, &vsFrame, &vsFrame);
@@ -200,7 +201,7 @@ mlt_filter filter_deshake_init(mlt_profile profile, mlt_service_type type,
                mlt_properties_set(properties, "crop", "0");
                mlt_properties_set(properties, "zoom", "0");
                mlt_properties_set(properties, "optzoom", "1");
-               mlt_properties_set(properties, "sharpen", "0.8");
+               mlt_properties_set(properties, "zoomspeed", "0.25");
 
                return filter;
        }
index 98c5232ce3d5006889230b4bccd51263b23b5e64..f9c5b4fb87487f5163b5cea08d70222116a92995 100644 (file)
@@ -143,24 +143,24 @@ parameters:
   - identifier: optzoom
     title: Optimal Zoom
     type: integer
-    description: automatically determine optimal zoom (transform)
+    description: automatically determine optimal zoom. 1 - static zoom, 2 - adaptive zoom (transform)
     readonly: no
     required: no
     minimum: 0
-    maximum: 1
+    maximum: 2
     default: 1
     mutable: yes
     widget: spinner
 
-  - identifier: sharpen
-    title: Sharpen Image
+  - identifier: zoomspeed
+    title: Optimal Zoom Speed
     type: float
-    description: amount of sharpening (transform)
+    description: zoom per frame in percent, (used when optzoom = 2) (transform)
     readonly: no
     required: no
     minimum: 0
-    maximum: 10
-    default: 0.8
+    maximum: 1
+    default: 0.25
     mutable: yes
     widget: spinner
 
index c5dc9219a8fa29d8ecd8d7f8e44e73b3e7fcc1f1..a31b17b21e1f4aba2500b71a002bb252c6df3af3 100644 (file)
@@ -204,7 +204,7 @@ mlt_filter filter_detect_init(mlt_profile profile, mlt_service_type type, const
                mlt_properties_set(properties, "relative", "1");
                mlt_properties_set(properties, "zoom", "0");
                mlt_properties_set(properties, "optzoom", "1");
-               mlt_properties_set(properties, "sharpen", "0.8");
+               mlt_properties_set(properties, "zoomspeed", "0.25");
 
                mlt_properties_set(properties, "vid.stab.version", LIBVIDSTAB_VERSION);
                mlt_properties_set_data(properties, "vectors", data->animation, 1, (mlt_destructor) mlt_animation_close,
index 11865ef7706213dfd3b76e76050c98d2532f59f6..6bb73eaa8a076444f356fa4c2229b0f92f604fc1 100644 (file)
@@ -201,15 +201,27 @@ parameters:
   - identifier: optzoom
     title: Optimal Zoom
     type: integer
-    description: automatically determine optimal zoom (transform)
+    description: automatically determine optimal zoom. 1 - static zoom, 2 - adaptive zoom (transform)
     readonly: no
     required: no
     minimum: 0
-    maximum: 1
+    maximum: 2
     default: 1
     mutable: yes
     widget: spinner
 
+  - identifier: zoomspeed
+    title: Optimal Zoom Speed
+    type: float
+    description: zoom per frame in percent, (used when optzoom = 2) (transform)
+    readonly: no
+    required: no
+    minimum: 0
+    maximum: 1
+    default: 0.25
+    mutable: yes
+    widget: spinner
+
   - identifier: refresh
     description: >
       Applications should set this when it updates a transform parameter.
index 3b23372417142f7cab15a46cc533125ba21de992..c69d395c68f3063e95f7c144ded598b754e5c05d 100644 (file)
@@ -102,6 +102,7 @@ inline int initialize_transforms(TransformData *data, int *width, int *height, m
        conf.crop = (VSBorderType) mlt_properties_get_int(properties, "crop");
        conf.zoom = mlt_properties_get_int(properties, "zoom");
        conf.optZoom = mlt_properties_get_int(properties, "optzoom");
+       conf.zoomSpeed = mlt_properties_get_double(properties, "zoomspeed");
        conf.relative = mlt_properties_get_int(properties, "relative");
        conf.invert = mlt_properties_get_int(properties, "invert");
        if (mlt_properties_get_int(properties, "tripod") != 0)
@@ -247,6 +248,7 @@ mlt_filter filter_transform_init(mlt_profile profile, mlt_service_type type, con
                mlt_properties_set(properties, "relative", "1");
                mlt_properties_set(properties, "zoom", "0");
                mlt_properties_set(properties, "optzoom", "1");
+               mlt_properties_set(properties, "zoomspeed", "0.25");
 
                return filter;
        }
index e8c475aa6335b4606d8019da0fd97f4dfd5d81dc..3df01e23984c186b61f8775eff220952993ad52b 100644 (file)
@@ -189,15 +189,27 @@ parameters:
   - identifier: optzoom
     title: Optimal Zoom
     type: integer
-    description: automatically determine optimal zoom (transform)
+    description: automatically determine optimal zoom. 1 - static zoom, 2 - adaptive zoom (transform)
     readonly: no
     required: no
     minimum: 0
-    maximum: 1
+    maximum: 2
     default: 1
     mutable: yes
     widget: spinner
 
+  - identifier: zoomspeed
+    title: Optimal Zoom Speed
+    type: float
+    description: zoom per frame in percent, (used when optzoom = 2) (transform)
+    readonly: no
+    required: no
+    minimum: 0
+    maximum: 1
+    default: 0.25
+    mutable: yes
+    widget: spinner
+
   - identifier: refresh
     description: >
       Applications should set this when it updates a transform parameter.