[FFmpeg-cvslog] avcodec/aacenc: Tighter input checks

2016-08-23 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Aug 23 11:00:29 2016 +0200| [77bf96b04710b98a52aaddb93bfd32da0d506191] | 
committer: Michael Niedermayer

avcodec/aacenc: Tighter input checks

Fixes occurance of NaN/Inf leading to assertion failures and out of array access
Fixes: 
d1c38a09acc34845c6be3a127a5aacaf/signal_sigsegv_3982225_6121_d18bd5451d4245ee09408f04badd1b83.wmv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

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

 libavcodec/aacenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index e1a2d45..9e421a9 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -622,8 +622,8 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
 }
 
 for (k = 0; k < 1024; k++) {
-if (!isfinite(cpe->ch[ch].coeffs[k])) {
-av_log(avctx, AV_LOG_ERROR, "Input contains NaN/+-Inf\n");
+if (!(fabs(cpe->ch[ch].coeffs[k]) < 1E16)) { // Ensure 
headroom for energy calculation
+av_log(avctx, AV_LOG_ERROR, "Input contains (near) 
NaN/+-Inf\n");
 return AVERROR(EINVAL);
 }
 }

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


[FFmpeg-cvslog] avutil/mem: remove av_realloc / av_malloc incompatibility warning

2016-08-23 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Apr 21 
15:12:36 2015 +0200| [21f70940ae106bfffa07e73057cdb4b5e81a767a] | committer: 
Michael Niedermayer

avutil/mem: remove av_realloc / av_malloc incompatibility warning

memalign() is not guranteed to be compatible with free() or realloc()
and for platforms in this category we have --enable-memalign-hack
(which should be enabled automatically if such system is detected)
Trying to somehow half support systems that can free() memalign memory
but not reallocate it seems not worth the amount of work needed to
keep 2 then incompatible allocation systems and ensure their
seperation. That is unless this would affect a major platform
on which we want to avoid the memalign hack code

The warnings also cause wasted time and effort as people try
to maintain a separation that does not exist currently.

Signed-off-by: Michael Niedermayer 

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

 libavutil/mem.h | 24 
 1 file changed, 24 deletions(-)

diff --git a/libavutil/mem.h b/libavutil/mem.h
index 7f0c610..f9d8884 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -252,12 +252,6 @@ void *av_calloc(size_t nmemb, size_t size) 
av_malloc_attrib;
  * @return Pointer to a newly-reallocated block or `NULL` if the block
  * cannot be reallocated or the function is used to free the memory 
block
  *
- * @warning Pointers originating from the av_malloc() family of functions must
- *  not be passed to av_realloc(). The former can be implemented using
- *  memalign() (or other functions), and there is no guarantee that
- *  pointers from such functions can be passed to realloc() at all.
- *  The situation is undefined according to POSIX and may crash with
- *  some libc implementations.
  * @warning Unlike av_malloc(), the returned pointer is not guaranteed to be
  *  correctly aligned.
  * @see av_fast_realloc()
@@ -281,12 +275,6 @@ void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
  *
  * @return Zero on success, an AVERROR error code on failure
  *
- * @warning Pointers originating from the av_malloc() family of functions must
- *  not be passed to av_reallocp(). The former can be implemented using
- *  memalign() (or other functions), and there is no guarantee that
- *  pointers from such functions can be passed to realloc() at all.
- *  The situation is undefined according to POSIX and may crash with
- *  some libc implementations.
  * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
  *  correctly aligned.
  */
@@ -324,12 +312,6 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
  * @return Pointer to a newly-reallocated block or NULL if the block
  * cannot be reallocated or the function is used to free the memory 
block
  *
- * @warning Pointers originating from the av_malloc() family of functions must
- *  not be passed to av_realloc(). The former can be implemented using
- *  memalign() (or other functions), and there is no guarantee that
- *  pointers from such functions can be passed to realloc() at all.
- *  The situation is undefined according to POSIX and may crash with
- *  some libc implementations.
  * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
  *  correctly aligned.
  * @see av_reallocp_array()
@@ -350,12 +332,6 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, 
size_t nmemb, size_t size)
  *
  * @return Zero on success, an AVERROR error code on failure
  *
- * @warning Pointers originating from the av_malloc() family of functions must
- *  not be passed to av_realloc(). The former can be implemented using
- *  memalign() (or other functions), and there is no guarantee that
- *  pointers from such functions can be passed to realloc() at all.
- *  The situation is undefined according to POSIX and may crash with
- *  some libc implementations.
  * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
  *  correctly aligned.
  */

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


[FFmpeg-cvslog] libavformat/utils: added ability to probe AVMEDIA_TYPE_DATA format

2016-08-23 Thread Erkki Seppälä
ffmpeg | branch: master | Erkki Seppälä  | Tue Aug 
23 12:03:20 2016 +0300| [9d5ea8de56fcdc77daa01cf0d413dfe6101de30a] | committer: 
Michael Niedermayer

libavformat/utils: added ability to probe AVMEDIA_TYPE_DATA format

Now force_codec_ids supports AVMEDIA_TYPE_DATA and
avformat_query_codec accepts data codecs as well in addition to video,
audio and subtitle tracks.

Signed-off-by: Erkki Seppälä 
Signed-off-by: OZOPlayer 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index dd9df92..d7f3c7a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -612,6 +612,10 @@ static void force_codec_ids(AVFormatContext *s, AVStream 
*st)
 if (s->subtitle_codec_id)
 st->codecpar->codec_id = s->subtitle_codec_id;
 break;
+case AVMEDIA_TYPE_DATA:
+if (s->data_codec_id)
+st->codec->codec_id = s->data_codec_id;
+break;
 }
 }
 
