[FFmpeg-devel] [PATCH] move/factorize mirror() to libavutil: av_mirror_int()

Stefano Sabatini stefasab at gmail.com
Thu Jun 21 00:28:30 CEST 2012


On date Thursday 2012-06-21 00:12:32 +0200, Michael Niedermayer encoded:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavcodec/dwt.c        |   90 +++++++++++++++++++++--------------------------
>  libavfilter/transform.c |   14 ++------
>  libavutil/common.h      |   10 ++++++
>  3 files changed, 52 insertions(+), 62 deletions(-)
[...]
> +static inline int av_mirror_int(int v, int m)

Please add some doxy, it is not immediate at all to understand what
this function is supposed to do, even looking at the code.

> +{
> +    while ((unsigned)v > (unsigned)m) {
> +        v = -v;
> +        if (v < 0)
> +            v += 2 * m;
> +    }
> +    return v;
> +}
> +

Looks fine otherwise, and please add minor bump+API changes entry. 
-- 
FFmpeg = Faithful & Free Muttering Political Extensive Gargoyle


More information about the ffmpeg-devel mailing list