[Kdenlive-devel] different videostab filter

Dan Dennedy dan at dennedy.org
Sat Sep 10 23:29:07 UTC 2011


2011/9/2 Marco Gittler <marco at gitma.de>:
> Hi
>
> i integrated a second (very nice) videostab from http://public.hronopik.de/vid.stab/features.php?lang=en
> which seems to be make a bit better job. (https://github.com/gmarco/mlt/commits/videostab)
>
> This video http://www.youtube.com/watch?v=cRA5H1LYzM4&feature=mfu_in_order&list=UL
> is very shaky and using the filter videostab, the result has still some rolling in the video. Also it has some more "stretch areas" in den borders.
>
> The videostab2 filter seems to use a complete different algo.
> -It has much more parameter to be adjusted (not implemented yet)
> -is can handle yuv and rgb data (rgb is _much_ slower tha yuv , yuv nearly as fast as videostab filter )
> -is can remove the rolling of the camera much better
> -it will zoom in to avoid the "stretch borders"
>
> This is only a Test version. But i think, it would be worth to have this too in mlt (a bit work is to make it full working (parameters/debug log) )
>
> Usage of the filter is equal to videostab.

You must address the following problems before I will merge it into MLT.

1) Why did you revert my change to uncomment the values.h include in
stab/estimate.c? It is needed to get MAXFLOAT; otherwise, it fails to
build for me. If you need to comment it out to make it build, then
provide a universal fix.

2) Makefile includes flags -mmmx  -msse  -msse2. We cannot just
arbitrarily add these flags without respecting the configure --disable
options, and there is no reason to add them only for videostab and no
other code. Just remove them. Also, make gives 'cc1: error:
unrecognized command line option "-fasm-blocks"'

3) Why do you always ignore the mlt coding conventions in all of the
code that you personally contribute? I am not talking about other
peoples' code files that you copy in - that should retain original
formatting. For example, in filter_videostab2.c, right in the middle
of the code I wrote consistent with the conventions, you put things
like
    if (dat && dat->data){
and
    (*format==mlt_image_rgb24?0:1)

4) Remove the commented code that obviously no longer belongs.

5) There is no filter_videostab2.yml.

6) This is optional, but I think you should set the interpolation
(TransformData.interpoltype) based on the frame property
"rescale.interp" See
src/modules/avformat/filter_swscale.c:filter_scale() how to interpret
that property. By default, the SDL consumers use low quality "nearest"
and avformat uses higher quality "bilinear."

7) In filter_videostab2_init(), you allocate StabData, but so does
stabilize_init() later in the function. I suggest just remove the call
the stabilize_init().

8) In filter_get_image(), you allocate TransformData with
mlt_pool_alloc() but tell the property to destroy it with
mlt_properties_close - should mlt_pool_release.

9) There is a printf() in filter_get_image().

-- 
+-DRD-+




More information about the Kdenlive mailing list