[FFmpeg-devel] [PATCH] lavfi: add elbg filter

Clément Bœsch u at pkh.me
Mon Nov 11 19:02:06 CET 2013


On Mon, Nov 11, 2013 at 06:49:36PM +0100, Stefano Sabatini wrote:
> On date Monday 2013-11-11 16:48:39 +0100, Clément Bœsch encoded:
> > On Mon, Nov 11, 2013 at 01:04:21AM +0100, Stefano Sabatini wrote:
> > > TODO: bump minor, add Changelog entry
> > > ---
> > >  doc/filters.texi         |  26 ++++++
> > >  libavfilter/Makefile     |   2 +
> > >  libavfilter/allfilters.c |   1 +
> > >  libavfilter/vf_elbg.c    | 210 +++++++++++++++++++++++++++++++++++++++++++++++
> > >  4 files changed, 239 insertions(+)
> > >  create mode 100644 libavfilter/vf_elbg.c
> [...] 
> > > +    /* compute the codebook */
> > > +    ff_init_elbg(elbg->codeword, NB_COMPONENTS, elbg->codeword_length,
> > > +                 elbg->codebook, elbg->codebook_length, elbg->max_steps_nb,
> > > +                 elbg->codeword_closest_codebook_idxs, &elbg->lfg);
> > > +    ff_do_elbg(elbg->codeword, NB_COMPONENTS, elbg->codeword_length,
> > > +               elbg->codebook, elbg->codebook_length, elbg->max_steps_nb,
> > > +               elbg->codeword_closest_codebook_idxs, &elbg->lfg);
> > > +
> > 
> 
> > This will not work with a shared build (ff_ syms are not exported)
> 
> Yes this is serious. Should I make the API public (and move it to lavu
> while at it)?
> 

Or simply make an avpriv binding.

> > > +    /* fill the output with the codebook values */
> > > +    p0 = frame->data[0];
> > > +
> > > +    for (i = 0, k = 0; i < inlink->h; i++) {
> > 
> > Please take the k out of the loop
> > 
> > > +        p = p0;
> > > +        for (j = 0; j < inlink->w; j++, k++) {
> > 
> > ...and out of this one (increment in the following line)
> 
> Why? (feel free to edit&resend or fix after commit).
> 

Because it doesn't really belong to the loops and make them less readable
IMO.

> Other issues fixed.
> -- 
> FFmpeg = Fostering and Fascinating Mean Peaceful Ecumenical Game

> From 2efceb2453a7f52895facacae240829d224fcbd2 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sun, 10 Nov 2013 23:46:41 +0100
> Subject: [PATCH] lavfi: add elbg filter
> 
> TODO: bump minor, add Changelog entry
> ---
>  doc/filters.texi         |  26 ++++++
>  libavfilter/Makefile     |   2 +
>  libavfilter/allfilters.c |   1 +
>  libavfilter/vf_elbg.c    | 211 +++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 240 insertions(+)
>  create mode 100644 libavfilter/vf_elbg.c
> 

And so, the real question now… can we use that filter to make better GIF?

-- 
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-devel/attachments/20131111/c33e47c7/attachment.asc>


More information about the ffmpeg-devel mailing list