On 12/11/14, Lou Logan <l...@lrcd.com> wrote: > Nice. A user was asking for this recently (can't remember where). > > On Wed, 10 Dec 2014 14:26:51 +0000, Paul B Mahol wrote: > >> Signed-off-by: Paul B Mahol <one...@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 >> >> +@section colorlevels >> + >> +Adjust video input frames using levels. >> + >> +The filter accepts the following options: >> + >> +@table @option >> +@item rimim > > rimin
Fixed. > >> +@item gimin >> +@item bimin >> +@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}. > > How about a "master" point to control RGB all at once in case each value > is the same for each component? It can be added later. > >> +@item rimax >> +@item gimax >> +@item bimax >> +@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. >> + >> +@item romim > > romin Fixed. > >> +@item gomin >> +@item bomin >> +@item aomin >> +Adjust red, green, blue and alpha output black point. >> +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{0}. >> + >> +@item romax >> +@item gomax >> +@item bomax >> +@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. >> +@end table >> + > > I'd like to see an example or two in the docs. > I added 3 examples from you. > Perhaps this filter could implement 'presets' and 'psfile' options for > Photoshop levels preset files such as in curves filter. Attached is an > example ALV file. The preset could be added later. I could not decipher attached ALV file. > > Here are some of the PS presets and their values. > > Darker: > rimin=0.0588235294:gimin=0.0588235294:bimin=0.0588235294 > > Increase Contrast 1: > rimin=0.0392156863:gimin=0.0392156863:bimin=0.0392156863:rimax=0.9607843137:gimax=0.9607843137:bimax=0.9607843137 > > Increase Contrast 2: > rimin=0.0784313725:gimin=0.0784313725:bimin=0.0784313725:rimax=0.9215686275:gimax=0.9215686275:bimax=0.9215686275 > > Increase Contrast 3: > rimin=0.1176470588:gimin=0.1176470588:bimin=0.1176470588:rimax=0.8823529412:gimax=0.8823529412:bimax=0.8823529412 > > Lighter: > rimax=0.9019607843:gimax=0.9019607843:bimax=0.9019607843 > > I didn't figure out Lighten Shadows, Midtones Brighter, and Midtones > Darker. Maybe I'll look again later. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel