On 2015-07-15 00:06, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol <one...@gmail.com> > --- > doc/filters.texi | 35 ++++++ > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_deband.c | 312 > +++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 349 insertions(+) > create mode 100644 libavfilter/vf_deband.c > > diff --git a/doc/filters.texi b/doc/filters.texi > index 9f7b976..0a07735 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -3678,6 +3678,41 @@ Violent denoise using a block size of @code{16x16}: > dctdnoiz=15:n=4 > @end example > > +@section deband > + > +Remove banding artifacts from input video. > +It works by replacing banded pixels with average value of referenced pixels. > + > +The filter accepts the following options: > + > +@table @option > +@item 1thr > +@item 2thr > +@item 3thr > +@item 4thr > +Set banding detection threshold for each plane. Default is 0.02. Range from > +which value can be selected is from 0.008 to 0.5.
I would suggest dropping the second "from" or rewording the third sentence as "Valid range is 0.008 to 0.5." > +If difference between current pixel and reference pixel is less than > threshold, > +it will be considered as banded. > + > +@item range, r > +Banding detection range in pixels. Default is 16. If positive, random number > +from range 0 to set value will be picked. If negative, exact of absolute > value > +will be used. > +The range defines square of four pixels around current pixel. "If positive, random number in range 0 to r will be used." "If negative, exact absolute value will be used." > +@item direction, d > +Set direction from which four pixel will be compared. If positive, random > +direction from 0 to set direction will be picked. If negative, exact of > +absolute value will be picked. Similar to above. Also, what does the direction mean? It's a float and looks like it represents radians (there is a sine/cosine pair below). The range is -2*PI..2*PI (should that also be mentioned here?) but what does the 0 represent? Looking at the code 0 is up then increasing moves in a clockwise direction. > +@item blur > +If enabled current pixel is compared with average value of all four > +surrounding pixels. By default is enabled. If disabled current pixel is "The default is enabled." > diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c > new file mode 100644 > index 0000000..1fd05d1 > --- /dev/null > +++ b/libavfilter/vf_deband.c > @@ -0,0 +1,312 @@ > +/* > + * Copyright (c) 2015 Niklas Haas > + * Copyright (c) 2015 Paul B Mahol > + * > + * Permission is hereby granted, free of charge, to any person obtaining a > copy > + * of this software and associated documentation files (the "Software"), to > deal > + * in the Software without restriction, including without limitation the > rights > + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > + * copies of the Software, and to permit persons to whom the Software is > + * furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > THE > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > FROM, > + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN > THE > + * SOFTWARE. > + */ This is the MIT license, right? Do we specifically note these anywhere?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel