[FFmpeg-devel] [PATCH] Port mp=eq/eq2 to FFmpeg

arwa arif arwaarif1994 at gmail.com
Tue Jan 20 18:00:54 CET 2015


>
> > @@ -0,0 +1,342 @@
>
> +/*
> > + * Original MPlayer filters by Richard Felker, Hampa Hug, Daniel Moreno,
> > + * and Michael Niedermeyer.
> > + *
> > + * Copyright (c) 2014 James Darnley <james.darnley at gmail.com>
> > + * Copyright (c) 2015 Arwa Arif <arwaarif1994 at gmail.com>
> > + *
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU General Public License
> along
> > + * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
> > + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> > + */
> > +
> > +/**
> > + * @file
> > + * very simple video equalizer
> > + */
> > +
> > +/* TODO:
>
> > + * - copy plane pointers rather than data
>
> uh? drop this comment unless it is clear to you what it means
>
> > + * - support alpha channels
>
> Add also an entry to add support to .process_command(). You can
> implement it in a later patch.
>
>
What is meant by adding support to process_command?


>
>
> > +
> > +    eq2->param[0].contrast = eq2->contrast;
> > +    eq2->param[0].lut_clean = 0;
> > +    check_values(&eq2->param[0]);
> > +}
> > +
> > +static void set_brightness(EQ2Context *eq2)
> > +{
> > +    /* brightness already set as AVOpt */
> > +
> > +    eq2->param[0].brightness = eq2->brightness;
> > +    eq2->param[0].lut_clean = 0;
> > +    check_values(&eq2->param[0]);
> > +}
> > +
> > +static void set_gamma(EQ2Context *eq2)
> > +{
> > +    int i;
> > +    /* gamma already set as AVOpt */
> > +
> > +    eq2->param[0].gamma = eq2->gamma * eq2->gamma_g;
> > +    eq2->param[1].gamma = sqrt(eq2->gamma_b / eq2->gamma_g);
> > +    eq2->param[2].gamma = sqrt(eq2->gamma_r / eq2->gamma_g);
> > +
> > +    for (i = 0; i < 3; i++) {
> > +        eq2->param[i].weight = eq2->weight;
> > +        eq2->param[i].lut_clean = 0;
> > +        check_values(&eq2->param[i]);
> > +    }
> > +}
> > +
> > +static void set_saturation(EQ2Context *eq2)
> > +{
> > +    int i;
> > +    /* saturation already set as AVOpt */
> > +
> > +    for (i = 1; i < 3; i++) {
> > +        eq2->param[i].contrast = eq2->saturation;
> > +        eq2->param[i].lut_clean = 0;
> > +        check_values(&eq2->param[i]);
> > +    }
>
> Is this really working with gray8 or crashing (like mp=eq does)?
>

Yes, I checked the formats, it is working with gray8.


> You should store in the context the number of planes.
>
> Also, please add a fate test.
>

I am not able to run rsync, maybe because of proxy settings. I tried
various ways of bypassing the proxy, but I am still unable to use it. Is
there any other way of adding the fate test?


Updated the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Port-mp-eq-eq2-to-FFmpeg.patch
Type: text/x-patch
Size: 21131 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150120/dc70dabe/attachment.bin>


More information about the ffmpeg-devel mailing list