[FFmpeg-devel] [PATCH] Add lut filter.

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Jun 17 15:11:58 CEST 2011

On date Tuesday 2011-06-07 18:31:22 +0200, Stefano Sabatini encoded:
> On date Tuesday 2011-06-07 18:16:43 +0200, Reimar Döffinger encoded:
> > On 7 Jun 2011, at 10:34, Stefano Sabatini <stefano.sabatini-lala at poste.it> wrote:
> [...]
> > >> Another thought - studio level video is allowed to have excursions below
> > >> 'black' and above 'white'. Am I right in my understanding that this
> > >> filter will clip at black and white?
> > > 
> > > That's correct. I did it since that was resulting in artifacts for
> > > out-of-band values with gamma correction (this was resulting in
> > > negative gamma-corrected values for out-of-band values). We may find a
> > > better solution or disable clipping through an option.
> > 
> > Shouldn't it always be possible to have the clipping explicitly in the given formula?
> > That would make that kind of implicit clipping just a pointless limitation of what can be done with the filter...
> Uhm maybe a clipval, but then we need to add a parameter to gammaval,
> it will then be gamma(clip(val), gamma) or gamma(val, gamma), and
> we may also want clip(expr), e.g. clip(gamma(clip(val), gamma)).
> But I also want to know how out-of-band values may be used (and I
> suppose FFmpeg may clip them anyway along the processing path).

Updated, now the filter won't automatically clip the val in the valid
range, but it's still possible to use clipval in the expression in
case it is required. The gammaval and negval all use clipped values,
the user need to specify explicitely non-clipping exression in case he

I'm going to push the filters in few days if I see no more comments.
FFmpeg = Faithful and Fanciful Moronic Puritan Ecumenical Governor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-add-LUT-LookUp-Table-generic-filters.patch
Type: text/x-diff
Size: 18922 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110617/c18c1eac/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavfi-add-negate-filter.patch
Type: text/x-diff
Size: 3896 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110617/c18c1eac/attachment-0001.bin>

More information about the ffmpeg-devel mailing list