[FFmpeg-cvslog] doc/filters: deflicker size option value is in frames

2017-04-20 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Thu Apr 20 13:34:56 2017 
-0800| [0b8c159a9391f744ab5ff4725340b0655cd9f0f2] | committer: Lou Logan

doc/filters: deflicker size option value is in frames

Signed-off-by: Lou Logan 
Signed-off-by: Paul B Mahol  (in #ffmpeg-devel IRC)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b8c159a9391f744ab5ff4725340b0655cd9f0f2
---

 doc/filters.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 83b811171a..36efc3369a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6261,7 +6261,7 @@ It accepts the following options:
 
 @table @option
 @item size, s
-Set moving-average filter size. Default is 5. Allowed range is 2 - 129.
+Set moving-average filter size in frames. Default is 5. Allowed range is 2 - 
129.
 
 @item mode, m
 Set averaging mode to smooth temporal luminance variations.

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfilter: add deflicker filter

2017-04-20 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Tue Apr 18 15:18:40 
2017 +0200| [74acc1eec58288c9f3e35924a88807ab7dd33569] | committer: Paul B Mahol

avfilter: add deflicker filter

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=74acc1eec58288c9f3e35924a88807ab7dd33569
---

 Changelog  |   1 +
 doc/filters.texi   |  38 
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/version.h  |   4 +-
 libavfilter/vf_deflicker.c | 468 +
 6 files changed, 511 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index e76b324f61..8a4eb5ad76 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
within each release,
 releases are sorted from youngest to oldest.
 
 version :
+- deflicker video filter
 
 version 3.3:
 - CrystalHD decoder moved to new decode API
diff --git a/doc/filters.texi b/doc/filters.texi
index e002f25932..83b811171a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6253,6 +6253,44 @@ Limit the maximum change for each plane, default is 
65535.
 If 0, plane will remain unchanged.
 @end table
 
+@section deflicker
+
+Remove temporal frame luminance variations.
+
+It accepts the following options:
+
+@table @option
+@item size, s
+Set moving-average filter size. Default is 5. Allowed range is 2 - 129.
+
+@item mode, m
+Set averaging mode to smooth temporal luminance variations.
+
+Available values are:
+@table @samp
+@item am
+Arithmetic mean
+
+@item gm
+Geometric mean
+
+@item hm
+Harmonic mean
+
+@item qm
+Quadratic mean
+
+@item cm
+Cubic mean
+
+@item pm
+Power mean
+
+@item median
+Median
+@end table
+@end table
+
 @section dejudder
 
 Remove judder produced by partially interlaced telecined content.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index d6daa7a8a8..6de7cc0ff3 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -155,6 +155,7 @@ OBJS-$(CONFIG_DCTDNOIZ_FILTER)   += 
vf_dctdnoiz.o
 OBJS-$(CONFIG_DEBAND_FILTER) += vf_deband.o
 OBJS-$(CONFIG_DECIMATE_FILTER)   += vf_decimate.o
 OBJS-$(CONFIG_DEFLATE_FILTER)+= vf_neighbor.o
+OBJS-$(CONFIG_DEFLICKER_FILTER)  += vf_deflicker.o
 OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER)+= vf_deinterlace_qsv.o
 OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER)  += vf_deinterlace_vaapi.o
 OBJS-$(CONFIG_DEJUDDER_FILTER)   += vf_dejudder.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index ec6ec048e8..0e69f99509 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -166,6 +166,7 @@ static void register_all(void)
 REGISTER_FILTER(DEBAND, deband, vf);
 REGISTER_FILTER(DECIMATE,   decimate,   vf);
 REGISTER_FILTER(DEFLATE,deflate,vf);
+REGISTER_FILTER(DEFLICKER,  deflicker,  vf);
 REGISTER_FILTER(DEINTERLACE_QSV,deinterlace_qsv,vf);
 REGISTER_FILTER(DEINTERLACE_VAAPI, deinterlace_vaapi, vf);
 REGISTER_FILTER(DEJUDDER,   dejudder,   vf);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 1f9c7996c3..1f0b72a4fc 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,8 +30,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   6
-#define LIBAVFILTER_VERSION_MINOR  84
-#define LIBAVFILTER_VERSION_MICRO 101
+#define LIBAVFILTER_VERSION_MINOR  85
+#define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/vf_deflicker.c b/libavfilter/vf_deflicker.c
new file mode 100644
index 00..3cda354b2b
--- /dev/null
+++ b/libavfilter/vf_deflicker.c
@@ -0,0 +1,468 @@
+/*
+ * Copyright (c) 2017 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/imgutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/qsort.h"
+#include "avfilter.h"
+
+#define FF_BUFQUEUE_SIZE 129
+#include "bufferqueue.h"
+
+#include "formats.h"

[FFmpeg-cvslog] avformat/webmdashenc: Validate the 'streams' adaptation sets parameter

2017-04-20 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Thu 
Apr 20 16:17:44 2017 +0100| [ec07efa70012845e8642df67a4a773f510a17088] | 
committer: Michael Niedermayer

avformat/webmdashenc: Validate the 'streams' adaptation sets parameter

It should not be a value larger than the number of streams we have,
or it will cause invalid reads and/or SIGSEGV.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec07efa70012845e8642df67a4a773f510a17088
---

 libavformat/webmdashenc.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 71f01fd770..550ad72e4d 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -467,7 +467,11 @@ static int parse_adaptation_sets(AVFormatContext *s)
 if (as->streams == NULL)
 return AVERROR(ENOMEM);
 as->streams[as->nb_streams - 1] = to_integer(p, q - p + 1);
-if (as->streams[as->nb_streams - 1] < 0) return -1;
+if (as->streams[as->nb_streams - 1] < 0 ||
+as->streams[as->nb_streams - 1] >= s->nb_streams) {
+av_log(s, AV_LOG_ERROR, "Invalid value for 'streams' in 
adapation_sets.\n");
+return AVERROR(EINVAL);
+}
 if (*q == '\0') break;
 if (*q == ' ') state = new_set;
 p = ++q;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/webmdashenc: Require the 'adaptation_sets' option to be set

2017-04-20 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Thu 
Apr 20 13:14:42 2017 +0100| [cbd3a68f3e1c2d1679370301eb5e1a32a2df64fe] | 
committer: Michael Niedermayer

avformat/webmdashenc: Require the 'adaptation_sets' option to be set

This seems to be non-optional, and if the muxer is run without it,
strlen() is run on NULL, causing a segfault.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbd3a68f3e1c2d1679370301eb5e1a32a2df64fe
---

 libavformat/webmdashenc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 602726caf9..71f01fd770 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -433,6 +433,10 @@ static int parse_adaptation_sets(AVFormatContext *s)
 char *p = w->adaptation_sets;
 char *q;
 enum { new_set, parsed_id, parsing_streams } state;
+if (!w->adaptation_sets) {
+av_log(s, AV_LOG_ERROR, "The 'adaptation_sets' option must be set.\n");
+return AVERROR(EINVAL);
+}
 // syntax id=0,streams=0,1,2 id=1,streams=3,4 and so on
 state = new_set;
 while (p < w->adaptation_sets + strlen(w->adaptation_sets)) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog