[FFmpeg-cvslog] libavfilter: add deshake filter

Clément Bœsch ubitux at gmail.com
Tue Oct 4 08:07:18 CEST 2011


On Tue, Oct 04, 2011 at 02:29:51AM +0200, danielgtaylor wrote:
> ffmpeg | branch: master | danielgtaylor <dan at programmer-art.org> | Tue Oct  4 01:31:18 2011 +0200| [0cc2ed4a206551d3c1def87e6b40c67bc1caf294] | committer: Michael Niedermayer
> 
> libavfilter: add deshake filter
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cc2ed4a206551d3c1def87e6b40c67bc1caf294
> ---
> 
>  libavfilter/Makefile     |    4 +-
>  libavfilter/allfilters.c |    1 +
>  libavfilter/vf_deshake.c |  521 ++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 525 insertions(+), 1 deletions(-)
> 
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index 5fc0e48..d35020f 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -18,7 +18,8 @@ OBJS = allfilters.o                                                     \
>         defaults.o                                                       \
>         drawutils.o                                                      \
>         formats.o                                                        \
> -       graphparser.o                                                    \
> +       graphparser.o							\

Tabs fixed

[...]
> +
> +/**
> + * @file libavfilter/vf_deshake.c

Extra parameter removed.

[...]
> +enum SearchMethod {
> +    EXHAUSTIVE,         //< Search all possible positions
> +    SMART_EXHAUSTIVE,   //< Search most possible positions (faster)
> +    SEARCH_COUNT
> +};
> +
> +typedef struct {
> +    double x;              //< Horizontal shift
> +    double y;              //< Vertical shift
> +} MotionVector;
> +
> +typedef struct {
> +    MotionVector vector; //< Motion vector
> +    double angle;        //< Angle of rotation
> +    double zoom;         //< Zoom percentage
> +} Transform;
> +
> +typedef struct {
> +    AVFilterBufferRef *ref;     //< Previous frame
> +    int rx;                     //< Maximum horizontal shift
> +    int ry;                     //< Maximum vertical shift
> +    enum FillMethod edge;       //< Edge fill method
> +    int blocksize;              //< Size of blocks to compare
> +    int contrast;               //< Contrast threshold
> +    enum SearchMethod search;   //< Motion search method
> +    AVCodecContext *avctx;
> +    DSPContext c;               //< Context providing optimized SAD methods
> +    Transform last;             //< Transform from last frame
> +    int refcount;             //< Number of reference frames (defines averaging window)
> +    FILE *fp;
> +} DeshakeContext;
> +

Doxycomments fixed.

[...]
> +static void end_frame(AVFilterLink *link)
> +{
> +    DeshakeContext *deshake = link->dst->priv;
> +    AVFilterBufferRef *in  = link->cur_buf;
> +    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
> +    Transform t;
> +    static float matrix[9];
> +    static Transform avg = {

Why static?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20111004/4defa90c/attachment.asc>


More information about the ffmpeg-cvslog mailing list