@@ -4601,7 +4605,8 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum 
AVCodecID codec_id,
 return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag);
 else if (codec_id == ofmt->video_codec ||
  codec_id == ofmt->audio_codec ||
- codec_id == ofmt->subtitle_codec)
+ codec_id == ofmt->subtitle_codec ||
+ codec_id == ofmt->data_codec)
 return 1;
 }
 return AVERROR_PATCHWELCOME;

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


[FFmpeg-cvslog] lavc/h264dec: Improve "Increasing reorder buffer" message loglevel.

2016-08-23 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Aug 23 
09:31:09 2016 +0200| [3c36d960f4a179fa52cdab419348b85945096ad3] | committer: 
Carl Eugen Hoyos

lavc/h264dec: Improve "Increasing reorder buffer" message loglevel.

Do not show the message for the first frame by default, show a
warning if increasing is necessary in the middle of the stream.

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

 libavcodec/h264dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 9c37d46..ed0b724 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -528,7 +528,8 @@ static void decode_postinit(H264Context *h, int 
setup_finished)
 h->last_pocs[0] = cur->poc;
 cur->mmco_reset = 1;
 } else if(h->avctx->has_b_frames < out_of_order && 
!sps->bitstream_restriction_flag){
-av_log(h->avctx, AV_LOG_INFO, "Increasing reorder buffer to %d\n", 
out_of_order);
+int loglevel = h->avctx->frame_number > 1 ? AV_LOG_WARNING : 
AV_LOG_VERBOSE;
+av_log(h->avctx, loglevel, "Increasing reorder buffer to %d\n", 
out_of_order);
 h->avctx->has_b_frames = out_of_order;
 }
 

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


[FFmpeg-cvslog] avfilter: add maskedclamp filter

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Aug 22 10:02:15 
2016 +0200| [12f997d061d390f04717afa77f694e0a4b14c8f5] | committer: Paul B Mahol

avfilter: add maskedclamp filter

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

 Changelog|   1 +
 doc/filters.texi |  21 +++
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/version.h|   2 +-
 libavfilter/vf_maskedclamp.c | 345 +++
 6 files changed, 370 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index ee3ce53..357ce06 100644
--- a/Changelog
+++ b/Changelog
@@ -18,6 +18,7 @@ version :
 - bitplanenoise video filter
 - floating point support in als decoder
 - fifo muxer
+- maskedclamp filter
 
 
 version 3.1:
diff --git a/doc/filters.texi b/doc/filters.texi
index 2d4fa01..f2f69e6 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -9234,6 +9234,27 @@ 
lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
 @end example
 @end itemize
 
+@section maskedclamp
+
+Clamp the first input stream with the second input and third input stream.
+
+Returns the value of first stream to be between second input
+stream - @code{undershoot} and third input stream + @code{overshoot}.
+
+This filter accepts the following options:
+@table @option
+@item undershoot
+Default value is @code{0}.
+
+@item overshoot
+Default value is @code{0}.
+
+@item planes
+Set which planes will be processed as bitmap, unprocessed planes will be
+copied from first stream.
+By default value 0xf, all planes will be processed.
+@end table
+
 @section maskedmerge
 
 Merge the first input stream with the second input stream using per pixel
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index f6f054c..f8704b0 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -207,6 +207,7 @@ OBJS-$(CONFIG_LUT_FILTER)+= vf_lut.o
 OBJS-$(CONFIG_LUT3D_FILTER)  += vf_lut3d.o
 OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
 OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
+OBJS-$(CONFIG_MASKEDCLAMP_FILTER)+= vf_maskedclamp.o framesync.o
 OBJS-$(CONFIG_MASKEDMERGE_FILTER)+= vf_maskedmerge.o framesync.o
 OBJS-$(CONFIG_MCDEINT_FILTER)+= vf_mcdeint.o
 OBJS-$(CONFIG_MERGEPLANES_FILTER)+= vf_mergeplanes.o framesync.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index fea2dcf..9b7fe5f 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -224,6 +224,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(LUT3D,  lut3d,  vf);
 REGISTER_FILTER(LUTRGB, lutrgb, vf);
 REGISTER_FILTER(LUTYUV, lutyuv, vf);
+REGISTER_FILTER(MASKEDCLAMP,maskedclamp,vf);
 REGISTER_FILTER(MASKEDMERGE,maskedmerge,vf);
 REGISTER_FILTER(MCDEINT,mcdeint,vf);
 REGISTER_FILTER(MERGEPLANES,mergeplanes,vf);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index c0b5cf3..fd2a2bf 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   6
-#define LIBAVFILTER_VERSION_MINOR  52
+#define LIBAVFILTER_VERSION_MINOR  53
 #define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c
new file mode 100644
index 000..855c738
--- /dev/null
+++ b/libavfilter/vf_maskedclamp.c
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2016 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/pixdesc.h"
+#include "libavutil/opt.h"
+#include "avfilter.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+#include "framesync.h"
+
+#define OFFSET(x) offsetof(MaskedClampContext, x)
+#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
+
+typedef struct MaskedClampContext {
+const AVClass *class;
+
+int planes;
+int undershoot;
+int overshoot;
+
+int width[4], heig

[FFmpeg-cvslog] avfilter/vf_maskedmerge: add support for more pixel formats

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Tue Aug 23 09:51:43 
2016 +0200| [68dc0c13f93b10cd41df6f4b3e92db1cb1aaf3b5] | committer: Paul B Mahol

avfilter/vf_maskedmerge: add support for more pixel formats

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

 libavfilter/vf_maskedmerge.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c
index 66f8fa5..46c88f4 100644
--- a/libavfilter/vf_maskedmerge.c
+++ b/libavfilter/vf_maskedmerge.c
@@ -47,13 +47,15 @@ static int query_formats(AVFilterContext *ctx)
 AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
 AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9,
 AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
+AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, 
AV_PIX_FMT_YUV440P12,
+AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14,
 AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16,
 AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA444P9,
 AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
 AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
 AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
 AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
-AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP16,
+AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16,
 AV_PIX_FMT_NONE
 };

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


[FFmpeg-cvslog] avfilter: add hysteresis filter

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Aug 22 15:45:44 
2016 +0200| [bb109dce18e94f9f29d759c771e3cf46e93ffca1] | committer: Paul B Mahol

avfilter: add hysteresis filter

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

 Changelog   |   1 +
 doc/filters.texi|  19 +++
 libavfilter/Makefile|   1 +
 libavfilter/allfilters.c|   1 +
 libavfilter/version.h   |   2 +-
 libavfilter/vf_hysteresis.c | 401 
 6 files changed, 424 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 357ce06..b221761 100644
--- a/Changelog
+++ b/Changelog
@@ -19,6 +19,7 @@ version :
 - floating point support in als decoder
 - fifo muxer
 - maskedclamp filter
+- hysteresis filter
 
 
 version 3.1:
diff --git a/doc/filters.texi b/doc/filters.texi
index f2f69e6..21efb5b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -8766,6 +8766,25 @@ If the specified expression is not valid, it is kept at 
its current
 value.
 @end table
 
+@section hysteresis
+
+Grow first stream into second stream by connecting components.
+This allows to build more robust edge masks.
+
+This filter accepts the following options:
+
+@table @option
+@item planes
+Set which planes will be processed as bitmap, unprocessed planes will be
+copied from first stream.
+By default value 0xf, all planes will be processed.
+
+@item threshold
+Set threshold which is used in filtering. If pixel component value is higher 
than
+this value filter algorithm for connecting components is activated.
+By default value is 0.
+@end table
+
 @section idet
 
 Detect video interlacing type.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index f8704b0..9dc524f 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -195,6 +195,7 @@ OBJS-$(CONFIG_HUE_FILTER)+= vf_hue.o
 OBJS-$(CONFIG_HWDOWNLOAD_FILTER) += vf_hwdownload.o
 OBJS-$(CONFIG_HWUPLOAD_CUDA_FILTER)  += vf_hwupload_cuda.o
 OBJS-$(CONFIG_HWUPLOAD_FILTER)   += vf_hwupload.o
+OBJS-$(CONFIG_HYSTERESIS_FILTER) += vf_hysteresis.o framesync.o
 OBJS-$(CONFIG_IDET_FILTER)   += vf_idet.o
 OBJS-$(CONFIG_IL_FILTER) += vf_il.o
 OBJS-$(CONFIG_INFLATE_FILTER)+= vf_neighbor.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 9b7fe5f..05fa9c4 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -212,6 +212,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(HWDOWNLOAD, hwdownload, vf);
 REGISTER_FILTER(HWUPLOAD,   hwupload,   vf);
 REGISTER_FILTER(HWUPLOAD_CUDA,  hwupload_cuda,  vf);
+REGISTER_FILTER(HYSTERESIS, hysteresis, vf);
 REGISTER_FILTER(IDET,   idet,   vf);
 REGISTER_FILTER(IL, il, vf);
 REGISTER_FILTER(INFLATE,inflate,vf);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index fd2a2bf..0427804 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   6
-#define LIBAVFILTER_VERSION_MINOR  53
+#define LIBAVFILTER_VERSION_MINOR  54
 #define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_hysteresis.c b/libavfilter/vf_hysteresis.c
new file mode 100644
index 000..8f05b71
--- /dev/null
+++ b/libavfilter/vf_hysteresis.c
@@ -0,0 +1,401 @@
+/*
+ * Copyright (c) 2013 Oka Motofumi (chikuzen.mo at gmail dot com)
+ * Copyright (c) 2016 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/pixdesc.h"
+#include "libavutil/opt.h"
+#include "avfilter.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+#include "framesync.h"
+
+#define OFFSET(x) offsetof(HysteresisContext, x)
+#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
+
+typedef struct HysteresisContext {
+const AVClass *class;
+
+int planes;
+int threshold;
+
+int width[4], height[4];
+int nb_planes;
+int depth;
+FF

[FFmpeg-cvslog] libzvbi depends on ass

2016-08-23 Thread Rafaël Carré
ffmpeg | branch: master | Rafaël Carré  | Tue Aug 23 
11:54:26 2016 +0200| [10e3f18c8db1634a254bfcd242b517acf948d911] | committer: 
Carl Eugen Hoyos

libzvbi depends on ass

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

 libavcodec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index a6e79ce..7396468 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -905,7 +905,7 @@ OBJS-$(CONFIG_LIBX264_ENCODER)+= libx264.o
 OBJS-$(CONFIG_LIBX265_ENCODER)+= libx265.o
 OBJS-$(CONFIG_LIBXAVS_ENCODER)+= libxavs.o
 OBJS-$(CONFIG_LIBXVID_ENCODER)+= libxvid.o
-OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER)   += libzvbi-teletextdec.o
+OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER)   += libzvbi-teletextdec.o ass.o
 
 # parsers
 OBJS-$(CONFIG_AAC_LATM_PARSER) += latm_parser.o

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


[FFmpeg-cvslog] avformat/avcodec: support rawvideo with planar rgb and alpha in nut

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Tue Aug 23 16:48:48 
2016 +0200| [61980dc479ce045d2e280bff0ba2118ccb8ce595] | committer: Paul B Mahol

avformat/avcodec: support rawvideo with planar rgb and alpha in nut

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

 libavcodec/raw.c  | 8 
 libavformat/nut.c | 9 +
 2 files changed, 17 insertions(+)

diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index d6aaf76..f73a134 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -188,6 +188,14 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
 { AV_PIX_FMT_GBRP16LE, MKTAG('G', '3', 00 , 16 ) },
 { AV_PIX_FMT_GBRP16BE, MKTAG(16 , 00 , '3', 'G') },
 
+{ AV_PIX_FMT_GBRAP,MKTAG('G', '4', 00 ,  8 ) },
+{ AV_PIX_FMT_GBRAP10LE,MKTAG('G', '4', 00 , 10 ) },
+{ AV_PIX_FMT_GBRAP10BE,MKTAG(10 , 00 , '4', 'G') },
+{ AV_PIX_FMT_GBRAP12LE,MKTAG('G', '4', 00 , 12 ) },
+{ AV_PIX_FMT_GBRAP12BE,MKTAG(12 , 00 , '4', 'G') },
+{ AV_PIX_FMT_GBRAP16LE,MKTAG('G', '4', 00 , 16 ) },
+{ AV_PIX_FMT_GBRAP16BE,MKTAG(16 , 00 , '4', 'G') },
+
 { AV_PIX_FMT_XYZ12LE,  MKTAG('X', 'Y', 'Z' , 36 ) },
 { AV_PIX_FMT_XYZ12BE,  MKTAG(36 , 'Z' , 'Y', 'X') },
 
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 88d0dc2..452fc35 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -164,6 +164,15 @@ const AVCodecTag ff_nut_video_tags[] = {
 { AV_CODEC_ID_RAWVIDEO, MKTAG('G', '3',   0,  16) },
 { AV_CODEC_ID_RAWVIDEO, MKTAG(16,0, '3', 'G') },
 
+{ AV_CODEC_ID_RAWVIDEO, MKTAG('G', '4',   0,   8) },
+
+{ AV_CODEC_ID_RAWVIDEO, MKTAG('G', '4', 00 , 10 ) },
+{ AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 00 , '4', 'G') },
+{ AV_CODEC_ID_RAWVIDEO, MKTAG('G', '4', 00 , 12 ) },
+{ AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 00 , '4', 'G') },
+{ AV_CODEC_ID_RAWVIDEO, MKTAG('G', '4', 00 , 16 ) },
+{ AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 00 , '4', 'G') },
+
 { AV_CODEC_ID_RAWVIDEO, MKTAG('X', 'Y', 'Z' , 36 ) },
 { AV_CODEC_ID_RAWVIDEO, MKTAG(36 , 'Z' , 'Y', 'X') },
 

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


[FFmpeg-cvslog] lavf/movenc: Add a missing assignment if memory allocation fails.

2016-08-23 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Aug 23 
21:02:57 2016 +0200| [c1de1f046997f3449b56fe7480c21498cec9fad7] | committer: 
Carl Eugen Hoyos

lavf/movenc: Add a missing assignment if memory allocation fails.

Fixes a warning:
libavformat/movenc.c:5947:17: warning: statement with no effect [-Wunused-value]

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

 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1f55333..9bf3a04 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5944,7 +5944,7 @@ static int mov_write_trailer(AVFormatContext *s)
 track->vos_len  = par->extradata_size;
 track->vos_data = av_malloc(track->vos_len);
 if (!track->vos_data) {
-AVERROR(ENOMEM);
+res = AVERROR(ENOMEM);
 goto error;
 }
 memcpy(track->vos_data, par->extradata, track->vos_len);

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


[FFmpeg-cvslog] fate: update for gbrap after 61980dc479ce045d2e280bff0ba2118ccb8ce595

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Wed Aug 24 08:03:20 
2016 +0200| [35a0bc0d94bc7a5106fe93db8ec1b59e10a6a184] | committer: Paul B Mahol

fate: update for gbrap after 61980dc479ce045d2e280bff0ba2118ccb8ce595

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

 tests/ref/fate/filter-pixdesc-gbrap  | 2 +-
 tests/ref/fate/filter-pixfmts-copy   | 2 +-
 tests/ref/fate/filter-pixfmts-crop   | 2 +-
 tests/ref/fate/filter-pixfmts-field  | 2 +-
 tests/ref/fate/filter-pixfmts-fieldorder | 2 +-
 tests/ref/fate/filter-pixfmts-hflip  | 2 +-
 tests/ref/fate/filter-pixfmts-il | 2 +-
 tests/ref/fate/filter-pixfmts-null   | 2 +-
 tests/ref/fate/filter-pixfmts-pad| 2 +-
 tests/ref/fate/filter-pixfmts-rotate | 2 +-
 tests/ref/fate/filter-pixfmts-scale  | 2 +-
 tests/ref/fate/filter-pixfmts-vflip  | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/ref/fate/filter-pixdesc-gbrap 
b/tests/ref/fate/filter-pixdesc-gbrap
index 6be442b..c8f5354 100644
--- a/tests/ref/fate/filter-pixdesc-gbrap
+++ b/tests/ref/fate/filter-pixdesc-gbrap
@@ -1 +1 @@
-pixdesc-gbrap   a2b9d6261ad24d75d192cbb3af277022
+pixdesc-gbrap   62c4d187a269f9f6fc87bb87e904ea71
diff --git a/tests/ref/fate/filter-pixfmts-copy 
b/tests/ref/fate/filter-pixfmts-copy
index 0059c9f..5890d4d 100644
--- a/tests/ref/fate/filter-pixfmts-copy
+++ b/tests/ref/fate/filter-pixfmts-copy
@@ -18,7 +18,7 @@ bgr8898a66734bda0572dfab1edd8239f6a2
 bgra3934fb81a602dfa7d29420b1a66f0fd8
 bgra64bec8d3217bf58d34f080ac88c0b0012c77
 bgra64leb71d75a928aac14cb768403e6f6a9910
-gbrap   ae09c3e9dcbe0d1ef21b2342be369210
+gbrap   98d30987407c51e5620921e11d40a4ff
 gbrp5fbc319e30110d19d539f5b274eddb6d
 gbrp10be703a17591a2a5c236675c5101c349bcc
 gbrp10leee014153f55c011918df5b2394815780
diff --git a/tests/ref/fate/filter-pixfmts-crop 
b/tests/ref/fate/filter-pixfmts-crop
index 4932b01..9b0b36f 100644
--- a/tests/ref/fate/filter-pixfmts-crop
+++ b/tests/ref/fate/filter-pixfmts-crop
@@ -18,7 +18,7 @@ bgr8142275ecc024d3f7b66c168ac2279ae2
 bgrae66a5f68ba463cbc89fce23a61bb5203
 bgra64be1ad8dd02714cafec793fb89577ddde47
 bgra64ledd29ec9aba43aa3e8f9f5b9a93ca8831
-gbrap   da6be176149efdfecb2a690bc64a644e
+gbrap   188cd467fe7ae7d85ae9ca8bdfa07739
 gbrpec671f573c2105072ab68a1933c58fee
 gbrp10be6f0130a41f01e58593d3840446dd94b7
 gbrp10le9c152b7dfb7ad7bc477518d97316d04f
diff --git a/tests/ref/fate/filter-pixfmts-field 
b/tests/ref/fate/filter-pixfmts-field
index 05bbc37..135814a 100644
--- a/tests/ref/fate/filter-pixfmts-field
+++ b/tests/ref/fate/filter-pixfmts-field
@@ -18,7 +18,7 @@ bgr847b2118262ad932cacf731cb66905ffd
 bgra66d6e0846990fff0f09a07c43c3add71
 bgra64beec0bdef8663dc9d73818a48419cb4764
 bgra64le9e2def541e51bc6e77fbffbff7fa146a
-gbrap   5bbed2c5c872748b38db078dbd7535fa
+gbrap   08a28b79dbd19246d1a94e3466af3624
 gbrp838025a3062f7f31e99196ce66961ad7
 gbrp10bef63c2555ea19fc78b00fd5b3e2b48e8c
 gbrp10lebe64c374ab318235d912372e99a0516a
diff --git a/tests/ref/fate/filter-pixfmts-fieldorder 
b/tests/ref/fate/filter-pixfmts-fieldorder
index 6c15a71..6dac638 100644
--- a/tests/ref/fate/filter-pixfmts-fieldorder
+++ b/tests/ref/fate/filter-pixfmts-fieldorder
@@ -18,7 +18,7 @@ bgr8cfc405aaf0162b4edfe9b3e047c5624d
 bgra5967b559257dbb6784f93b9d2bef4edd
 bgra64be64a4ec15bc35ede2018f650b50c2429b
 bgra64le5029192d0f32383c9f25f8e7da7cb5a0
-gbrap   8096c8ee9ade98101348c10eb22504cb
+gbrap   00afb65d44bea99c31b318fdbeb3be10
 gbrp506dea2fe492e985a396d1b11ccd8db3
 gbrp10be55bbfe2d472780dcbadf3027778caa0e
 gbrp10le13a39077ab1b2c3b49afd3e250b84a77
diff --git a/tests/ref/fate/filter-pixfmts-hflip 
b/tests/ref/fate/filter-pixfmts-hflip
index ca152e4..561aa9f 100644
--- a/tests/ref/fate/filter-pixfmts-hflip
+++ b/tests/ref/fate/filter-pixfmts-hflip
@@ -18,7 +18,7 @@ bgr867fb3fd116f0c0eb36d8ed03bdfbb0a6
 bgra275f05a382bcbc9bc77c06b79e1d8a71
 bgra64be1cabeafe9c21a4f7ccd976220f22ee5a
 bgra64le1b15c01c94cf9af89273da1d1f994cff
-gbrap   28e8d545a8f32a330c9368c927d97b66
+gbrap   bf6a2b2f206fbbb332a718fb570d7cb7
 gbrp0ecfeca171ba3a1a2ff4e92f572b71cf
 gbrp10be774398c2f81757a536c094f16cfc541a
 gbrp10lee9a6434d691be541f789f850963da181
diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il
index d7f2d60..7795c9b 100644
--- a/tests/ref/fate/filter-pixfmts-il
+++ b/tests/ref/fate/filte

[FFmpeg-cvslog] avfilter/vf_lut: add planar RGB support

2016-08-23 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Wed Aug 24 08:30:22 
2016 +0200| [0edfd8e6f4bbab7412aa27beb0e3dbe864196062] | committer: Paul B Mahol

avfilter/vf_lut: add planar RGB support

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

 libavfilter/vf_lut.c  | 17 -
 tests/ref/fate/filter-pixfmts-lut |  6 ++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 5148663..3e2f43c 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -66,6 +66,7 @@ typedef struct LutContext {
 int hsub, vsub;
 double var_values[VAR_VARS_NB];
 int is_rgb, is_yuv;
+int is_planar;
 int is_16bit;
 int step;
 int negate_alpha; /* only used by negate */
@@ -126,7 +127,12 @@ static av_cold void uninit(AVFilterContext *ctx)
 AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, \
 AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \
 AV_PIX_FMT_RGB24,AV_PIX_FMT_BGR24,\
-AV_PIX_FMT_RGB48LE,  AV_PIX_FMT_RGBA64LE
+AV_PIX_FMT_RGB48LE,  AV_PIX_FMT_RGBA64LE, \
+AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,\
+AV_PIX_FMT_GBRP9,AV_PIX_FMT_GBRP10,   \
+AV_PIX_FMT_GBRP12,   AV_PIX_FMT_GBRP14,   \
+AV_PIX_FMT_GBRP16,   AV_PIX_FMT_GBRAP12,  \
+AV_PIX_FMT_GBRAP16
 
 static const enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, 
AV_PIX_FMT_NONE };
 static const enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, 
AV_PIX_FMT_NONE };
@@ -268,10 +274,11 @@ static int config_props(AVFilterLink *inlink)
 break;
 default:
 min[0] = min[1] = min[2] = min[3] = 0;
-max[0] = max[1] = max[2] = max[3] = 255;
+max[0] = max[1] = max[2] = max[3] = 255 * (1 << (desc->comp[0].depth - 
8));
 }
 
 s->is_yuv = s->is_rgb = 0;
