[FFmpeg-devel] [PATCH] avfilter/WIP: add selectivecolor filter

Clément Bœsch u at pkh.me
Sun Oct 11 13:48:09 CEST 2015


On Sat, Aug 15, 2015 at 07:02:11PM +0200, Clément Bœsch wrote:
> ---
> Only K adjustment remains to fix before it's ready for a first upstream
> version. Help figuring out is still welcome. Otherwise, since this is very
> close to the final version, review is welcome as well.
> ---
>  doc/filters.texi                |  67 ++++++
>  libavfilter/Makefile            |   1 +
>  libavfilter/allfilters.c        |   1 +
>  libavfilter/vf_selectivecolor.c | 457 ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 526 insertions(+)

Finally figured out the K adjustment and applied.

Remaining is making it bitexact to add a FATE test, and add >8bit support.

[...]

For the record, the original formula I was using was:

  f(v,a)   = clip(-a, -v, 1-v) . R

and taking k into account, it is now:
  f(v,a,k) = clip((-1-a).k - a, -v, 1-v) . R

With:
 f   adjustment function
 a   user component adjust (normed to [-1;1])
 v   component value (normed to [-1;1])
 k   user K adjust
 R   adjust range

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151011/a697ace0/attachment.sig>


More information about the ffmpeg-devel mailing list