[FFmpeg-devel] [PATCH] Implement cropdetect filter.

Michael Niedermayer michaelni
Sat Oct 9 19:11:29 CEST 2010


On Sat, Oct 09, 2010 at 06:51:23PM +0200, Stefano Sabatini wrote:
> On date Saturday 2010-10-09 18:29:53 +0200, Michael Niedermayer encoded:
> > On Fri, Oct 08, 2010 at 05:19:47PM +0200, Stefano Sabatini wrote:
> > > ---
> > >  configure                   |    1 +
> > >  doc/filters.texi            |   36 +++++++
> > >  libavfilter/Makefile        |    1 +
> > >  libavfilter/allfilters.c    |    1 +
> > >  libavfilter/vf_cropdetect.c |  215 +++++++++++++++++++++++++++++++++++++++++++
> > >  5 files changed, 254 insertions(+), 0 deletions(-)
> > >  create mode 100644 libavfilter/vf_cropdetect.c
> > 
> > try patcheck please 
> 
> Updated.

Thank you for removing the tabs

[...]
> +static int checkline(void *ctx, const unsigned char *src, int stride, int len, int bpp)
> +{
> +    int total = 0;
> +    int div = len;
> +
> +    switch (bpp) {
> +    case 1:
> +        while (--len >= 0) {
> +            total += src[0];
> +            src += stride;
> +        }
> +        break;
> +    case 3:
> +    case 4:
> +        while (--len >= 0) {
> +            total += src[0] + src[1] + src[2];
> +            src += stride;
> +        }
> +        div *= 3;
> +        break;
> +    }
> +    total /= div;
> +
> +    av_log(ctx, AV_LOG_DEBUG, "total:%d\n", total);
> +    return total;
> +}

Code ported from other projects must not be cosmtically reformated because
it makes merging changes between trees impossible, that is unless both sides
are identically reformated or one is removed and replaced by using the other
(tabs are the exception because we cant commit them)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101009/97cc1887/attachment.pgp>



More information about the ffmpeg-devel mailing list