[FFmpeg-devel] [PATCH] lavfi: add colorlevels filter
Clément Bœsch
u at pkh.me
Thu Dec 11 11:41:42 CET 2014
On Wed, Dec 10, 2014 at 02:26:51PM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> doc/filters.texi | 41 +++++++
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_colorlevels.c | 254 +++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 297 insertions(+)
> create mode 100644 libavfilter/vf_colorlevels.c
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 0ea3955..444dfda 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -2934,6 +2934,47 @@ colorbalance=rs=.3
> @end example
> @end itemize
>
> + at section colorlevels
> +
> +Adjust video input frames using levels.
> +
> +The filter accepts the following options:
> +
> + at table @option
> + at item rimim
> + at item gimin
> + at item bimin
> + at item aimin
> +Adjust red, green, blue and alpha input black point.
> +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{0}.
> +
> + at item rimax
> + at item gimax
> + at item bimax
> + at item aimax
> +Adjust red, green, blue and alpha input white point.
> +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{1}.
> +
> +Input levels are used to lighten highlights (bright tones), darken shadows
> +(dark tones), change the balance of bright and dark tones.
> +
> + at item romim
> + at item gomin
> + at item bomin
> + at item aomin
> +Adjust red, green, blue and alpha output black point.
> +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{0}.
> +
> + at item romax
> + at item gomax
> + at item bomax
> + at item aomax
> +Adjust red, green, blue and alpha output white point.
> +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{1}.
> +
> +Output levels allows manual selection of a constrained output level range.
> + at end table
> +
One of the most common usage for the color levels is to have an automatic
adjustment of the range on the luma level.
Typically, doing this: https://lut.im/OiNweWNU/MraUtDBe using a threshold
on both side.
Maybe you want to add such feature later thought.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141211/75c42cc7/attachment.asc>
More information about the ffmpeg-devel
mailing list