+s->is_planar = desc->flags & AV_PIX_FMT_FLAG_PLANAR;
 if  (ff_fmt_is_in(inlink->format, yuv_pix_fmts)) s->is_yuv = 1;
 else if (ff_fmt_is_in(inlink->format, rgb_pix_fmts)) s->is_rgb = 1;
 
@@ -345,7 +352,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 av_frame_copy_props(out, in);
 }
 
-if (s->is_rgb && s->is_16bit) {
+if (s->is_rgb && s->is_16bit && !s->is_planar) {
 /* packed, 16-bit */
 uint16_t *inrow, *outrow, *inrow0, *outrow0;
 const int w = inlink->w;
@@ -382,7 +389,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 inrow0  += in_linesize;
 outrow0 += out_linesize;
 }
-} else if (s->is_rgb) {
+} else if (s->is_rgb && !s->is_planar) {
 /* packed */
 uint8_t *inrow, *outrow, *inrow0, *outrow0;
 const int w = inlink->w;
@@ -412,7 +419,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 outrow0 += out_linesize;
 }
 } else if (s->is_16bit) {
-// planar yuv >8 bit depth
+// planar >8 bit depth
 uint16_t *inrow, *outrow;
 
 for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; 
plane++) {
diff --git a/tests/ref/fate/filter-pixfmts-lut 
b/tests/ref/fate/filter-pixfmts-lut
index 47e79d1..1f7c2ea 100644
--- a/tests/ref/fate/filter-pixfmts-lut
+++ b/tests/ref/fate/filter-pixfmts-lut
@@ -2,6 +2,12 @@ abgr0a932e831efd4ec22f68b25278bac402
 argb4f575be3cd02799389f581df99c4de38
 bgr24   fa43e3b2abfde8d9e60e157a9acc553d
 bgra4e2e689897ee7a8e42b16234597bab35
+gbrap   0d1eb2c39e291c53c57302cdc653c2fc
+gbrpe572d53183f3f2ed3951aa9940d440a1
+gbrp10lea8fd1ebbc36a477e2b134241fed91687
+gbrp12lec5a4b89571f7095eb737ad9fd6b1ee08
+gbrp14lebdfdfd6f36c60497d1cdae791f3cc117
+gbrp9le a8c4e29f4cb627db81ba053e0853e702
 rgb24   a356171207723a580e7d277078072005
 rgb48le 5c7dd8575836d18c91e09f1915cf9aa9
 rgba7bc854c2698b78af3e9159a19c2d9d21

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