[FFmpeg-cvslog] avformat/av1: zero initialize the seq_params struct

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 23:27:51 
2018 -0300| [11cec348291d32bd1375d9833d60928de3cf2cbb] | committer: James Almer

avformat/av1: zero initialize the seq_params struct

Signed-off-by: James Almer 

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

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

diff --git a/libavformat/av1.c b/libavformat/av1.c
index aa11bde573..a0aad436a6 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -111,8 +111,6 @@ static int parse_color_config(AV1SequenceParameters 
*seq_params, GetBitContext *
 seq_params->high_bitdepth = get_bits1(gb);
 if (seq_params->seq_profile == FF_PROFILE_AV1_PROFESSIONAL && 
seq_params->high_bitdepth)
 seq_params->twelve_bit = get_bits1(gb);
-else
-seq_params->twelve_bit = 0;
 
 if (seq_params->seq_profile == FF_PROFILE_AV1_HIGH)
 seq_params->monochrome = 0;
@@ -185,6 +183,8 @@ static int parse_sequence_header(AV1SequenceParameters 
*seq_params, const uint8_
 if (ret < 0)
 return ret;
 
+memset(seq_params, 0, sizeof(*seq_params));
+
 seq_params->seq_profile = get_bits(, 3);
 
 skip_bits1(); // still_picture

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


[FFmpeg-cvslog] libopenh264: Add support for decoding of b-frames

2018-09-02 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Mon Jul 30 
14:58:37 2018 +0300| [e1e3a12242347dd11174b2fb9ddac8dc8df16224] | committer: 
Martin Storsjö

libopenh264: Add support for decoding of b-frames

The current git master version of libopenh264 supports decoding of
b-frames.

Signed-off-by: Martin Storsjö 

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

 libavcodec/libopenh264dec.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index cdb8d527cf..5990a72ff9 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -96,7 +96,18 @@ static int svc_decode_frame(AVCodecContext *avctx, void 
*data,
 AVFrame *avframe = data;
 DECODING_STATE state;
 
-state = (*s->decoder)->DecodeFrame2(s->decoder, avpkt->data, avpkt->size, 
ptrs, );
+if (!avpkt->data) {
+#if OPENH264_VER_AT_LEAST(1, 9)
+int end_of_stream = 1;
+(*s->decoder)->SetOption(s->decoder, DECODER_OPTION_END_OF_STREAM, 
_of_stream);
+state = (*s->decoder)->FlushFrame(s->decoder, ptrs, );
+#else
+return 0;
+#endif
+} else {
+info.uiInBsTimeStamp = avpkt->pts;
+state = (*s->decoder)->DecodeFrame2(s->decoder, avpkt->data, 
avpkt->size, ptrs, );
+}
 if (state != dsErrorFree) {
 av_log(avctx, AV_LOG_ERROR, "DecodeFrame2 failed\n");
 return AVERROR_UNKNOWN;
@@ -118,8 +129,8 @@ static int svc_decode_frame(AVCodecContext *avctx, void 
*data,
 linesize[1] = linesize[2] = info.UsrData.sSystemBuffer.iStride[1];
 av_image_copy(avframe->data, avframe->linesize, (const uint8_t **) ptrs, 
linesize, avctx->pix_fmt, avctx->width, avctx->height);
 
-avframe->pts = avpkt->pts;
-avframe->pkt_dts = avpkt->dts;
+avframe->pts = info.uiOutYuvTimeStamp;
+avframe->pkt_dts = AV_NOPTS_VALUE;
 #if FF_API_PKT_PTS
 FF_DISABLE_DEPRECATION_WARNINGS
 avframe->pkt_pts = avpkt->pts;
@@ -139,8 +150,6 @@ AVCodec ff_libopenh264_decoder = {
 .init   = svc_decode_init,
 .decode = svc_decode_frame,
 .close  = svc_decode_close,
-// The decoder doesn't currently support B-frames, and the decoder's API
-// doesn't support reordering/delay, but the BSF could incur delay.
 .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
 .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_THREADSAFE 
|
   FF_CODEC_CAP_INIT_CLEANUP,

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


[FFmpeg-cvslog] libsrt: Pass the correct pointer for the passphrase

2018-09-02 Thread Sven Dueking
ffmpeg | branch: master | Sven Dueking  | Fri Jul 13 02:08:50 
2018 +0200| [f25117a4286505b38c12466ef04459471de3c1b0] | committer: Luca Barbato

libsrt: Pass the correct pointer for the passphrase

The passphrase field is a pointer already.

Bug-Id: https://github.com/Haivision/srt/issues/416

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

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

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 8e44ce6b80..f901bba875 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -289,7 +289,7 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
 if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, 
SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", , sizeof(yes)) < 0) ||
 (s->maxbw >= 0 && libsrt_setsockopt(h, fd, SRTO_MAXBW, "SRTO_MAXBW", 
>maxbw, sizeof(s->maxbw)) < 0) ||
 (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, 
"SRTO_PBKEYLEN", >pbkeylen, sizeof(s->pbkeylen)) < 0) ||
-(s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, 
"SRTO_PASSPHRASE", >passphrase, sizeof(s->passphrase)) < 0) ||
+(s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, 
"SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
 (s->mss >= 0 && libsrt_setsockopt(h, fd, SRTO_MSS, "SRTO_MMS", 
>mss, sizeof(s->mss)) < 0) ||
 (s->ffs >= 0 && libsrt_setsockopt(h, fd, SRTO_FC, "SRTO_FC", >ffs, 
sizeof(s->ffs)) < 0) ||
 (s->ipttl >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTTL, "SRTO_UPTTL", 
>ipttl, sizeof(s->ipttl)) < 0) ||

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


[FFmpeg-cvslog] avconv: make sure packets put into the muxing FIFO are refcounted

2018-09-02 Thread wm4
ffmpeg | branch: master | wm4  | Wed Feb  8 09:53:26 
2017 +0100| [c011beda2611acfeb6f67d4fdf30d1eceed9e62f] | committer: Martin 
Storsjö

avconv: make sure packets put into the muxing FIFO are refcounted

Some callers (like do_subtitle_out(), or do_streamcopy()) call this
with an AVPacket that is not refcounted. This can cause undefined
behavior.

Calling av_packet_move_ref() does not make a packet refcounted if it
isn't yet. (And it can't be made to, because it always succeeds,
and can't return ENOMEM.)

Call av_packet_ref() instead to make sure it's refcounted.

Cc: libav-sta...@libav.org
Signed-off-by: Martin Storsjö 

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

 avtools/avconv.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/avtools/avconv.c b/avtools/avconv.c
index ac15464a8d..3abb7f872f 100644
--- a/avtools/avconv.c
+++ b/avtools/avconv.c
@@ -281,7 +281,7 @@ static void write_packet(OutputFile *of, AVPacket *pkt, 
OutputStream *ost)
 int ret;
 
 if (!of->header_written) {
-AVPacket tmp_pkt;
+AVPacket tmp_pkt = {0};
 /* the muxer is not initialized yet, buffer the packet */
 if (!av_fifo_space(ost->muxing_queue)) {
 int new_size = FFMIN(2 * av_fifo_size(ost->muxing_queue),
@@ -296,8 +296,11 @@ static void write_packet(OutputFile *of, AVPacket *pkt, 
OutputStream *ost)
 if (ret < 0)
 exit_program(1);
 }
-av_packet_move_ref(_pkt, pkt);
+ret = av_packet_ref(_pkt, pkt);
+if (ret < 0)
+exit_program(1);
 av_fifo_generic_write(ost->muxing_queue, _pkt, sizeof(tmp_pkt), 
NULL);
+av_packet_unref(pkt);
 return;
 }
 

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


[FFmpeg-cvslog] libfdk-aac: Use enum names instead of literal numbers for the output format

2018-09-02 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Thu Jul  5 
23:05:02 2018 +0300| [b93026777aada7742583d8c5ab079e9f4dfe9a5d] | committer: 
Martin Storsjö

libfdk-aac: Use enum names instead of literal numbers for the output format

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 26dfb6dc0b..c340a1e3e0 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -227,7 +227,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
 /* Choose bitstream format - if global header is requested, use
  * raw access units, otherwise use ADTS. */
 if ((err = aacEncoder_SetParam(s->handle, AACENC_TRANSMUX,
-   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER 
? 0 : s->latm ? 10 : 2)) != AACENC_OK) {
+   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER 
? TT_MP4_RAW :
+   s->latm ? TT_MP4_LOAS : TT_MP4_ADTS)) != 
AACENC_OK) {
 av_log(avctx, AV_LOG_ERROR, "Unable to set the transmux format: %s\n",
aac_get_error(err));
 goto error;

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


[FFmpeg-cvslog] Merge commit 'c011beda2611acfeb6f67d4fdf30d1eceed9e62f'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:25:16 
2018 -0300| [c0a647644f2703e1da980dcf988cefd81528d8c9] | committer: James Almer

Merge commit 'c011beda2611acfeb6f67d4fdf30d1eceed9e62f'

* commit 'c011beda2611acfeb6f67d4fdf30d1eceed9e62f':
  avconv: make sure packets put into the muxing FIFO are refcounted

This commit is a noop, see 33580a8625c77591919b6155a48da04dccc8d398

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:23:26 
2018 -0300| [7167ac33a8f2c7d063384c267f984f23d2b73854] | committer: James Almer

Merge commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726'

* commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726':
  avcodec/qsv: fix async support

Merged-by: James Almer 

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

 libavcodec/qsvdec.c   | 15 ---
 libavcodec/qsvdec_h2645.c |  4 ++--
 libavcodec/qsvdec_other.c |  2 +-
 libavcodec/qsvenc.c   | 17 +
 libavcodec/qsvenc.h   |  2 +-
 5 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 32f1fe79d7..22e7a46a85 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -110,6 +110,16 @@ static int qsv_init_session(AVCodecContext *avctx, 
QSVContext *q, mfxSession ses
 return 0;
 }
 
+static inline unsigned int qsv_fifo_item_size(void)
+{
+return sizeof(mfxSyncPoint*) + sizeof(QSVFrame*);
+}
+
+static inline unsigned int qsv_fifo_size(const AVFifoBuffer* fifo)
+{
+return av_fifo_size(fifo) / qsv_fifo_item_size();
+}
+
 static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
 {
 const AVPixFmtDescriptor *desc;
@@ -125,8 +135,7 @@ static int qsv_decode_init(AVCodecContext *avctx, 
QSVContext *q)
 return AVERROR_BUG;
 
 if (!q->async_fifo) {
-q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
-  (sizeof(mfxSyncPoint*) + 
sizeof(QSVFrame*)));
+q->async_fifo = av_fifo_alloc(q->async_depth * qsv_fifo_item_size());
 if (!q->async_fifo)
 return AVERROR(ENOMEM);
 }
@@ -384,7 +393,7 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
 av_freep();
 }
 
-if (!av_fifo_space(q->async_fifo) ||
+if ((qsv_fifo_size(q->async_fifo) >= q->async_depth) ||
 (!avpkt->size && av_fifo_size(q->async_fifo))) {
 AVFrame *src_frame;
 
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index 831252f2d7..d9d2318d1a 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -186,7 +186,7 @@ static void qsv_decode_flush(AVCodecContext *avctx)
 
 #if CONFIG_HEVC_QSV_DECODER
 static const AVOption hevc_options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 
 { "load_plugin", "A user plugin to load in an internal session", 
OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_DEFAULT }, 
LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VD, "load_plugin" },
 { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE },
0, 0, VD, "load_plugin" },
@@ -229,7 +229,7 @@ AVCodec ff_hevc_qsv_decoder = {
 
 #if CONFIG_H264_QSV_DECODER
 static const AVOption options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 { NULL },
 };
 
diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c
index 3c872dcfc2..f6e08a2a84 100644
--- a/libavcodec/qsvdec_other.c
+++ b/libavcodec/qsvdec_other.c
@@ -159,7 +159,7 @@ static void qsv_decode_flush(AVCodecContext *avctx)
 #define OFFSET(x) offsetof(QSVOtherContext, x)
 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 static const AVOption options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 { NULL },
 };
 
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3053dd1a06..c4cdebf40d 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -788,7 +788,7 @@ static int qsv_init_opaque_alloc(AVCodecContext *avctx, 
QSVEncContext *q)
 mfxFrameSurface1 *surfaces;
 int nb_surfaces, i;
 
-nb_surfaces = qsv->nb_opaque_surfaces + q->req.NumFrameSuggested + 
q->async_depth;
+nb_surfaces = qsv->nb_opaque_surfaces + q->req.NumFrameSuggested;
 
 q->opaque_alloc_buf = av_buffer_allocz(sizeof(*surfaces) * nb_surfaces);
 if (!q->opaque_alloc_buf)
@@ -859,6 +859,16 @@ static int 

[FFmpeg-cvslog] Merge commit 'f25117a4286505b38c12466ef04459471de3c1b0'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:21:35 
2018 -0300| [768b07e3bca7e81d2f9c60badb3973d3d88481dc] | committer: James Almer

Merge commit 'f25117a4286505b38c12466ef04459471de3c1b0'

* commit 'f25117a4286505b38c12466ef04459471de3c1b0':
  libsrt: Pass the correct pointer for the passphrase

Merged-by: James Almer 

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

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

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index c19d85192f..9795e279e8 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -299,7 +299,7 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
 if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, 
SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", , sizeof(yes)) < 0) ||
 (s->maxbw >= 0 && libsrt_setsockopt(h, fd, SRTO_MAXBW, "SRTO_MAXBW", 
>maxbw, sizeof(s->maxbw)) < 0) ||
 (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, 
"SRTO_PBKEYLEN", >pbkeylen, sizeof(s->pbkeylen)) < 0) ||
-(s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, 
"SRTO_PASSPHRASE", >passphrase, sizeof(s->passphrase)) < 0) ||
+(s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, 
"SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
 (s->mss >= 0 && libsrt_setsockopt(h, fd, SRTO_MSS, "SRTO_MMS", 
>mss, sizeof(s->mss)) < 0) ||
 (s->ffs >= 0 && libsrt_setsockopt(h, fd, SRTO_FC, "SRTO_FC", >ffs, 
sizeof(s->ffs)) < 0) ||
 (s->ipttl >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTTL, "SRTO_UPTTL", 
>ipttl, sizeof(s->ipttl)) < 0) ||


==


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


[FFmpeg-cvslog] Merge commit 'e1e3a12242347dd11174b2fb9ddac8dc8df16224'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:26:00 
2018 -0300| [022fa7a24ea8f5000e7b6a50e57cc752f417da47] | committer: James Almer

Merge commit 'e1e3a12242347dd11174b2fb9ddac8dc8df16224'

* commit 'e1e3a12242347dd11174b2fb9ddac8dc8df16224':
  libopenh264: Add support for decoding of b-frames

Merged-by: James Almer 

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

 libavcodec/libopenh264dec.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index b7ed85d175..3acc3696da 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -96,7 +96,18 @@ static int svc_decode_frame(AVCodecContext *avctx, void 
*data,
 AVFrame *avframe = data;
 DECODING_STATE state;
 
-state = (*s->decoder)->DecodeFrame2(s->decoder, avpkt->data, avpkt->size, 
ptrs, );
+if (!avpkt->data) {
+#if OPENH264_VER_AT_LEAST(1, 9)
+int end_of_stream = 1;
+(*s->decoder)->SetOption(s->decoder, DECODER_OPTION_END_OF_STREAM, 
_of_stream);
+state = (*s->decoder)->FlushFrame(s->decoder, ptrs, );
+#else
+return 0;
+#endif
+} else {
+info.uiInBsTimeStamp = avpkt->pts;
+state = (*s->decoder)->DecodeFrame2(s->decoder, avpkt->data, 
avpkt->size, ptrs, );
+}
 if (state != dsErrorFree) {
 av_log(avctx, AV_LOG_ERROR, "DecodeFrame2 failed\n");
 return AVERROR_UNKNOWN;
@@ -120,8 +131,8 @@ static int svc_decode_frame(AVCodecContext *avctx, void 
*data,
 linesize[1] = linesize[2] = info.UsrData.sSystemBuffer.iStride[1];
 av_image_copy(avframe->data, avframe->linesize, (const uint8_t **) ptrs, 
linesize, avctx->pix_fmt, avctx->width, avctx->height);
 
-avframe->pts = avpkt->pts;
-avframe->pkt_dts = avpkt->dts;
+avframe->pts = info.uiOutYuvTimeStamp;
+avframe->pkt_dts = AV_NOPTS_VALUE;
 #if FF_API_PKT_PTS
 FF_DISABLE_DEPRECATION_WARNINGS
 avframe->pkt_pts = avpkt->pts;
@@ -141,8 +152,6 @@ AVCodec ff_libopenh264_decoder = {
 .init   = svc_decode_init,
 .decode = svc_decode_frame,
 .close  = svc_decode_close,
-// The decoder doesn't currently support B-frames, and the decoder's API
-// doesn't support reordering/delay, but the BSF could incur delay.
 .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
 .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_THREADSAFE 
|
   FF_CODEC_CAP_INIT_CLEANUP,


==


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


[FFmpeg-cvslog] Merge commit '52fd2afce8436c59c05765f3a6e95f9adb6f9f2f'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:19:23 
2018 -0300| [3eea8edf618079e44719fe059ddd953b21ef1ba9] | committer: James Almer

Merge commit '52fd2afce8436c59c05765f3a6e95f9adb6f9f2f'

* commit '52fd2afce8436c59c05765f3a6e95f9adb6f9f2f':
  configure: fix inline asm checks

This commit is a noop, see ad94f1c8abe68a2b38536cc96a31327c6be7b105

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] avcodec/qsv: fix async support

2018-09-02 Thread Dmitry Rogozhkin
ffmpeg | branch: master | Dmitry Rogozhkin  | Tue 
Jul 24 10:36:19 2018 -0700| [c1bcd321ea2c2ae1765a1e64f03278712221d726] | 
committer: Maxym Dmytrychenko

avcodec/qsv: fix async support

Current implementations of qsv components incorrectly work with async level, 
they
actually try to work in async+1 level stepping into MFX_WRN_DEVICE_BUSY and 
polling
loop. This change address this misbehaviour.

Signed-off-by: Dmitry Rogozhkin 
Cc: Maxym Dmytrychenko 
Cc: Zhong Li 
Signed-off-by: Maxym Dmytrychenko 

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

 libavcodec/qsvdec.c   | 15 ---
 libavcodec/qsvdec_h2645.c |  4 ++--
 libavcodec/qsvdec_other.c |  2 +-
 libavcodec/qsvenc.c   | 17 +
 libavcodec/qsvenc.h   |  2 +-
 5 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 31cce2d838..48ac6eb18c 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -110,6 +110,16 @@ static int qsv_init_session(AVCodecContext *avctx, 
QSVContext *q, mfxSession ses
 return 0;
 }
 
+static inline unsigned int qsv_fifo_item_size(void)
+{
+return sizeof(mfxSyncPoint*) + sizeof(QSVFrame*);
+}
+
+static inline unsigned int qsv_fifo_size(const AVFifoBuffer* fifo)
+{
+return av_fifo_size(fifo) / qsv_fifo_item_size();
+}
+
 static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
 {
 const AVPixFmtDescriptor *desc;
@@ -125,8 +135,7 @@ static int qsv_decode_init(AVCodecContext *avctx, 
QSVContext *q)
 return AVERROR_BUG;
 
 if (!q->async_fifo) {
-q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
-  (sizeof(mfxSyncPoint*) + 
sizeof(QSVFrame*)));
+q->async_fifo = av_fifo_alloc(q->async_depth * qsv_fifo_item_size());
 if (!q->async_fifo)
 return AVERROR(ENOMEM);
 }
@@ -384,7 +393,7 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
 av_freep();
 }
 
-if (!av_fifo_space(q->async_fifo) ||
+if ((qsv_fifo_size(q->async_fifo) >= q->async_depth) ||
 (!avpkt->size && av_fifo_size(q->async_fifo))) {
 AVFrame *src_frame;
 
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index 78a7b613f9..0150372bf1 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -186,7 +186,7 @@ static void qsv_decode_flush(AVCodecContext *avctx)
 
 #if CONFIG_HEVC_QSV_DECODER
 static const AVOption hevc_options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 
 { "load_plugin", "A user plugin to load in an internal session", 
OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_DEFAULT }, 
LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VD, "load_plugin" },
 { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE },
0, 0, VD, "load_plugin" },
@@ -229,7 +229,7 @@ AVCodec ff_hevc_qsv_decoder = {
 
 #if CONFIG_H264_QSV_DECODER
 static const AVOption options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 { NULL },
 };
 
diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c
index 90693ed317..150ce0d2ad 100644
--- a/libavcodec/qsvdec_other.c
+++ b/libavcodec/qsvdec_other.c
@@ -159,7 +159,7 @@ static void qsv_decode_flush(AVCodecContext *avctx)
 #define OFFSET(x) offsetof(QSVOtherContext, x)
 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 static const AVOption options[] = {
-{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
+{ "async_depth", "Internal parallelization depth, the higher the value the 
higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 
ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
 { NULL },
 };
 
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 307ef683f9..e349a075f5 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -802,7 +802,7 @@ static int qsv_init_opaque_alloc(AVCodecContext *avctx, 
QSVEncContext *q)
 mfxFrameSurface1 *surfaces;
 int nb_surfaces, i;
 
-nb_surfaces = qsv->nb_opaque_surfaces + q->req.NumFrameSuggested + 
q->async_depth;
+nb_surfaces = 

[FFmpeg-cvslog] Merge commit 'b93026777aada7742583d8c5ab079e9f4dfe9a5d'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:20:36 
2018 -0300| [2d62e06ff6a9f3dbd78136c1dc4a315a727c6f00] | committer: James Almer

Merge commit 'b93026777aada7742583d8c5ab079e9f4dfe9a5d'

* commit 'b93026777aada7742583d8c5ab079e9f4dfe9a5d':
  libfdk-aac: Use enum names instead of literal numbers for the output format

Merged-by: James Almer 

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

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

diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index d47137b227..25d33fec18 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -227,7 +227,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
 /* Choose bitstream format - if global header is requested, use
  * raw access units, otherwise use ADTS. */
 if ((err = aacEncoder_SetParam(s->handle, AACENC_TRANSMUX,
-   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER 
? 0 : s->latm ? 10 : 2)) != AACENC_OK) {
+   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER 
? TT_MP4_RAW :
+   s->latm ? TT_MP4_LOAS : TT_MP4_ADTS)) != 
AACENC_OK) {
 av_log(avctx, AV_LOG_ERROR, "Unable to set the transmux format: %s\n",
aac_get_error(err));
 goto error;


==


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


[FFmpeg-cvslog] configure: fix inline asm checks

2018-09-02 Thread John Cox
ffmpeg | branch: master | John Cox  | Wed May 30 17:30:31 
2018 +0100| [52fd2afce8436c59c05765f3a6e95f9adb6f9f2f] | committer: Martin 
Storsjö

configure: fix inline asm checks

Commit 8c893aa3cd5 removed quotes that were required to detect
inline asm:

check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }

The correct code is:

void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }

Commit message written by Frank Liberato 

Signed-off-by: Martin Storsjö 

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

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 5e79c0cec1..48e8536b07 100755
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
 
 check_insn(){
 log check_insn "$@"
-check_inline_asm ${1}_inline "$2"
+check_inline_asm ${1}_inline "\"$2\""
 check_as ${1}_external "$2"
 }
 

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


[FFmpeg-cvslog] avformat/libsrt: add latency options and deprecate tspbdelay

2018-09-02 Thread Sven Dueking
ffmpeg | branch: master | Sven Dueking  | Mon May 21 
14:40:17 2018 +0700| [a507af97eef468238d545ff954a39d7432832e54] | committer: 
Luca Barbato

avformat/libsrt: add latency options and deprecate tspbdelay

Signed-off-by: Sven Dueking 
Signed-off-by: Luca Barbato 

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

 configure|  2 +-
 doc/protocols.texi   | 31 +++
 libavformat/libsrt.c | 28 +++-
 3 files changed, 51 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index f5e7f1578c..5e79c0cec1 100755
--- a/configure
+++ b/configure
@@ -4691,7 +4691,7 @@ enabled librtmp   && require_pkg_config librtmp 
librtmp librtmp/rtmp.h R
 enabled libschroedinger   && require_pkg_config libschroedinger 
schroedinger-1.0 schroedinger/schro.h schro_init
 enabled libsnappy && require libsnappy snappy-c.h snappy_compress 
-lsnappy
 enabled libspeex  && require_pkg_config libspeex speex speex/speex.h 
speex_decoder_init
-enabled libsrt&& require_pkg_config libsrt "srt >= 1.2.0" 
srt/srt.h srt_socket
+enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" 
srt/srt.h srt_socket
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init 
-ltheoraenc -ltheoradec -logg
 enabled libtwolame&& require libtwolame twolame.h twolame_init 
-ltwolame
 enabled libvo_aacenc  && require libvo_aacenc vo-aacenc/voAAC.h 
voGetAACEncAPI -lvo-aacenc
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 5b625e571b..c3d6e150e0 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -710,6 +710,17 @@ IP Type of Service. Applies to sender only. Default value 
is 0xB8.
 @item ipttl=@var{ttl}
 IP Time To Live. Applies to sender only. Default value is 64.
 
+@item latency
+Timestamp-based Packet Delivery Delay.
+Used to absorb bursts of missed packet retransmissions.
+This flag sets both @option{rcvlatency} and @option{peerlatency}
+to the same value. Note that prior to version 1.3.0
+this is the only flag to set the latency, however
+this is effectively equivalent to setting @option{peerlatency},
+when side is sender and @option{rcvlatency}
+when side is receiver, and the bidirectional stream
+sending is not supported.
+
 @item listen_timeout
 Set socket listen timeout.
 
@@ -766,6 +777,10 @@ wrapping a live stream in very small frames, then you can
 use a bigger maximum frame size, though not greater than
 1456 bytes.
 
+@item peerlatency
+The latency value (as described in @option{rcvlatency}) that is
+set by the sender side as a minimum value for the receiver.
+
 @item pbkeylen=@var{bytes}
 Sender encryption key length, in bytes.
 Only can be set to 0, 16, 24 and 32.
@@ -774,6 +789,18 @@ Not required on receiver (set to 0),
 key size obtained from sender in HaiCrypt handshake.
 Default value is 0.
 
+@item rcvlatency
+The time that should elapse since the moment when the
+packet was sent and the moment when it's delivered to
+the receiver application in the receiving function.
+This time should be a buffer time large enough to cover
+the time spent for sending, unexpectedly extended RTT
+time, and the time needed to retransmit the lost UDP
+packet. The effective latency value will be the maximum
+of this options' value and the value of @option{peerlatency}
+set by the peer side. Before version 1.3.0 this option
+is only available as @option{latency}.
+
 @item recv_buffer_size=@var{bytes}
 Set receive buffer size, expressed in bytes.
 
@@ -798,10 +825,6 @@ have no chance of being delivered in time. It was
 automatically enabled in the sender if the receiver
 supports it.
 
-@item tsbpddelay
-Timestamp-based Packet Delivery Delay.
-Used to absorb burst of missed packet retransmission.
-
 @end table
 
 For more information see: @url{https://github.com/Haivision/srt}.
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index ec209c236d..8e44ce6b80 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -68,11 +68,13 @@ typedef struct SRTContext {
 int iptos;
 int64_t inputbw;
 int oheadbw;
-int64_t tsbpddelay;
+int64_t latency;
 int tlpktdrop;
 int nakreport;
 int64_t connect_timeout;
 int payload_size;
+int64_t rcvlatency;
+int64_t peerlatency;
 enum SRTMode mode;
 } SRTContext;
 
@@ -93,7 +95,10 @@ static const AVOption libsrt_options[] = {
 { "iptos",  "IP Type of Service",  
 OFFSET(iptos),AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, 255,   .flags = D|E },
 { "inputbw","Estimated input stream rate", 
 OFFSET(inputbw),  AV_OPT_TYPE_INT64,{ .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
 { "oheadbw","MaxBW ceiling based on % over input stream rate", 
 OFFSET(oheadbw),  AV_OPT_TYPE_INT,  { 

[FFmpeg-cvslog] Merge commit 'a507af97eef468238d545ff954a39d7432832e54'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:11:45 
2018 -0300| [de33b3e457a656230fc6d544a1889218d77a5b3c] | committer: James Almer

Merge commit 'a507af97eef468238d545ff954a39d7432832e54'

* commit 'a507af97eef468238d545ff954a39d7432832e54':
  avformat/libsrt: add latency options and deprecate tspbdelay

Merged-by: James Almer 

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

 doc/protocols.texi| 31 +++
 libavformat/libsrt.c  | 28 +++-
 libavformat/version.h |  2 +-
 3 files changed, 51 insertions(+), 10 deletions(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 6322581c86..fad6c44c24 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -1210,6 +1210,17 @@ IP Type of Service. Applies to sender only. Default 
value is 0xB8.
 @item ipttl=@var{ttl}
 IP Time To Live. Applies to sender only. Default value is 64.
 
+@item latency
+Timestamp-based Packet Delivery Delay.
+Used to absorb bursts of missed packet retransmissions.
+This flag sets both @option{rcvlatency} and @option{peerlatency}
+to the same value. Note that prior to version 1.3.0
+this is the only flag to set the latency, however
+this is effectively equivalent to setting @option{peerlatency},
+when side is sender and @option{rcvlatency}
+when side is receiver, and the bidirectional stream
+sending is not supported.
+
 @item listen_timeout
 Set socket listen timeout.
 
@@ -1270,6 +1281,10 @@ use a bigger maximum frame size, though not greater than
 @item pkt_size=@var{bytes}
 Alias for @samp{payload_size}.
 
+@item peerlatency
+The latency value (as described in @option{rcvlatency}) that is
+set by the sender side as a minimum value for the receiver.
+
 @item pbkeylen=@var{bytes}
 Sender encryption key length, in bytes.
 Only can be set to 0, 16, 24 and 32.
@@ -1278,6 +1293,18 @@ Not required on receiver (set to 0),
 key size obtained from sender in HaiCrypt handshake.
 Default value is 0.
 
+@item rcvlatency
+The time that should elapse since the moment when the
+packet was sent and the moment when it's delivered to
+the receiver application in the receiving function.
+This time should be a buffer time large enough to cover
+the time spent for sending, unexpectedly extended RTT
+time, and the time needed to retransmit the lost UDP
+packet. The effective latency value will be the maximum
+of this options' value and the value of @option{peerlatency}
+set by the peer side. Before version 1.3.0 this option
+is only available as @option{latency}.
+
 @item recv_buffer_size=@var{bytes}
 Set receive buffer size, expressed in bytes.
 
@@ -1302,10 +1329,6 @@ have no chance of being delivered in time. It was
 automatically enabled in the sender if the receiver
 supports it.
 
-@item tsbpddelay
-Timestamp-based Packet Delivery Delay.
-Used to absorb burst of missed packet retransmission.
-
 @end table
 
 For more information see: @url{https://github.com/Haivision/srt}.
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index cb30f23eb3..c19d85192f 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -68,11 +68,13 @@ typedef struct SRTContext {
 int iptos;
 int64_t inputbw;
 int oheadbw;
-int64_t tsbpddelay;
+int64_t latency;
 int tlpktdrop;
 int nakreport;
 int64_t connect_timeout;
 int payload_size;
+int64_t rcvlatency;
+int64_t peerlatency;
 enum SRTMode mode;
 } SRTContext;
 
@@ -97,7 +99,10 @@ static const AVOption libsrt_options[] = {
 { "iptos",  "IP Type of Service",  
 OFFSET(iptos),AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, 255,   .flags = D|E },
 { "inputbw","Estimated input stream rate", 
 OFFSET(inputbw),  AV_OPT_TYPE_INT64,{ .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
 { "oheadbw","MaxBW ceiling based on % over input stream rate", 
 OFFSET(oheadbw),  AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, 100,   .flags = D|E },
-{ "tsbpddelay", "TsbPd receiver delay to absorb burst of missed packet 
retransmission", OFFSET(tsbpddelay),   AV_OPT_TYPE_INT64, { .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
+{ "latency","receiver delay to absorb bursts of missed packet 
retransmissions", OFFSET(latency),  AV_OPT_TYPE_INT64, { .i64 = -1 
}, -1, INT64_MAX, .flags = D|E },
+{ "tsbpddelay", "deprecated, same effect as latency option",   
 OFFSET(latency),  AV_OPT_TYPE_INT64, { .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
+{ "rcvlatency", "receive latency", 
 OFFSET(rcvlatency),   AV_OPT_TYPE_INT64, { .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
+{ "peerlatency","peer latency",
 

[FFmpeg-cvslog] Merge commit '4ce701b4e640d4723a4005d664f31f8342fac40e'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:12:52 
2018 -0300| [8e789d244cc946bc350672eeb02453918b21a09f] | committer: James Almer

Merge commit '4ce701b4e640d4723a4005d664f31f8342fac40e'

* commit '4ce701b4e640d4723a4005d664f31f8342fac40e':
  qsvenc: remove vcm option on Linux

Merged-by: James Almer 

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

 libavcodec/qsvenc.h  | 1 -
 libavcodec/qsvenc_h264.c | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index bb175c5df8..b2d63557ec 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -78,7 +78,6 @@
 { "slow",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_3  },
INT_MIN, INT_MAX, VE, "preset" },   
 \
 { "slower",  NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_2  },
INT_MIN, INT_MAX, VE, "preset" },   
 \
 { "veryslow",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 
MFX_TARGETUSAGE_BEST_QUALITY  }, INT_MIN, INT_MAX, VE, "preset" },  
  \
-{ "vcm",  "Use the video conferencing mode ratecontrol",  OFFSET(qsv.vcm), 
 AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1, VE },   
 \
 { "rdo","Enable rate distortion optimization",OFFSET(qsv.rdo), 
   AV_OPT_TYPE_INT, { .i64 = -1 }, -1,  1, VE },
 \
 { "max_frame_size", "Maximum encoded frame size in bytes",
OFFSET(qsv.max_frame_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE 
}, \
 { "max_slice_size", "Maximum encoded slice size in bytes",
OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE 
}, \
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index b107b87f34..06fa0ebf06 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -103,6 +103,9 @@ static const AVOption options[] = {
 QSV_COMMON_OPTS
 
 { "cavlc",  "Enable CAVLC",   
OFFSET(qsv.cavlc),  AV_OPT_TYPE_INT, { .i64 = 0 },   0,  1, VE 
},
+#if QSV_HAVE_VCM
+{ "vcm",  "Use the video conferencing mode ratecontrol",  
OFFSET(qsv.vcm),  AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1, VE },
+#endif
 { "idr_interval", "Distance (in I-frames) between IDR frames", 
OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
 { "pic_timing_sei","Insert picture timing SEI with pic_struct_syntax 
element", OFFSET(qsv.pic_timing_sei), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
 { "single_sei_nal_unit","Put all the SEI messages into one NALU",  
  OFFSET(qsv.single_sei_nal_unit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1,  
1, VE },


==

diff --cc libavcodec/qsvenc.h
index bb175c5df8,bac172f941..b2d63557ec
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@@ -67,30 -66,31 +67,29 @@@
  #endif
  
  #define QSV_COMMON_OPTS \
 -{ "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), 
AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VE },  \
 -{ "avbr_accuracy","Accuracy of the AVBR ratecontrol",
OFFSET(qsv.avbr_accuracy),AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },  
   \
 -{ "avbr_convergence", "Convergence of the AVBR ratecontrol", 
OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },  
   \
 -{ "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 = 
MFX_TARGETUSAGE_BALANCED }, 0, 7,   VE, "preset" }, 
\
 -{ "fast",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_SPEED  
},   INT_MIN, INT_MAX, VE, "preset" }, \
 -{ "medium", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BALANCED  }, 
INT_MIN, INT_MAX, VE, "preset" }, \
 -{ "slow",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_QUALITY 
 }, INT_MIN, INT_MAX, VE, "preset" }, \
 -{ "la_depth", "Number of frames to analyze before encoding.", 
OFFSET(qsv.la_depth), AV_OPT_TYPE_INT, { .i64 = 9 },   9, 100, VE, "la_depth" 
},  \
 -{ "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 9 }, INT_MIN, INT_MAX,
   VE, "la_depth" },  \
 -{ "la_ds", "Downscaling factor for the frames saved for the lookahead 
analysis", OFFSET(qsv.la_ds), AV_OPT_TYPE_INT,\
 -{ .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, 
MFX_LOOKAHEAD_DS_UNKNOWN, MFX_LOOKAHEAD_DS_4x, VE, "la_ds" },   
   \
 -{ "auto", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, 
INT_MIN, INT_MAX, VE, 

[FFmpeg-cvslog] Merge commit 'f8060865f3e1a16c62e0d337ef0979b6ee4ba457'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:12:18 
2018 -0300| [aebc5b2284db1f40a5b3e2e9a2bf406f606436c7] | committer: James Almer

Merge commit 'f8060865f3e1a16c62e0d337ef0979b6ee4ba457'

* commit 'f8060865f3e1a16c62e0d337ef0979b6ee4ba457':
  qsvenc: use the compression_level to replace private option

Merged-by: James Almer 

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

 libavcodec/qsvenc.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3c82173379..3053dd1a06 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -453,8 +453,19 @@ static int init_video_param(AVCodecContext *avctx, 
QSVEncContext *q)
 if (avctx->level > 0)
 q->param.mfx.CodecLevel = avctx->level;
 
+if (avctx->compression_level == FF_COMPRESSION_DEFAULT) {
+avctx->compression_level = q->preset;
+} else if (avctx->compression_level >= 0) {
+if (avctx->compression_level > MFX_TARGETUSAGE_BEST_SPEED) {
+av_log(avctx, AV_LOG_WARNING, "Invalid compression level: "
+"valid range is 0-%d, using %d instead\n",
+MFX_TARGETUSAGE_BEST_SPEED, MFX_TARGETUSAGE_BEST_SPEED);
+avctx->compression_level = MFX_TARGETUSAGE_BEST_SPEED;
+}
+}
+
 q->param.mfx.CodecProfile   = q->profile;
-q->param.mfx.TargetUsage= q->preset;
+q->param.mfx.TargetUsage= avctx->compression_level;
 q->param.mfx.GopPicSize = FFMAX(0, avctx->gop_size);
 q->param.mfx.GopRefDist = FFMAX(-1, avctx->max_b_frames) + 1;
 q->param.mfx.GopOptFlag = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ?


==


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


[FFmpeg-cvslog] qsvenc: remove vcm option on Linux

2018-09-02 Thread Zhong Li
ffmpeg | branch: master | Zhong Li  | Thu Jun  7 16:51:54 
2018 +0800| [4ce701b4e640d4723a4005d664f31f8342fac40e] | committer: Maxym 
Dmytrychenko

qsvenc: remove vcm option on Linux

1. vcm mode is only available for H264.
2. vcm is not supported on Linux, but it is shown when run "./avconv -h
encoder=h264_qsv |grep vcm". This shouldn't happen.

Signed-off-by: Zhong Li 
Signed-off-by: Maxym Dmytrychenko 

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

 libavcodec/qsvenc.h  | 1 -
 libavcodec/qsvenc_h264.c | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index a7fc57bb48..bac172f941 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -81,7 +81,6 @@
 { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_OFF }, INT_MIN, 
INT_MAX,  VE, "la_ds" }, \
 { "2x", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_2x }, INT_MIN, 
INT_MAX,VE, "la_ds" }, \
 { "4x", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_4x }, INT_MIN, 
INT_MAX,VE, "la_ds" }, \
-{ "vcm",  "Use the video conferencing mode ratecontrol",  OFFSET(qsv.vcm), 
 AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1, VE },\
 { "rdo","Enable rate distortion optimization",OFFSET(qsv.rdo), 
   AV_OPT_TYPE_INT, { .i64 = -1 }, -1,  1, VE }, \
 { "max_frame_size", "Maximum encoded frame size in bytes",
OFFSET(qsv.max_frame_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE 
}, \
 { "max_slice_size", "Maximum encoded slice size in bytes",
OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE 
}, \
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 2ecdb10c5c..2b9401ff99 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -68,6 +68,9 @@ static const AVOption options[] = {
 QSV_COMMON_OPTS
 
 { "cavlc",  "Enable CAVLC",   
OFFSET(qsv.cavlc),  AV_OPT_TYPE_INT, { .i64 = 0 },   0,  1, VE 
},
+#if QSV_HAVE_VCM
+{ "vcm",  "Use the video conferencing mode ratecontrol",  
OFFSET(qsv.vcm),  AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1, VE },
+#endif
 { "idr_interval", "Distance (in I-frames) between IDR frames", 
OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
 { "single_sei_nal_unit","Put all the SEI messages into one NALU",  
  OFFSET(qsv.single_sei_nal_unit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1,  
1, VE },
 { "max_dec_frame_buffering", "Maximum number of frames buffered in the 
DPB", OFFSET(qsv.max_dec_frame_buffering), AV_OPT_TYPE_INT, { .i64 = 0 },   0, 
UINT16_MAX, VE },

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


[FFmpeg-cvslog] Merge commit 'e368b0cbfa3fdc627c331e34556f8e39296d04d5'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:10:14 
2018 -0300| [fb4a12cda4033f2f3d3d1039739f6e0e6f9afb82] | committer: James Almer

Merge commit 'e368b0cbfa3fdc627c331e34556f8e39296d04d5'

* commit 'e368b0cbfa3fdc627c331e34556f8e39296d04d5':
  tls_mbedtls: Use non-deprecated header file

Merged-by: James Almer 

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

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

diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c
index b42b76f8db..9b80a1e3c7 100644
--- a/libavformat/tls_mbedtls.c
+++ b/libavformat/tls_mbedtls.c
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 


==


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


[FFmpeg-cvslog] Merge commit 'ea8ae27a5e112d06fd5625f640e40849e6313f0c'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:11:23 
2018 -0300| [b1b0e532583e26f18ba27f3cc8775dbd62f3bc2b] | committer: James Almer

Merge commit 'ea8ae27a5e112d06fd5625f640e40849e6313f0c'

* commit 'ea8ae27a5e112d06fd5625f640e40849e6313f0c':
  avformat/libsrt: add payload size option

Merged-by: James Almer 

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

 doc/protocols.texi| 21 +++--
 libavformat/libsrt.c  | 27 ---
 libavformat/version.h |  2 +-
 3 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 4c5e972a04..6322581c86 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -1255,6 +1255,21 @@ only if @option{pbkeylen} is non-zero. It is used on
 the receiver only if the received data is encrypted.
 The configured passphrase cannot be recovered (write-only).
 
+@item payload_size=@var{bytes}
+Sets the maximum declared size of a packet transferred
+during the single call to the sending function in Live
+mode. Use 0 if this value isn't used (which is default in
+file mode).
+Default is -1 (automatic), which typically means MPEG-TS;
+if you are going to use SRT
+to send any different kind of payload, such as, for example,
+wrapping a live stream in very small frames, then you can
+use a bigger maximum frame size, though not greater than
+1456 bytes.
+
+@item pkt_size=@var{bytes}
+Alias for @samp{payload_size}.
+
 @item pbkeylen=@var{bytes}
 Sender encryption key length, in bytes.
 Only can be set to 0, 16, 24 and 32.
@@ -1263,12 +1278,6 @@ Not required on receiver (set to 0),
 key size obtained from sender in HaiCrypt handshake.
 Default value is 0.
 
-@item pkt_size=@var{bytes}
-Set maximum SRT payload size, expressed in bytes. Default is -1 (automatic),
-which typically means 1316 as that is the libsrt default for live mode. Libsrt
-can also support payload sizes up to 1456 bytes. (MTU(1500) - UDP.hdr(28) -
-SRT.hdr(16))
-
 @item recv_buffer_size=@var{bytes}
 Set receive buffer size, expressed in bytes.
 
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 2b7e4cb247..cb30f23eb3 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -34,6 +34,16 @@
 #include "os_support.h"
 #include "url.h"
 
+/* This is for MPEG-TS and it's a default SRTO_PAYLOADSIZE for SRTT_LIVE (8 TS 
packets) */
+#ifndef SRT_LIVE_DEFAULT_PAYLOAD_SIZE
+#define SRT_LIVE_DEFAULT_PAYLOAD_SIZE 1316
+#endif
+
+/* This is the maximum payload size for Live mode, should you have a different 
payload type than MPEG-TS */
+#ifndef SRT_LIVE_MAX_PAYLOAD_SIZE
+#define SRT_LIVE_MAX_PAYLOAD_SIZE 1456
+#endif
+
 enum SRTMode {
 SRT_MODE_CALLER = 0,
 SRT_MODE_LISTENER = 1,
@@ -48,7 +58,6 @@ typedef struct SRTContext {
 int64_t listen_timeout;
 int recv_buffer_size;
 int send_buffer_size;
-int pkt_size;
 
 int64_t maxbw;
 int pbkeylen;
@@ -63,6 +72,7 @@ typedef struct SRTContext {
 int tlpktdrop;
 int nakreport;
 int64_t connect_timeout;
+int payload_size;
 enum SRTMode mode;
 } SRTContext;
 
@@ -74,7 +84,10 @@ static const AVOption libsrt_options[] = {
 { "listen_timeout", "Connection awaiting timeout", 
 OFFSET(listen_timeout),   AV_OPT_TYPE_INT64, { .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
 { "send_buffer_size", "Socket send buffer size (in bytes)",
 OFFSET(send_buffer_size), AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, INT_MAX,   .flags = D|E },
 { "recv_buffer_size", "Socket receive buffer size (in bytes)", 
 OFFSET(recv_buffer_size), AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, INT_MAX,   .flags = D|E },
-{ "pkt_size",   "Maximum SRT packet size", 
 OFFSET(pkt_size), AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, INT_MAX,   .flags = D|E },
+{ "pkt_size",   "Maximum SRT packet size", 
 OFFSET(payload_size), AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, SRT_LIVE_MAX_PAYLOAD_SIZE, .flags = D|E, "payload_size" },
+{ "payload_size",   "Maximum SRT packet size", 
 OFFSET(payload_size), AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, SRT_LIVE_MAX_PAYLOAD_SIZE, .flags = D|E, "payload_size" },
+{ "ts_size",NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = 
SRT_LIVE_DEFAULT_PAYLOAD_SIZE }, INT_MIN, INT_MAX, .flags = D|E, "payload_size" 
},
+{ "max_size",   NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = 
SRT_LIVE_MAX_PAYLOAD_SIZE }, INT_MIN, INT_MAX, .flags = D|E, "payload_size" 
},
 { "maxbw",  "Maximum bandwidth (bytes per second) that the 
connection can use", OFFSET(maxbw),AV_OPT_TYPE_INT64,{ .i64 
= -1 }, -1, INT64_MAX, .flags = D|E },
 { "pbkeylen",   "Crypto key len in bytes {16,24,32} Default: 16 

[FFmpeg-cvslog] tls_mbedtls: Use non-deprecated header file

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Apr 25 
10:51:14 2018 +| [e368b0cbfa3fdc627c331e34556f8e39296d04d5] | committer: 
Diego Biurrun

tls_mbedtls: Use non-deprecated header file

/usr/include/mbedtls/net.h:29:2: warning: #warning "Deprecated header file: 
Superseded by mbedtls/net_sockets.h" [-Wcpp]

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

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

diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c
index 5e01af8162..6eba090402 100644
--- a/libavformat/tls_mbedtls.c
+++ b/libavformat/tls_mbedtls.c
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

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


[FFmpeg-cvslog] qsvenc: Add an option to disable MFE mode

2018-09-02 Thread Zhong Li
ffmpeg | branch: master | Zhong Li  | Wed May 23 18:01:32 
2018 +0800| [35ed7f93dbc72d733e454ae464b1324f38af62a0] | committer: Luca Barbato

qsvenc: Add an option to disable MFE mode

Provide proper aliases to enable/disable MFE.

The numeric values are ambiguous and misleading (e.g: user may misunderstand
setting mfmode to 1 is to enable MFE but actually it is to disable MFE, and
set it to be 5 or above is meaningless).

MFX_MF_MANUAL hasn't been exposed since it is to be implemented.

Signed-off-by: Zhong Li 
Signed-off-by: Luca Barbato 

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

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

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index ae00ff8d54..2ecdb10c5c 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -94,7 +94,9 @@ static const AVOption options[] = {
 { "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud), 
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE},
 
 #if QSV_HAVE_MF
-{ "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { 
.i64 = MFX_MF_AUTO }, 0, INT_MAX, VE },
+{ "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { 
.i64 = MFX_MF_AUTO }, MFX_MF_DEFAULT, MFX_MF_AUTO, VE, "mfmode"},
+{ "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_DISABLED }, 
INT_MIN, INT_MAX, VE, "mfmode" },
+{ "auto"   , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_AUTO }, 
INT_MIN, INT_MAX, VE, "mfmode" },
 #endif
 
 { NULL },

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


[FFmpeg-cvslog] avformat/libsrt: add payload size option

2018-09-02 Thread Sven Dueking
ffmpeg | branch: master | Sven Dueking  | Mon May 21 
13:55:25 2018 +0700| [ea8ae27a5e112d06fd5625f640e40849e6313f0c] | committer: 
Luca Barbato

avformat/libsrt: add payload size option

Signed-off-by: Sven Dueking 
Signed-off-by: Luca Barbato 

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

 doc/protocols.texi   | 11 +++
 libavformat/libsrt.c | 21 -
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index e2d06a0675..5b625e571b 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -755,6 +755,17 @@ only if @option{pbkeylen} is non-zero. It is used on
 the receiver only if the received data is encrypted.
 The configured passphrase cannot be recovered (write-only).
 
+@item payloadsize=@var{bytes}
+Sets the maximum declared size of a packet transferred
+during the single call to the sending function in Live
+mode. Use 0 if this value isn't used (which is default in
+file mode).
+Default value is for MPEG-TS; if you are going to use SRT
+to send any different kind of payload, such as, for example,
+wrapping a live stream in very small frames, then you can
+use a bigger maximum frame size, though not greater than
+1456 bytes.
+
 @item pbkeylen=@var{bytes}
 Sender encryption key length, in bytes.
 Only can be set to 0, 16, 24 and 32.
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 3e50dab64f..ec209c236d 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -34,6 +34,16 @@
 #include "os_support.h"
 #include "url.h"
 
+/* This is for MPEG-TS and it's a default SRTO_PAYLOADSIZE for SRTT_LIVE (8 TS 
packets) */
+#ifndef SRT_LIVE_DEFAULT_PAYLOAD_SIZE
+#define SRT_LIVE_DEFAULT_PAYLOAD_SIZE 1316
+#endif
+
+/* This is the maximum payload size for Live mode, should you have a different 
payload type than MPEG-TS */
+#ifndef SRT_LIVE_MAX_PAYLOAD_SIZE
+#define SRT_LIVE_MAX_PAYLOAD_SIZE 1456
+#endif
+
 enum SRTMode {
 SRT_MODE_CALLER = 0,
 SRT_MODE_LISTENER = 1,
@@ -62,6 +72,7 @@ typedef struct SRTContext {
 int tlpktdrop;
 int nakreport;
 int64_t connect_timeout;
+int payload_size;
 enum SRTMode mode;
 } SRTContext;
 
@@ -86,6 +97,9 @@ static const AVOption libsrt_options[] = {
 { "tlpktdrop",  "Enable receiver pkt drop",
 OFFSET(tlpktdrop),AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, 1, .flags = D|E },
 { "nakreport",  "Enable receiver to send periodic NAK reports",
 OFFSET(nakreport),AV_OPT_TYPE_INT,  { .i64 = -1 }, 
-1, 1, .flags = D|E },
 { "connect_timeout", "Connect timeout. Caller default: 3000, rendezvous (x 
10)",OFFSET(connect_timeout),  AV_OPT_TYPE_INT64, { .i64 = -1 }, 
-1, INT64_MAX, .flags = D|E },
+{ "payload size",   "maximum declared size of a packet transferred",   
 OFFSET(payload_size), AV_OPT_TYPE_INT,  { .i64 = 
SRT_LIVE_DEFAULT_PAYLOAD_SIZE }, -1, SRT_LIVE_MAX_PAYLOAD_SIZE, .flags = D|E },
+{ "ts_size",NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = 
SRT_LIVE_DEFAULT_PAYLOAD_SIZE }, INT_MIN, INT_MAX, .flags = D|E, "payload_size" 
},
+{ "max_size",   NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = 
SRT_LIVE_MAX_PAYLOAD_SIZE }, INT_MIN, INT_MAX, .flags = D|E, "payload_size" 
},
 { "mode",   "Connection mode (caller, listener, rendezvous)",  
 OFFSET(mode), AV_OPT_TYPE_INT,  { .i64 = 
SRT_MODE_CALLER }, SRT_MODE_CALLER, SRT_MODE_RENDEZVOUS, .flags = D|E, "mode" },
 { "caller", NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = SRT_MODE_CALLER 
}, INT_MIN, INT_MAX, .flags = D|E, "mode" },
 { "listener",   NULL, 0, AV_OPT_TYPE_CONST,  { .i64 = 
SRT_MODE_LISTENER },   INT_MIN, INT_MAX, .flags = D|E, "mode" },
@@ -276,7 +290,8 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
 (tsbpddelay >= 0 && libsrt_setsockopt(h, fd, SRTO_TSBPDDELAY, 
"SRTO_TSBPDELAY", , sizeof(tsbpddelay)) < 0) ||
 (s->tlpktdrop >= 0 && libsrt_setsockopt(h, fd, SRTO_TLPKTDROP, 
"SRTO_TLPKDROP", >tlpktdrop, sizeof(s->tlpktdrop)) < 0) ||
 (s->nakreport >= 0 && libsrt_setsockopt(h, fd, SRTO_NAKREPORT, 
"SRTO_NAKREPORT", >nakreport, sizeof(s->nakreport)) < 0) ||
-(connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, 
"SRTO_CONNTIMEO", _timeout, sizeof(connect_timeout)) <0 )) {
+(connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, 
"SRTO_CONNTIMEO", _timeout, sizeof(connect_timeout)) < 0) ||
+(s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, 
"SRTO_PAYLOADSIZE", >payload_size, sizeof(s->payload_size)) < 0)) {
 return AVERROR(EIO);
 }
 return 0;
@@ -454,6 +469,9 @@ static int libsrt_open(URLContext *h, const char *uri, int 
flags)
 if (av_find_info_tag(buf, sizeof(buf), "connect_timeout", p)) {
  

[FFmpeg-cvslog] qsvenc: use the compression_level to replace private option

2018-09-02 Thread Zhong Li
ffmpeg | branch: master | Zhong Li  | Fri Jun  8 07:00:18 
2018 +0800| [f8060865f3e1a16c62e0d337ef0979b6ee4ba457] | committer: Maxym 
Dmytrychenko

qsvenc: use the compression_level to replace private option

Use a common way to control target_usage, keeping consistent with vaapi
encoders. The private option preset is kept only for compatibility.

Signed-off-by: Zhong Li 
Signed-off-by: Maxym Dmytrychenko 

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

 libavcodec/qsvenc.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index a8b446c5bd..307ef683f9 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -461,8 +461,19 @@ static int init_video_param(AVCodecContext *avctx, 
QSVEncContext *q)
 if (avctx->level > 0)
 q->param.mfx.CodecLevel = avctx->level;
 
+if (avctx->compression_level == FF_COMPRESSION_DEFAULT) {
+avctx->compression_level = q->preset;
+} else if (avctx->compression_level >= 0) {
+if (avctx->compression_level > MFX_TARGETUSAGE_BEST_SPEED) {
+av_log(avctx, AV_LOG_WARNING, "Invalid compression level: "
+"valid range is 0-%d, using %d instead\n",
+MFX_TARGETUSAGE_BEST_SPEED, MFX_TARGETUSAGE_BEST_SPEED);
+avctx->compression_level = MFX_TARGETUSAGE_BEST_SPEED;
+}
+}
+
 q->param.mfx.CodecProfile   = q->profile;
-q->param.mfx.TargetUsage= q->preset;
+q->param.mfx.TargetUsage= avctx->compression_level;
 q->param.mfx.GopPicSize = FFMAX(0, avctx->gop_size);
 q->param.mfx.GopRefDist = FFMAX(-1, avctx->max_b_frames) + 1;
 q->param.mfx.GopOptFlag = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ?

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


[FFmpeg-cvslog] Merge commit '35ed7f93dbc72d733e454ae464b1324f38af62a0'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 19:10:49 
2018 -0300| [b4ca32414ea28ad29b4bd387c298f5a676dace2a] | committer: James Almer

Merge commit '35ed7f93dbc72d733e454ae464b1324f38af62a0'

* commit '35ed7f93dbc72d733e454ae464b1324f38af62a0':
  qsvenc: Add an option to disable MFE mode

Merged-by: James Almer 

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

 libavcodec/qsvenc_h264.c | 4 +++-
 libavcodec/version.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 7aa65e96bc..b107b87f34 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -146,7 +146,9 @@ static const AVOption options[] = {
 { "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud), 
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE},
 
 #if QSV_HAVE_MF
-{ "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { 
.i64 = MFX_MF_AUTO }, 0, INT_MAX, VE },
+{ "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { 
.i64 = MFX_MF_AUTO }, MFX_MF_DEFAULT, MFX_MF_AUTO, VE, "mfmode"},
+{ "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_DISABLED }, 
INT_MIN, INT_MAX, VE, "mfmode" },
+{ "auto"   , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_AUTO }, 
INT_MIN, INT_MAX, VE, "mfmode" },
 #endif
 
 { NULL },
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b38284a743..ce3349019c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  27
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \


==

diff --cc libavcodec/version.h
index b38284a743,36a014959e..ce3349019c
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@@ -27,9 -27,9 +27,9 @@@
  
  #include "libavutil/version.h"
  
 -#define LIBAVCODEC_VERSION_MAJOR 58
 -#define LIBAVCODEC_VERSION_MINOR  9
 -#define LIBAVCODEC_VERSION_MICRO  0
 +#define LIBAVCODEC_VERSION_MAJOR  58
 +#define LIBAVCODEC_VERSION_MINOR  27
- #define LIBAVCODEC_VERSION_MICRO 100
++#define LIBAVCODEC_VERSION_MICRO 101
  
  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
 LIBAVCODEC_VERSION_MINOR, \

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


[FFmpeg-cvslog] avcodec/indeo4: Check dimensions in decode_pic_hdr()

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Aug 26 01:58:32 2018 +0200| [7592e88bfe3d5bf9109a55acd025af9110618405] | 
committer: Michael Niedermayer

avcodec/indeo4: Check dimensions in decode_pic_hdr()

Fixes: Timeout
Fixes: 
9654/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-6289863463665664

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/indeo4.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 15ad6f8afc..4bfc6cdd74 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -30,6 +30,7 @@
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
+#include "libavutil/imgutils.h"
 #include "indeo4data.h"
 #include "internal.h"
 #include "ivi.h"
@@ -178,6 +179,13 @@ static int decode_pic_hdr(IVI45DecContext *ctx, 
AVCodecContext *avctx)
 pic_conf.chroma_bands = 0;
 if (pic_conf.luma_bands)
 pic_conf.chroma_bands = decode_plane_subdivision(>gb);
+
+if (av_image_check_size2(pic_conf.pic_width, pic_conf.pic_height, 
avctx->max_pixels, AV_PIX_FMT_YUV410P, 0, avctx) < 0) {
+av_log(avctx, AV_LOG_ERROR, "picture dimensions %d %d cannot be 
decoded\n",
+   pic_conf.pic_width, pic_conf.pic_height);
+return AVERROR_INVALIDDATA;
+}
+
 ctx->is_scalable = pic_conf.luma_bands != 1 || pic_conf.chroma_bands != 1;
 if (ctx->is_scalable && (pic_conf.luma_bands != 4 || pic_conf.chroma_bands 
!= 1)) {
 av_log(avctx, AV_LOG_ERROR, "Scalability: unsupported subdivision! 
Luma bands: %d, chroma bands: %d\n",

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


[FFmpeg-cvslog] avcodec/ffv1dec_template: do not ignore the return code of decode_line()

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Aug 26 23:09:37 2018 +0200| [c5e574a0d0f9a849fdc9e6a779f733eddc048596] | 
committer: Michael Niedermayer

avcodec/ffv1dec_template: do not ignore the return code of decode_line()

Fixes: Timeout
Fixes: 
9710/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4918894635515904

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/ffv1dec_template.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c
index f8a42a6d44..fecdbd0025 100644
--- a/libavcodec/ffv1dec_template.c
+++ b/libavcodec/ffv1dec_template.c
@@ -107,7 +107,7 @@ static av_always_inline int RENAME(decode_line)(FFV1Context 
*s, int w,
 return 0;
 }
 
-static void RENAME(decode_rgb_frame)(FFV1Context *s, uint8_t *src[4], int w, 
int h, int stride[4])
+static int RENAME(decode_rgb_frame)(FFV1Context *s, uint8_t *src[4], int w, 
int h, int stride[4])
 {
 int x, y, p;
 TYPE *sample[4][2];
@@ -127,6 +127,7 @@ static void RENAME(decode_rgb_frame)(FFV1Context *s, 
uint8_t *src[4], int w, int
 
 for (y = 0; y < h; y++) {
 for (p = 0; p < 3 + transparency; p++) {
+int ret;
 TYPE *temp = sample[p][0]; // FIXME: try a normal buffer
 
 sample[p][0] = sample[p][1];
@@ -135,9 +136,11 @@ static void RENAME(decode_rgb_frame)(FFV1Context *s, 
uint8_t *src[4], int w, int
 sample[p][1][-1]= sample[p][0][0  ];
 sample[p][0][ w]= sample[p][0][w-1];
 if (lbd && s->slice_coding_mode == 0)
-RENAME(decode_line)(s, w, sample[p], (p + 1)/2, 9);
+ret = RENAME(decode_line)(s, w, sample[p], (p + 1)/2, 9);
 else
-RENAME(decode_line)(s, w, sample[p], (p + 1)/2, bits + 
(s->slice_coding_mode != 1));
+ret = RENAME(decode_line)(s, w, sample[p], (p + 1)/2, bits + 
(s->slice_coding_mode != 1));
+if (ret < 0)
+return ret;
 }
 for (x = 0; x < w; x++) {
 int g = sample[0][1][x];
@@ -168,4 +171,5 @@ static void RENAME(decode_rgb_frame)(FFV1Context *s, 
uint8_t *src[4], int w, int
 }
 }
 }
+return 0;
 }

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


[FFmpeg-cvslog] avcodec/wmv2dec: skip frames that have only skiped MBs

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Aug 26 15:57:54 2018 +0200| [0c88a5d3eb8cd6891a52eb285b37b1458f0b4b16] | 
committer: Michael Niedermayer

avcodec/wmv2dec: skip frames that have only skiped MBs

This requires us to pre-parse the skip data, as we want to
detect this before allocating all the arrays

Fixes: Timeout
Fixes: 
9708/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5729709861109760

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/wmv2dec.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index ea0e0594b5..4f97d9227c 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -141,6 +141,21 @@ int ff_wmv2_decode_picture_header(MpegEncContext *s)
 if (s->qscale <= 0)
 return AVERROR_INVALIDDATA;
 
+if (s->pict_type != AV_PICTURE_TYPE_I && show_bits(>gb, 1)) {
+GetBitContext gb = s->gb;
+int skip_type = get_bits(, 2);
+int run = skip_type == SKIP_TYPE_COL ? s->mb_width : s->mb_height;
+
+while (run > 0) {
+int block = FFMIN(run, 25);
+if (get_bits(, block) + 1 != 1

[FFmpeg-cvslog] avcodec/h264_refs: Detect more random access points which are not marked

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Aug 14 17:12:50 2018 +0200| [b544850a524f71dba9163d7b0606767ea2572412] | 
committer: Michael Niedermayer

avcodec/h264_refs: Detect more random access points which are not marked

Fixes: nature_360-7501616eb5eafca5-.mp4

Reported-by: Thierry Foucu 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/h264_refs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 976044ce2c..26711c0d85 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -815,6 +815,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
 if (   err >= 0
 && h->long_ref_count==0
 && (   h->short_ref_count<=2
+|| pps_ref_count[0] <= 2 && pps_ref_count[1] <= 1 && 
h->avctx->has_b_frames
 || pps_ref_count[0] <= 1 + (h->picture_structure != PICT_FRAME) && 
pps_ref_count[1] <= 1)
 && pps_ref_count[0]<=2 + (h->picture_structure != PICT_FRAME) + 
(2*!h->has_recovery_point)
 && h->cur_pic_ptr->f->pict_type == AV_PICTURE_TYPE_I){

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


[FFmpeg-cvslog] avcodec/ra144: Fix undefined integer overflow in add_wav()

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Aug 26 02:26:24 2018 +0200| [93a203662f6ff1bb9fd2e966bf7df27e9bdb1916] | 
committer: Michael Niedermayer

avcodec/ra144: Fix undefined integer overflow in add_wav()

Fixes: signed integer overflow: -26884 * 91439 cannot be represented in type 
'int'
Fixes: 
9687/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-4995588121690112

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/ra144.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index cf8127c236..573703d70b 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -1516,7 +1516,7 @@ static void add_wav(int16_t *dest, int n, int skip_first, 
int *m,
 
 if (v[0]) {
 for (i=0; i < BLOCKSIZE; i++)
-dest[i] = (s1[i]*v[0] + s2[i]*v[1] + s3[i]*v[2]) >> 12;
+dest[i] = ((int)(s1[i]*(unsigned)v[0]) + s2[i]*v[1] + s3[i]*v[2]) 
>> 12;
 } else {
 for (i=0; i < BLOCKSIZE; i++)
 dest[i] = ( s2[i]*v[1] + s3[i]*v[2]) >> 12;

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


[FFmpeg-cvslog] avcodec/h264_refs: Document last if() in ff_h264_execute_ref_pic_marking()

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Aug 17 02:06:27 2018 +0200| [697984b9db4d4d199680f43ac3eb662cd1d37eff] | 
committer: Michael Niedermayer

avcodec/h264_refs: Document last if() in ff_h264_execute_ref_pic_marking()

Signed-off-by: Michael Niedermayer 

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

 libavcodec/h264_refs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 26711c0d85..eaf965e43d 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -812,6 +812,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
 }
 }
 
+// Detect unmarked random access points
 if (   err >= 0
 && h->long_ref_count==0
 && (   h->short_ref_count<=2

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


[FFmpeg-cvslog] avcodec/zmbv: remove useless zero check on dimensions

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon 
Aug 27 00:46:54 2018 +0200| [42f053494ca1188fe1b9000d4bba53375ee1dc20] | 
committer: Michael Niedermayer

avcodec/zmbv: remove useless zero check on dimensions

Signed-off-by: Michael Niedermayer 

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

 libavcodec/zmbv.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index f91d2e3931..251a72cf31 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -599,12 +599,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
 c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64);
 
 /* Allocate decompression buffer */
-if (c->decomp_size) {
-if (!(c->decomp_buf = av_mallocz(c->decomp_size))) {
-av_log(avctx, AV_LOG_ERROR,
-   "Can't allocate decompression buffer.\n");
-return AVERROR(ENOMEM);
-}
+c->decomp_buf = av_mallocz(c->decomp_size);
+if (!c->decomp_buf) {
+av_log(avctx, AV_LOG_ERROR,
+"Can't allocate decompression buffer.\n");
+return AVERROR(ENOMEM);
 }
 
 c->zstream.zalloc = Z_NULL;

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


[FFmpeg-cvslog] iavcodec/zmbv: Avoid reallocating cur/prev buffers if they are large enough

2018-09-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon 
Aug 27 00:49:00 2018 +0200| [a73579c12d665531df9765c5b75aed5e12441d94] | 
committer: Michael Niedermayer

iavcodec/zmbv: Avoid reallocating cur/prev buffers if they are large enough

Fixes: Timeout
Fixes: 
9721/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5650321660444672

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/zmbv.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 251a72cf31..b01ce1bcf6 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -57,6 +57,7 @@ typedef struct ZmbvContext {
 AVCodecContext *avctx;
 
 int bpp;
+int alloc_bpp;
 unsigned int decomp_size;
 uint8_t* decomp_buf;
 uint8_t pal[768];
@@ -494,12 +495,17 @@ static int decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame, AVPac
 return AVERROR_UNKNOWN;
 }
 
-c->cur  = av_realloc_f(c->cur, avctx->width * avctx->height,  (c->bpp 
/ 8));
-c->prev = av_realloc_f(c->prev, avctx->width * avctx->height,  (c->bpp 
/ 8));
+if (c->alloc_bpp < c->bpp) {
+c->cur  = av_realloc_f(c->cur, avctx->width * avctx->height,  
(c->bpp / 8));
+c->prev = av_realloc_f(c->prev, avctx->width * avctx->height,  
(c->bpp / 8));
+c->alloc_bpp = c->bpp;
+}
 c->bx = (c->width + c->bw - 1) / c->bw;
 c->by = (c->height+ c->bh - 1) / c->bh;
-if (!c->cur || !c->prev)
+if (!c->cur || !c->prev) {
+c->alloc_bpp = 0;
 return AVERROR(ENOMEM);
+}
 memset(c->cur, 0, avctx->width * avctx->height * (c->bpp / 8));
 memset(c->prev, 0, avctx->width * avctx->height * (c->bpp / 8));
 c->decode_intra= decode_intra;

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


[FFmpeg-cvslog] Merge commit '39f3b6f3fc2b46b405b680cce3599f1b370e342d'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 17:35:51 
2018 -0300| [ce265b0bf5d0c77a092a1f5fbeb652c7cdea5fc7] | committer: James Almer

Merge commit '39f3b6f3fc2b46b405b680cce3599f1b370e342d'

* commit '39f3b6f3fc2b46b405b680cce3599f1b370e342d':
  configure: Move add_fooflags() helper functions into canonical order

Merged-by: James Almer 

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

 configure | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index c07ca5a5df..0d6ee0abfc 100755
--- a/configure
+++ b/configure
@@ -899,14 +899,14 @@ add_cxxflags(){
 append CXXFLAGS $($cflags_filter "$@")
 }
 
-add_asflags(){
-append ASFLAGS $($asflags_filter "$@")
-}
-
 add_objcflags(){
 append OBJCFLAGS $($objcflags_filter "$@")
 }
 
+add_asflags(){
+append ASFLAGS $($asflags_filter "$@")
+}
+
 add_ldflags(){
 append LDFLAGS $($ldflags_filter "$@")
 }
@@ -919,14 +919,14 @@ add_ldsoflags(){
 append LDSOFLAGS $($ldflags_filter "$@")
 }
 
-add_stripflags(){
-append ASMSTRIPFLAGS "$@"
-}
-
 add_extralibs(){
 prepend extralibs $($ldflags_filter "$@")
 }
 
+add_stripflags(){
+append ASMSTRIPFLAGS "$@"
+}
+
 add_host_cppflags(){
 append host_cppflags "$@"
 }


==

diff --cc configure
index c07ca5a5df,20a839c1d9..0d6ee0abfc
--- a/configure
+++ b/configure
@@@ -895,14 -718,6 +895,10 @@@ add_cflags_headers()
  append CFLAGS_HEADERS $($cflags_filter "$@")
  }
  
 +add_cxxflags(){
 +append CXXFLAGS $($cflags_filter "$@")
 +}
 +
- add_asflags(){
- append ASFLAGS $($asflags_filter "$@")
- }
- 
  add_objcflags(){
  append OBJCFLAGS $($objcflags_filter "$@")
  }
@@@ -927,6 -742,10 +923,10 @@@ add_extralibs()
  prepend extralibs $($ldflags_filter "$@")
  }
  
+ add_stripflags(){
 -append STRIPFLAGS "$@"
++append ASMSTRIPFLAGS "$@"
+ }
+ 
  add_host_cppflags(){
  append host_cppflags "$@"
  }

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


[FFmpeg-cvslog] Merge commit '5cb62f9d952e24fff62737a57e89cf43d9c2333a'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 17:29:54 
2018 -0300| [ce47f1589e9f5a6cf8372a269bdd862ff0cc3f91] | committer: James Almer

Merge commit '5cb62f9d952e24fff62737a57e89cf43d9c2333a'

* commit '5cb62f9d952e24fff62737a57e89cf43d9c2333a':
  configure: Rename check_header() --> check_headers()

Merged-by: James Almer 

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

 configure | 94 +++
 1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/configure b/configure
index 7e8795ea88..0da3b580c1 100755
--- a/configure
+++ b/configure
@@ -1191,8 +1191,8 @@ check_stripflags(){
 test_stripflags "$@" && add_stripflags "$@"
 }
 
-check_header(){
-log check_header "$@"
+check_headers(){
+log check_headers "$@"
 headers=$1
 shift
 disable_sanitized $headers
@@ -1495,10 +1495,10 @@ require_cpp(){
 check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
 }
 
-require_header(){
-log require_header "$@"
+require_headers(){
+log require_headers "$@"
 headers="$1"
-check_header "$@" || die "ERROR: $headers not found"
+check_headers "$@" || die "ERROR: $headers not found"
 }
 
 require_cpp_condition(){
@@ -5154,7 +5154,7 @@ case $target_os in
 enabled x86_64 && objformat="macho64" || objformat="macho32"
 enabled_any pic shared x86_64 ||
 { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
-check_header dispatch/dispatch.h &&
+check_headers dispatch/dispatch.h &&
 add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
 if test -n "$sysroot"; then
 is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot 
$sysroot
@@ -5639,7 +5639,7 @@ elif enabled mips; then
 
 enabled mipsfpu && check_inline_asm_flags mipsfpu '"cvt.d.l $f0, $f2"' 
'-mhard-float'
 enabled mipsfpu && (enabled mips32r5 || enabled mips32r6 || enabled 
mips64r6) && check_inline_asm_flags mipsfpu '"cvt.d.l $f0, $f1"' '-mfp64'
-enabled mipsfpu && enabled msa && check_inline_asm_flags msa '"addvi.b 
$w0, $w1, 1"' '-mmsa' && check_header msa.h || disable msa
+enabled mipsfpu && enabled msa && check_inline_asm_flags msa '"addvi.b 
$w0, $w1, 1"' '-mmsa' && check_headers msa.h || disable msa
 enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb $t0, $t1, 
$t2"' '-mdsp'
 enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb $t0, 
$t1"' '-mdspr2'
 
@@ -5784,9 +5784,9 @@ if ! disabled network; then
 check_type "sys/types.h sys/socket.h" socklen_t
 
 # Prefer arpa/inet.h over winsock2
-if check_header arpa/inet.h ; then
+if check_headers arpa/inet.h ; then
 check_func closesocket
-elif check_header winsock2.h ; then
+elif check_headers winsock2.h ; then
 check_func_headers winsock2.h closesocket -lws2 &&
 network_extralibs="-lws2" ||
 { check_func_headers winsock2.h closesocket -lws2_32 &&
@@ -5874,29 +5874,29 @@ check_func_headers glob.h glob
 enabled xlib &&
 check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv 
-lX11 -lXext
 
-check_header direct.h
-check_header dirent.h
-check_header dxgidebug.h
-check_header dxva.h
-check_header dxva2api.h -D_WIN32_WINNT=0x0600
-check_header io.h
-check_header linux/perf_event.h
-check_header libcrystalhd/libcrystalhd_if.h
-check_header malloc.h
-check_header net/udplite.h
-check_header poll.h
-check_header sys/param.h
-check_header sys/resource.h
-check_header sys/select.h
-check_header sys/time.h
-check_header sys/un.h
-check_header termios.h
-check_header unistd.h
-check_header valgrind/valgrind.h
+check_headers direct.h
+check_headers dirent.h
+check_headers dxgidebug.h
+check_headers dxva.h
+check_headers dxva2api.h -D_WIN32_WINNT=0x0600
+check_headers io.h
+check_headers linux/perf_event.h
+check_headers libcrystalhd/libcrystalhd_if.h
+check_headers malloc.h
+check_headers net/udplite.h
+check_headers poll.h
+check_headers sys/param.h
+check_headers sys/resource.h
+check_headers sys/select.h
+check_headers sys/time.h
+check_headers sys/un.h
+check_headers termios.h
+check_headers unistd.h
+check_headers valgrind/valgrind.h
 check_func_headers VideoToolbox/VTCompressionSession.h 
VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
-check_header windows.h
-check_header X11/extensions/XvMClib.h
-check_header asm/types.h
+check_headers windows.h
+check_headers X11/extensions/XvMClib.h
+check_headers asm/types.h
 
 # it seems there are versions of clang in some distros that try to use the
 # gcc headers, which explodes for stdatomic
@@ -6031,14 +6031,14 @@ done
 # these are off by default, so fail if requested and not available
 enabled cuda_sdk  && require cuda_sdk cuda.h cuCtxCreate -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version 

[FFmpeg-cvslog] libavformat: add mbedTLS based TLS

2018-09-02 Thread Thomas Volkert
ffmpeg | branch: master | Thomas Volkert  | Sat 
Apr 21 15:53:31 2018 +0200| [4130e05ff496667565ff7c386a514bd46434eddf] | 
committer: Luca Barbato

libavformat: add mbedTLS based TLS

Signed-off-by: Luca Barbato 

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

 Changelog |   1 +
 configure |  13 +-
 libavformat/Makefile  |   1 +
 libavformat/rtmpdh.c  |  50 +++
 libavformat/rtmpdh.h  |   6 +
 libavformat/tls_mbedtls.c | 352 ++
 libavformat/version.h |   2 +-
 7 files changed, 422 insertions(+), 3 deletions(-)

diff --git a/Changelog b/Changelog
index 35b6c066a7..27a4d4eee3 100644
--- a/Changelog
+++ b/Changelog
@@ -24,6 +24,7 @@ version :
 - Haivision SRT protocol via libsrt
 - Dropped support for building for Windows XP. The minimum supported Windows
   version is Windows Vista.
+- support mbedTLS-based TLS
 
 
 version 12:
diff --git a/configure b/configure
index 20a839c1d9..848fe4881f 100755
--- a/configure
+++ b/configure
@@ -229,6 +229,7 @@ External library support:
   --enable-libxcb-shmX11 shm communication [auto]
   --enable-libxcb-xfixes X11 mouse rendering [auto]
   --enable-libxvid   MPEG-4 ASP video encoding
+  --enable-mbedtls   crypto
   --enable-openssl   crypto
   --enable-zlib  compression [autodetect]
 
@@ -1343,6 +1344,7 @@ EXTERNAL_LIBRARY_VERSION3_LIST="
 libopencore_amrwb
 libvo_aacenc
 libvo_amrwbenc
+mbedtls
 "
 
 EXTERNAL_LIBRARY_LIST="
@@ -2506,7 +2508,7 @@ xcbgrab_indev_suggest="libxcb_shm libxcb_xfixes"
 
 # protocols
 ffrtmpcrypt_protocol_conflict="librtmp_protocol"
-ffrtmpcrypt_protocol_deps_any="gmp openssl"
+ffrtmpcrypt_protocol_deps_any="gmp mbedtls openssl"
 ffrtmpcrypt_protocol_select="tcp_protocol"
 ffrtmphttp_protocol_conflict="librtmp_protocol"
 ffrtmphttp_protocol_select="http_protocol"
@@ -2539,7 +2541,7 @@ sctp_protocol_deps="struct_sctp_event_subscribe"
 sctp_protocol_select="network"
 srtp_protocol_select="rtp_protocol srtp"
 tcp_protocol_select="network"
-tls_protocol_deps_any="gnutls openssl"
+tls_protocol_deps_any="gnutls mbedtls openssl"
 tls_protocol_select="tcp_protocol"
 udp_protocol_select="network"
 unix_protocol_deps="sys_un_h"
@@ -2959,6 +2961,12 @@ fi
 enabled_all gnutls openssl &&
 die "GnuTLS and OpenSSL must not be enabled at the same time."
 
+enabled_all gnutls mbedtls &&
+die "GnuTLS and mbedTLS must not be enabled at the same time."
+
+enabled_all openssl mbedtls &&
+die "OpenSSL and mbedTLS must not be enabled at the same time."
+
 # Disable all the library-specific components if the library itself
 # is disabled, see AVCODEC_LIST and following _LIST variables.
 
@@ -4710,6 +4718,7 @@ enabled libx265   && require_pkg_config libx265 
x265 x265.h x265_api_get
  require_cpp_condition libx265 x265.h "X265_BUILD 
>= 57"
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode -lxavs
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
+enabled mbedtls   && require mbedtls mbedtls/ssl.h mbedtls_ssl_init 
-lmbedtls -lmbedcrypto -lmbedx509
 enabled mmal  && { check_lib mmal interface/mmal/mmal.h 
mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
{ ! enabled cross_compile &&
  add_cflags -isystem/opt/vc/include/ 
-isystem/opt/vc/include/interface/vmcs_host/linux 
-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 4f1e9bae85..ce21ecbfd9 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -408,6 +408,7 @@ OBJS-$(CONFIG_SCTP_PROTOCOL) += sctp.o
 OBJS-$(CONFIG_SRTP_PROTOCOL) += srtpproto.o srtp.o
 OBJS-$(CONFIG_TCP_PROTOCOL)  += tcp.o
 TLS-OBJS-$(CONFIG_GNUTLS)+= tls_gnutls.o
+TLS-OBJS-$(CONFIG_MBEDTLS)   += tls_mbedtls.o
 TLS-OBJS-$(CONFIG_OPENSSL)   += tls_openssl.o
 OBJS-$(CONFIG_TLS_PROTOCOL)  += tls.o $(TLS-OBJS-yes)
 OBJS-$(CONFIG_UDP_PROTOCOL)  += udp.o
diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
index 0593eac943..9f7afda046 100644
--- a/libavformat/rtmpdh.c
+++ b/libavformat/rtmpdh.c
@@ -132,6 +132,56 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, 
FFBigNum p)
 BN_CTX_free(ctx);
 return 0;
 }
+#elif CONFIG_MBEDTLS
+#define bn_new(bn)  \
+do {\
+bn = av_malloc(sizeof(*bn));\
+if (bn) \
+mbedtls_mpi_init(bn);   \
+} while (0)
+#define bn_free(bn) \
+do {\
+mbedtls_mpi_free(bn);   \
+av_free(bn);\

[FFmpeg-cvslog] configure: Move add_fooflags() helper functions into canonical order

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Sat Oct 21 
00:43:15 2017 +0200| [39f3b6f3fc2b46b405b680cce3599f1b370e342d] | committer: 
Diego Biurrun

configure: Move add_fooflags() helper functions into canonical order

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

 configure | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index f5f726f6b5..20a839c1d9 100755
--- a/configure
+++ b/configure
@@ -718,14 +718,14 @@ add_cflags_headers(){
 append CFLAGS_HEADERS $($cflags_filter "$@")
 }
 
-add_asflags(){
-append ASFLAGS $($asflags_filter "$@")
-}
-
 add_objcflags(){
 append OBJCFLAGS $($objcflags_filter "$@")
 }
 
+add_asflags(){
+append ASFLAGS $($asflags_filter "$@")
+}
+
 add_ldflags(){
 append LDFLAGS $($ldflags_filter "$@")
 }
@@ -738,14 +738,14 @@ add_ldsoflags(){
 append LDSOFLAGS $($ldflags_filter "$@")
 }
 
-add_stripflags(){
-append STRIPFLAGS "$@"
-}
-
 add_extralibs(){
 prepend extralibs $($ldflags_filter "$@")
 }
 
+add_stripflags(){
+append STRIPFLAGS "$@"
+}
+
 add_host_cppflags(){
 append host_cppflags "$@"
 }

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


[FFmpeg-cvslog] configure: Group toolchain parameter mangling functions together

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Oct 20 
21:18:51 2017 +0200| [5691c746cf62e69806aae1baf0a6e8252d519444] | committer: 
Diego Biurrun

configure: Group toolchain parameter mangling functions together

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

 configure | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/configure b/configure
index 43f45f1b83..f5f726f6b5 100755
--- a/configure
+++ b/configure
@@ -769,12 +769,32 @@ test_cmd(){
 "$@" >> $logfile 2>&1
 }
 
+cc_e(){
+eval printf '%s\\n' $CC_E
+}
+
 cc_o(){
 eval printf '%s\\n' $CC_O
 }
 
-cc_e(){
-eval printf '%s\\n' $CC_E
+as_o(){
+eval printf '%s\\n' $AS_O
+}
+
+x86asm_o(){
+eval printf '%s\\n' $X86ASM_O
+}
+
+ld_o(){
+eval printf '%s\\n' $LD_O
+}
+
+hostcc_e(){
+eval printf '%s\\n' $HOSTCC_E
+}
+
+hostcc_o(){
+eval printf '%s\\n' $HOSTCC_O
 }
 
 test_cc(){
@@ -798,10 +818,6 @@ test_cpp(){
 test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
 }
 
-as_o(){
-eval printf '%s\\n' $AS_O
-}
-
 test_as(){
 log test_as "$@"
 cat > $TMPS
@@ -809,10 +825,6 @@ test_as(){
 test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
 }
 
-x86asm_o(){
-eval printf '%s\\n' $X86ASM_O
-}
-
 test_x86asm(){
 log test_x86asm "$@"
 echo "$1" > $TMPASM
@@ -865,10 +877,6 @@ check_x86asm(){
 test_x86asm "$@" && enable $name
 }
 
-ld_o(){
-eval printf '%s\\n' $LD_O
-}
-
 test_ld(){
 log test_ld "$@"
 flags=$(filter_out '-l*' "$@")
@@ -1193,14 +1201,6 @@ require_pkg_config(){
 check_pkg_config "$@" || die "ERROR: $pkg_version not found"
 }
 
-hostcc_e(){
-eval printf '%s\\n' $HOSTCC_E
-}
-
-hostcc_o(){
-eval printf '%s\\n' $HOSTCC_O
-}
-
 test_host_cc(){
 log test_host_cc "$@"
 cat > $TMPC

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


[FFmpeg-cvslog] configure: Rename check_header() --> check_headers()

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Tue Feb 13 
09:31:57 2018 +0100| [5cb62f9d952e24fff62737a57e89cf43d9c2333a] | committer: 
Diego Biurrun

configure: Rename check_header() --> check_headers()

The plural in the name clarifies the fact that the function
can check for multiple headers at once.

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

 configure | 74 +++
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/configure b/configure
index fad0ae1e87..43f45f1b83 100755
--- a/configure
+++ b/configure
@@ -968,8 +968,8 @@ check_stripflags(){
 test_stripflags "$@" && add_stripflags "$@"
 }
 
-check_header(){
-log check_header "$@"
+check_headers(){
+log check_headers "$@"
 headers=$1
 shift
 disable_sanitized $headers
@@ -1178,7 +1178,7 @@ require_cc(){
 require_header(){
 log require_header "$@"
 headers="$1"
-check_header "$@" || die "ERROR: $headers not found"
+check_headers "$@" || die "ERROR: $headers not found"
 }
 
 require_cpp_condition(){
@@ -3942,7 +3942,7 @@ case $target_os in
 enabled x86_64 && objformat="macho64" || objformat="macho32"
 enabled_any pic shared ||
 { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
-check_header dispatch/dispatch.h &&
+check_headers dispatch/dispatch.h &&
 add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
 if test -n "$sysroot"; then
 is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot 
$sysroot
@@ -4478,9 +4478,9 @@ if ! disabled network; then
 check_type "sys/types.h sys/socket.h" socklen_t
 
 # Prefer arpa/inet.h over winsock2
-if check_header arpa/inet.h ; then
+if check_headers arpa/inet.h ; then
 check_func closesocket
-elif check_header winsock2.h ; then
+elif check_headers winsock2.h ; then
 check_func_headers winsock2.h closesocket -lws2 &&
 network_extralibs="-lws2" ||
 { check_func_headers winsock2.h closesocket -lws2_32 &&
@@ -4558,22 +4558,22 @@ check_func_headers windows.h SetConsoleTextAttribute
 check_func_headers windows.h Sleep
 check_func_headers windows.h VirtualAlloc
 
-check_header direct.h
-check_header dxgidebug.h
-check_header dxva.h
-check_header dxva2api.h
-check_header io.h
-check_header malloc.h
-check_header poll.h
-check_header sys/param.h
-check_header sys/resource.h
-check_header sys/select.h
-check_header sys/time.h
-check_header sys/un.h
-check_header unistd.h
-check_header valgrind/valgrind.h
-check_header VideoDecodeAcceleration/VDADecoder.h
-check_header windows.h
+check_headers direct.h
+check_headers dxgidebug.h
+check_headers dxva.h
+check_headers dxva2api.h
+check_headers io.h
+check_headers malloc.h
+check_headers poll.h
+check_headers sys/param.h
+check_headers sys/resource.h
+check_headers sys/select.h
+check_headers sys/time.h
+check_headers sys/un.h
+check_headers unistd.h
+check_headers valgrind/valgrind.h
+check_headers VideoDecodeAcceleration/VDADecoder.h
+check_headers windows.h
 
 # it seems there are versions of clang in some distros that try to use the
 # gcc headers, which explodes for stdatomic
@@ -4649,11 +4649,11 @@ done
 
 # these are off by default, so fail if requested and not available
 enabled amf   && require_cpp_condition amf AMF/core/Version.h 
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 
| AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
-enabled avisynth  && require_header avisynth/avisynth_c.h
-enabled avxsynth  && require_header avxsynth/avxsynth_c.h
+enabled avisynth  && require_headers avisynth/avisynth_c.h
+enabled avxsynth  && require_headers avxsynth/avxsynth_c.h
 enabled cuda  && require cuda cuda.h cuInit -lcuda
 enabled cuvid && require cuvid cuviddec.h cuvidCreateDecoder 
-lnvcuvid
-enabled frei0r&& require_header frei0r.h
+enabled frei0r&& require_headers frei0r.h
 enabled gnutls&& require_pkg_config gnutls gnutls gnutls/gnutls.h 
gnutls_global_init &&
  check_lib gmp gmp.h mpz_export -lgmp
 enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" 
aom/aom_codec.h aom_codec_version
@@ -4718,9 +4718,9 @@ enabled mmal  && { check_lib mmal 
interface/mmal/mmal.h mmal_port_co
die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h 
"MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
 enabled nvenc && require_cpp_condition nvenc nvEncodeAPI.h 
"NVENCAPI_MAJOR_VERSION >= 6"
-enabled omx   && require_header OMX_Core.h
-enabled omx_rpi   && { check_header OMX_Core.h ||
-   { ! enabled cross_compile && add_cflags 

[FFmpeg-cvslog] configure: Rename require_header() --> require_headers()

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Sun Apr  1 
22:13:55 2018 +0200| [ad5bbc408637cffd4cc2ba990abef529cf5fa6a3] | committer: 
Diego Biurrun

configure: Rename require_header() --> require_headers()

This renaming was overlooked in the previous check_header() rename.

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

 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 848fe4881f..f5e7f1578c 100755
--- a/configure
+++ b/configure
@@ -1184,8 +1184,8 @@ require_cc(){
 check_cc "$@" || die "ERROR: $name failed"
 }
 
-require_header(){
-log require_header "$@"
+require_headers(){
+log require_headers "$@"
 headers="$1"
 check_headers "$@" || die "ERROR: $headers not found"
 }

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


[FFmpeg-cvslog] Merge commit 'ad5bbc408637cffd4cc2ba990abef529cf5fa6a3'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 17:45:23 
2018 -0300| [64425e005edf3bdd77c34c078c3e74ab5ecef557] | committer: James Almer

Merge commit 'ad5bbc408637cffd4cc2ba990abef529cf5fa6a3'

* commit 'ad5bbc408637cffd4cc2ba990abef529cf5fa6a3':
  configure: Rename require_header() --> require_headers()

This commit is a noop, see ce47f1589e9f5a6cf8372a269bdd862ff0cc3f91

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit '5691c746cf62e69806aae1baf0a6e8252d519444'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 17:33:30 
2018 -0300| [9a88a47be4da9cd25a582feec7cc36790500b481] | committer: James Almer

Merge commit '5691c746cf62e69806aae1baf0a6e8252d519444'

* commit '5691c746cf62e69806aae1baf0a6e8252d519444':
  configure: Group toolchain parameter mangling functions together

Merged-by: James Almer 

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

 configure | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/configure b/configure
index 0da3b580c1..c07ca5a5df 100755
--- a/configure
+++ b/configure
@@ -955,12 +955,32 @@ test_stat(){
 stat "$1" >> $logfile 2>&1
 }
 
+cc_e(){
+eval printf '%s\\n' $CC_E
+}
+
 cc_o(){
 eval printf '%s\\n' $CC_O
 }
 
-cc_e(){
-eval printf '%s\\n' $CC_E
+as_o(){
+eval printf '%s\\n' $AS_O
+}
+
+x86asm_o(){
+eval printf '%s\\n' $X86ASM_O
+}
+
+ld_o(){
+eval printf '%s\\n' $LD_O
+}
+
+hostcc_e(){
+eval printf '%s\\n' $HOSTCC_E
+}
+
+hostcc_o(){
+eval printf '%s\\n' $HOSTCC_O
 }
 
 test_cc(){
@@ -991,10 +1011,6 @@ test_cpp(){
 test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
 }
 
-as_o(){
-eval printf '%s\\n' $AS_O
-}
-
 test_as(){
 log test_as "$@"
 cat > $TMPS
@@ -1002,10 +1018,6 @@ test_as(){
 test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
 }
 
-x86asm_o(){
-eval printf '%s\\n' $X86ASM_O
-}
-
 test_x86asm(){
 log test_x86asm "$@"
 echo "$1" > $TMPASM
@@ -1077,10 +1089,6 @@ check_x86asm(){
 test_x86asm "$@" && enable $name
 }
 
-ld_o(){
-eval printf '%s\\n' $LD_O
-}
-
 test_ld(){
 log test_ld "$@"
 type=$1
@@ -1513,14 +1521,6 @@ require_pkg_config(){
 check_pkg_config "$@" || die "ERROR: $pkg_version not found using 
pkg-config$pkg_config_fail_message"
 }
 
-hostcc_e(){
-eval printf '%s\\n' $HOSTCC_E
-}
-
-hostcc_o(){
-eval printf '%s\\n' $HOSTCC_O
-}
-
 test_host_cc(){
 log test_host_cc "$@"
 cat > $TMPC


==

diff --cc configure
index 0da3b580c1,f5f726f6b5..c07ca5a5df
--- a/configure
+++ b/configure
@@@ -950,11 -769,10 +950,15 @@@ test_cmd()
  "$@" >> $logfile 2>&1
  }
  
 +test_stat(){
 +log test_stat "$@"
 +stat "$1" >> $logfile 2>&1
 +}
 +
+ cc_e(){
+ eval printf '%s\\n' $CC_E
+ }
+ 
  cc_o(){
  eval printf '%s\\n' $CC_O
  }
@@@ -1077,20 -877,14 +1089,16 @@@ check_x86asm()
  test_x86asm "$@" && enable $name
  }
  
- ld_o(){
- eval printf '%s\\n' $LD_O
- }
- 
  test_ld(){
  log test_ld "$@"
 -flags=$(filter_out '-l*' "$@")
 -libs=$(filter '-l*' "$@")
 -test_cc $($cflags_filter $flags) || return
 +type=$1
 +shift 1
 +flags=$(filter_out '-l*|*.so' $@)
 +libs=$(filter '-l*|*.so' $@)
 +test_$type $($cflags_filter $flags) || return
  flags=$($ldflags_filter $flags)
  libs=$($ldflags_filter $libs)
 -test_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
 +test_cmd $ld $LDFLAGS $LDEXEFLAGS $flags $(ld_o $TMPE) $TMPO $libs 
$extralibs
  }
  
  check_ld(){
@@@ -1510,17 -1198,9 +1518,9 @@@ require_cpp_condition()
  require_pkg_config(){
  log require_pkg_config "$@"
  pkg_version="$2"
 -check_pkg_config "$@" || die "ERROR: $pkg_version not found"
 +check_pkg_config "$@" || die "ERROR: $pkg_version not found using 
pkg-config$pkg_config_fail_message"
  }
  
- hostcc_e(){
- eval printf '%s\\n' $HOSTCC_E
- }
- 
- hostcc_o(){
- eval printf '%s\\n' $HOSTCC_O
- }
- 
  test_host_cc(){
  log test_host_cc "$@"
  cat > $TMPC

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


[FFmpeg-cvslog] Merge commit '4130e05ff496667565ff7c386a514bd46434eddf'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 17:44:28 
2018 -0300| [26148e923613e718787c6fc4bf3f64e8909f597c] | committer: James Almer

Merge commit '4130e05ff496667565ff7c386a514bd46434eddf'

* commit '4130e05ff496667565ff7c386a514bd46434eddf':
  libavformat: add mbedTLS based TLS

This commit is a noop, see c24d247e2c2ccd13fda09fe4194bf2ff0eb42256

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 16:56:27 
2018 -0300| [73d193d1d0ff62a029a905d1404c0fd357f4c880] | committer: James Almer

Merge commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56'

* commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56':
  configure: Make require_cc() and require_cpp_condition() functions consistent

Merged-by: James Almer 

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

 configure | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 9d10912120..7e8795ea88 100755
--- a/configure
+++ b/configure
@@ -1484,8 +1484,7 @@ require(){
 require_cc(){
 log require_cc "$@"
 name="$1"
-shift
-test_code cc "$@" || die "ERROR: $name failed"
+check_cc "$@" || die "ERROR: $name failed"
 }
 
 require_cpp(){
@@ -1504,8 +1503,8 @@ require_header(){
 
 require_cpp_condition(){
 log require_cpp_condition "$@"
-condition="$2"
-test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
+condition="$3"
+check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
 }
 
 require_pkg_config(){
@@ -6161,10 +6160,10 @@ enabled libwebp   && {
 enabled libx264   && { check_pkg_config libx264 x264 "stdint.h x264.h" 
x264_encoder_encode ||
{ require libx264 "stdint.h x264.h" 
x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
  warn "using libx264 without pkg-config"; } } 
&&
- require_cpp_condition x264.h "X264_BUILD >= 118" 
&&
+ require_cpp_condition libx264 x264.h "X264_BUILD 
>= 118" &&
  check_cpp_condition libx262 x264.h "X264_MPEG2"
 enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get &&
- require_cpp_condition x265.h "X265_BUILD >= 68"
+ require_cpp_condition libx265 x265.h "X265_BUILD 
>= 68"
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
 enabled libzimg   && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h 
zimg_get_api_version


==

diff --cc configure
index 9d10912120,fad0ae1e87..7e8795ea88
--- a/configure
+++ b/configure
@@@ -1484,18 -1172,9 +1484,17 @@@ require()
  require_cc(){
  log require_cc "$@"
  name="$1"
- shift
- test_code cc "$@" || die "ERROR: $name failed"
+ check_cc "$@" || die "ERROR: $name failed"
  }
  
 +require_cpp(){
 +name="$1"
 +headers="$2"
 +classes="$3"
 +shift 3
 +check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
 +}
 +
  require_header(){
  log require_header "$@"
  headers="$1"
@@@ -1504,8 -1183,8 +1503,8 @@@
  
  require_cpp_condition(){
  log require_cpp_condition "$@"
--condition="$2"
- test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
++condition="$3"
+ check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
  }
  
  require_pkg_config(){
@@@ -6025,159 -4647,69 +6024,159 @@@ for func in $MATH_FUNCS; d
  eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs
  done
  
 +for func in $COMPLEX_FUNCS; do
 +eval check_complexfunc $func \${${func}_args:-1}
 +done
 +
  # these are off by default, so fail if requested and not available
 -enabled amf   && require_cpp_condition amf AMF/core/Version.h 
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 
| AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
 -enabled avisynth  && require_header avisynth/avisynth_c.h
 -enabled avxsynth  && require_header avxsynth/avxsynth_c.h
 -enabled cuda  && require cuda cuda.h cuInit -lcuda
 -enabled cuvid && require cuvid cuviddec.h cuvidCreateDecoder 
-lnvcuvid
 +enabled cuda_sdk  && require cuda_sdk cuda.h cuCtxCreate -lcuda
 +enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
 +enabled decklink  && { require_header DeckLinkAPI.h &&
 +   { test_cpp_condition DeckLinkAPIVersion.h 
"BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API 
version must be >= 10.6.1."; } }
 +enabled libndi_newtek && require_header Processing.NDI.Lib.h
  enabled frei0r&& require_header frei0r.h
 -enabled gnutls&& require_pkg_config gnutls gnutls gnutls/gnutls.h 
gnutls_global_init &&
 - check_lib gmp gmp.h mpz_export -lgmp
 -enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" 
aom/aom_codec.h aom_codec_version
 +enabled gmp   && require gmp gmp.h 

[FFmpeg-cvslog] Merge commit '347aa8f72356124ec6b95bf8ebd1faf72db03f8d'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 16:39:52 
2018 -0300| [fef55251d82ca1043689dddf5d03aa96c75cd4bb] | committer: James Almer

Merge commit '347aa8f72356124ec6b95bf8ebd1faf72db03f8d'

* commit '347aa8f72356124ec6b95bf8ebd1faf72db03f8d':
  x86: Don't declare a non-static function as inline

This commit is a noop

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit '78149d6657302b58d5e46e8bc0a521ed009f86f7'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 16:42:57 
2018 -0300| [4069096dd535ee99175c2a29c1a1f59c3fc110c1] | committer: James Almer

Merge commit '78149d6657302b58d5e46e8bc0a521ed009f86f7'

* commit '78149d6657302b58d5e46e8bc0a521ed009f86f7':
  amfenc: Retain a reference to D3D frames used as input during the encoding 
process

This commit is a noop, see 05f1a3face140373ae658ab1abd6bacc841a770d

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] random_seed: use bcrypt instead of the old wincrypt API

2018-09-02 Thread Steve Lhomme
ffmpeg | branch: master | Steve Lhomme  | Tue Apr  3 11:44:25 
2018 +0200| [abf806f7f1601c7e54de7f863bbb816af144a88c] | committer: Martin 
Storsjö

random_seed: use bcrypt instead of the old wincrypt API

Remove the wincrypt API calls since we don't support XP anymore and
bcrypt is available since Vista, even on Windows Store builds.

Signed-off-by: Martin Storsjö 

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

 configure   |  7 ---
 libavutil/random_seed.c | 19 ++-
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index 3c7b6a0981..465fdcfb6d 100755
--- a/configure
+++ b/configure
@@ -1703,12 +1703,12 @@ SYSTEM_FUNCS="
 "
 
 SYSTEM_LIBRARIES="
+bcrypt
 sdl
 vaapi_1
 vaapi_drm
 vaapi_x11
 vdpau_x11
-wincrypt
 "
 
 TOOLCHAIN_FEATURES="
@@ -2610,7 +2610,7 @@ avdevice_extralibs="libm_extralibs"
 avformat_extralibs="libm_extralibs"
 avfilter_extralibs="pthreads_extralibs libm_extralibs"
 avresample_extralibs="libm_extralibs"
-avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs 
d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs 
pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs 
vaapi_x11_extralibs vdpau_x11_extralibs wincrypt_extralibs"
+avutil_extralibs="bcrypt_extralibs clock_gettime_extralibs cuda_extralibs 
cuvid_extralibs d3d11va_extralibs libm_extralibs libmfx_extralibs 
nanosleep_extralibs pthreads_extralibs user32_extralibs vaapi_extralibs 
vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
 swscale_extralibs="libm_extralibs"
 
 # programs
@@ -4579,9 +4579,10 @@ check_header windows.h
 # so we also check that atomics actually work here
 check_builtin stdatomic stdatomic.h "atomic_int foo; atomic_store(, 0)"
 
+check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom  -lbcrypt &&
+check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
 check_lib ole32"windows.h"CoTaskMemFree-lole32
 check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
-check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom   -ladvapi32
 check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi
 
 check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c
index 089d883916..388cb401ba 100644
--- a/libavutil/random_seed.c
+++ b/libavutil/random_seed.c
@@ -23,9 +23,9 @@
 #if HAVE_UNISTD_H
 #include 
 #endif
-#if HAVE_WINCRYPT
+#if HAVE_BCRYPT
 #include 
-#include 
+#include 
 #endif
 #include 
 #include 
@@ -96,13 +96,14 @@ uint32_t av_get_random_seed(void)
 {
 uint32_t seed;
 
-#if HAVE_WINCRYPT
-HCRYPTPROV provider;
-if (CryptAcquireContext(, NULL, NULL, PROV_RSA_FULL,
-CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
-BOOL ret = CryptGenRandom(provider, sizeof(seed), (PBYTE) );
-CryptReleaseContext(provider, 0);
-if (ret)
+#if HAVE_BCRYPT
+BCRYPT_ALG_HANDLE algo_handle;
+NTSTATUS ret = BCryptOpenAlgorithmProvider(_handle, 
BCRYPT_RNG_ALGORITHM,
+   MS_PRIMITIVE_PROVIDER, 0);
+if (BCRYPT_SUCCESS(ret)) {
+NTSTATUS ret = BCryptGenRandom(algo_handle, (UCHAR*), 
sizeof(seed), 0);
+BCryptCloseAlgorithmProvider(algo_handle, 0);
+if (BCRYPT_SUCCESS(ret))
 return seed;
 }
 #endif

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


[FFmpeg-cvslog] amfenc: Retain a reference to D3D frames used as input during the encoding process

2018-09-02 Thread Alexander Kravchenko
ffmpeg | branch: master | Alexander Kravchenko  | Thu 
Apr 12 18:41:35 2018 +0300| [78149d6657302b58d5e46e8bc0a521ed009f86f7] | 
committer: Luca Barbato

amfenc: Retain a reference to D3D frames used as input during the encoding 
process

This fixes frame corruption issue when decoder started reusing frames
while they are still in use of encoding process

Issue with frame corruption  was reproduced using:

avconv.exe -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.h264 
-an -c:v h264_amf output.mkv

It is recommended to use -extra_hw_frames 16 option in case if hw frames
number in pool is not enough

Signed-off-by: Luca Barbato 

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

 libavcodec/amfenc.c | 95 -
 libavcodec/amfenc.h |  3 ++
 2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
index 74b020b4d8..9a60050bc7 100644
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -162,6 +162,9 @@ static int amf_init_context(AVCodecContext *avctx)
 AmfContext *ctx = avctx->priv_data;
 AMF_RESULT  res = AMF_OK;
 
+ctx->hwsurfaces_in_queue = 0;
+ctx->hwsurfaces_in_queue_max = 16;
+
 // configure AMF logger
 // the return of these functions indicates old state and do not affect 
behaviour
 ctx->trace->pVtbl->EnableWriter(ctx->trace, AMF_TRACE_WRITER_DEBUG_OUTPUT, 
ctx->log_to_dbg != 0 );
@@ -192,6 +195,8 @@ static int amf_init_context(AVCodecContext *avctx)
 if (!ctx->hw_frames_ctx) {
 return AVERROR(ENOMEM);
 }
+if (device_ctx->initial_pool_size > 0)
+ctx->hwsurfaces_in_queue_max = 
device_ctx->initial_pool_size - 1;
 } else {
 if(res == AMF_NOT_SUPPORTED)
 av_log(avctx, AV_LOG_INFO, "avctx->hw_frames_ctx 
has D3D11 device which doesn't have D3D11VA interface, switching to default\n");
@@ -447,6 +452,75 @@ int ff_amf_encode_init(AVCodecContext *avctx)
 return ret;
 }
 
+static AMF_RESULT amf_set_property_buffer(AMFSurface *object, const wchar_t 
*name, AMFBuffer *val)
+{
+AMF_RESULT res;
+AMFVariantStruct var;
+res = AMFVariantInit();
+if (res == AMF_OK) {
+AMFGuid guid_AMFInterface = IID_AMFInterface();
+AMFInterface *amf_interface;
+res = val->pVtbl->QueryInterface(val, _AMFInterface, 
(void**)_interface);
+
+if (res == AMF_OK) {
+res = AMFVariantAssignInterface(, amf_interface);
+amf_interface->pVtbl->Release(amf_interface);
+}
+if (res == AMF_OK) {
+res = object->pVtbl->SetProperty(object, name, var);
+}
+AMFVariantClear();
+}
+return res;
+}
+
+static AMF_RESULT amf_get_property_buffer(AMFData *object, const wchar_t 
*name, AMFBuffer **val)
+{
+AMF_RESULT res;
+AMFVariantStruct var;
+res = AMFVariantInit();
+if (res == AMF_OK) {
+res = object->pVtbl->GetProperty(object, name, );
+if (res == AMF_OK) {
+if (var.type == AMF_VARIANT_INTERFACE) {
+AMFGuid guid_AMFBuffer = IID_AMFBuffer();
+AMFInterface *amf_interface = AMFVariantInterface();
+res = amf_interface->pVtbl->QueryInterface(amf_interface, 
_AMFBuffer, (void**)val);
+} else {
+res = AMF_INVALID_DATA_TYPE;
+}
+}
+AMFVariantClear();
+}
+return res;
+}
+
+static AMFBuffer *amf_create_buffer_with_frame_ref(const AVFrame *frame, 
AMFContext *context)
+{
+AVFrame *frame_ref;
+AMFBuffer *frame_ref_storage_buffer = NULL;
+AMF_RESULT res;
+
+res = context->pVtbl->AllocBuffer(context, AMF_MEMORY_HOST, 
sizeof(frame_ref), _ref_storage_buffer);
+if (res == AMF_OK) {
+frame_ref = av_frame_clone(frame);
+if (frame_ref) {
+
memcpy(frame_ref_storage_buffer->pVtbl->GetNative(frame_ref_storage_buffer), 
_ref, sizeof(frame_ref));
+} else {
+frame_ref_storage_buffer->pVtbl->Release(frame_ref_storage_buffer);
+frame_ref_storage_buffer = NULL;
+}
+}
+return frame_ref_storage_buffer;
+}
+
+static void amf_release_buffer_with_frame_ref(AMFBuffer 
*frame_ref_storage_buffer)
+{
+AVFrame *av_frame_ref;
+memcpy(_frame_ref, 
frame_ref_storage_buffer->pVtbl->GetNative(frame_ref_storage_buffer), 
sizeof(av_frame_ref));
+av_frame_free(_frame_ref);
+frame_ref_storage_buffer->pVtbl->Release(frame_ref_storage_buffer);
+}
 
 int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame)
 {
@@ -488,6 +562,8 @@ int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame 
*frame)
 (ctx->hw_device_ctx && 
((AVHWFramesContext*)frame->hw_frames_ctx->data)->device_ctx ==
  

[FFmpeg-cvslog] configure: Make require_cc() and require_cpp_condition() functions consistent

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Mar 28 
09:11:17 2018 +0200| [25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56] | committer: 
Diego Biurrun

configure: Make require_cc() and require_cpp_condition() functions consistent

Their API and implementation is different from other require_foo() functions,
which violates the rule of least astonishment.

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

 configure | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 1be3dfc9f1..fad0ae1e87 100755
--- a/configure
+++ b/configure
@@ -1172,8 +1172,7 @@ require(){
 require_cc(){
 log require_cc "$@"
 name="$1"
-shift
-test_code cc "$@" || die "ERROR: $name failed"
+check_cc "$@" || die "ERROR: $name failed"
 }
 
 require_header(){
@@ -1185,7 +1184,7 @@ require_header(){
 require_cpp_condition(){
 log require_cpp_condition "$@"
 condition="$2"
-test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
+check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
 }
 
 require_pkg_config(){
@@ -4649,7 +4648,7 @@ for func in $MATH_FUNCS; do
 done
 
 # these are off by default, so fail if requested and not available
-enabled amf   && require_cpp_condition AMF/core/Version.h 
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 
| AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
+enabled amf   && require_cpp_condition amf AMF/core/Version.h 
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 
| AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
 enabled avisynth  && require_header avisynth/avisynth_c.h
 enabled avxsynth  && require_header avxsynth/avxsynth_c.h
 enabled cuda  && require cuda cuda.h cuInit -lcuda
@@ -4705,10 +4704,10 @@ enabled libvpx&& require_pkg_config libvpx 
"vpx >= 1.3.0" vpx/vpx_co
 enabled libwavpack&& require libwavpack wavpack/wavpack.h 
WavpackOpenFileOutput  -lwavpack
 enabled libwebp   && require_pkg_config libwebp libwebp webp/encode.h 
WebPGetEncoderVersion
 enabled libx264   && require_pkg_config libx264 x264 "stdint.h x264.h" 
x264_encoder_encode &&
- require_cpp_condition x264.h "X264_BUILD >= 118" 
&&
+ require_cpp_condition libx264 x264.h "X264_BUILD 
>= 118" &&
  check_cpp_condition libx262 x264.h "X264_MPEG2"
 enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get &&
- require_cpp_condition x265.h "X265_BUILD >= 57"
+ require_cpp_condition libx265 x265.h "X265_BUILD 
>= 57"
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode -lxavs
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
 enabled mmal  && { check_lib mmal interface/mmal/mmal.h 
mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
@@ -4718,7 +4717,7 @@ enabled mmal  && { check_lib mmal 
interface/mmal/mmal.h mmal_port_co
  check_lib mmal interface/mmal/mmal.h 
mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h 
"MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
-enabled nvenc && require_cpp_condition nvEncodeAPI.h 
"NVENCAPI_MAJOR_VERSION >= 6"
+enabled nvenc && require_cpp_condition nvenc nvEncodeAPI.h 
"NVENCAPI_MAJOR_VERSION >= 6"
 enabled omx   && require_header OMX_Core.h
 enabled omx_rpi   && { check_header OMX_Core.h ||
{ ! enabled cross_compile && add_cflags 
-isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||

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


[FFmpeg-cvslog] Merge commit 'abf806f7f1601c7e54de7f863bbb816af144a88c'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 16:41:34 
2018 -0300| [22219a3ac46ac18f797c94e4619a34728556786c] | committer: James Almer

Merge commit 'abf806f7f1601c7e54de7f863bbb816af144a88c'

* commit 'abf806f7f1601c7e54de7f863bbb816af144a88c':
  random_seed: use bcrypt instead of the old wincrypt API

This commit is a noop, see aedbf1640ced8fc09dc980ead2a387a59d8f7f68

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] x86: Don't declare a non-static function as inline

2018-09-02 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Sat Apr 14 
13:37:03 2018 +0300| [347aa8f72356124ec6b95bf8ebd1faf72db03f8d] | committer: 
Martin Storsjö

x86: Don't declare a non-static function as inline

This fixes building with clang in msvc mode, which does support
gcc style inline assembly.

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

 libavcodec/x86/xvididct_sse2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/x86/xvididct_sse2.c b/libavcodec/x86/xvididct_sse2.c
index f318e95999..0de59a5514 100644
--- a/libavcodec/x86/xvididct_sse2.c
+++ b/libavcodec/x86/xvididct_sse2.c
@@ -342,7 +342,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
 "movdqa   %%xmm6, 4*16("dct") \n\t" \
 "movdqa   "SREG2", 7*16("dct")\n\t"
 
-inline void ff_xvid_idct_sse2(short *block)
+void ff_xvid_idct_sse2(short *block)
 {
 __asm__ volatile (
 "movq "MANGLE (m127) ", %%mm0  \n\t"

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


[FFmpeg-cvslog] Merge commit '23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a'

2018-09-02 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Sep  2 16:50:45 
2018 -0300| [41cd5af3250ef976f0a48adeb6dbccc9b2683e58] | committer: James Almer

Merge commit '23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a'

* commit '23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a':
  build: Group external library protocols separately

Merged-by: James Almer 

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

 configure| 22 --
 libavformat/Makefile | 20 +++-
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/configure b/configure
index d2df05fa55..9d10912120 100755
--- a/configure
+++ b/configure
@@ -3288,18 +3288,8 @@ httpproxy_protocol_suggest="zlib"
 https_protocol_select="tls_protocol"
 https_protocol_suggest="zlib"
 icecast_protocol_select="http_protocol"
-librtmp_protocol_deps="librtmp"
-librtmpe_protocol_deps="librtmp"
-librtmps_protocol_deps="librtmp"
-librtmpt_protocol_deps="librtmp"
-librtmpte_protocol_deps="librtmp"
-libsmbclient_protocol_deps="libsmbclient gplv3"
-libssh_protocol_deps="libssh"
-libtls_conflict="openssl gnutls mbedtls"
 mmsh_protocol_select="http_protocol"
 mmst_protocol_select="network"
-libsrt_protocol_deps="libsrt"
-libsrt_protocol_select="network"
 rtmp_protocol_conflict="librtmp_protocol"
 rtmp_protocol_select="tcp_protocol"
 rtmp_protocol_suggest="zlib"
@@ -3328,6 +3318,18 @@ udplite_protocol_select="network"
 unix_protocol_deps="sys_un_h"
 unix_protocol_select="network"
 
+# external library protocols
+librtmp_protocol_deps="librtmp"
+librtmpe_protocol_deps="librtmp"
+librtmps_protocol_deps="librtmp"
+librtmpt_protocol_deps="librtmp"
+librtmpte_protocol_deps="librtmp"
+libsmbclient_protocol_deps="libsmbclient gplv3"
+libsrt_protocol_deps="libsrt"
+libsrt_protocol_select="network"
+libssh_protocol_deps="libssh"
+libtls_conflict="openssl gnutls mbedtls"
+
 # filters
 afftfilt_filter_deps="avcodec"
 afftfilt_filter_select="fft"
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 2f08457eec..608f7f1f85 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -557,20 +557,12 @@ OBJS-$(CONFIG_YOP_DEMUXER)   += yop.o
 OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)  += yuv4mpegdec.o
 OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)+= yuv4mpegenc.o
 
-# external libraries
+# external library muxers/demuxers
 OBJS-$(CONFIG_AVISYNTH_DEMUXER)  += avisynth.o
 OBJS-$(CONFIG_CHROMAPRINT_MUXER) += chromaprint.o
 OBJS-$(CONFIG_LIBGME_DEMUXER)+= libgme.o
 OBJS-$(CONFIG_LIBMODPLUG_DEMUXER)+= libmodplug.o
 OBJS-$(CONFIG_LIBOPENMPT_DEMUXER)+= libopenmpt.o
-OBJS-$(CONFIG_LIBRTMP_PROTOCOL)  += librtmp.o
-OBJS-$(CONFIG_LIBRTMPE_PROTOCOL) += librtmp.o
-OBJS-$(CONFIG_LIBRTMPS_PROTOCOL) += librtmp.o
-OBJS-$(CONFIG_LIBRTMPT_PROTOCOL) += librtmp.o
-OBJS-$(CONFIG_LIBRTMPTE_PROTOCOL)+= librtmp.o
-OBJS-$(CONFIG_LIBSRT_PROTOCOL)   += libsrt.o
-OBJS-$(CONFIG_LIBSSH_PROTOCOL)   += libssh.o
-OBJS-$(CONFIG_LIBSMBCLIENT_PROTOCOL) += libsmbclient.o
 OBJS-$(CONFIG_VAPOURSYNTH_DEMUXER)   += vapoursynth.o
 
 # protocols I/O
@@ -619,6 +611,16 @@ OBJS-$(CONFIG_UDP_PROTOCOL)  += udp.o
 OBJS-$(CONFIG_UDPLITE_PROTOCOL)  += udp.o
 OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o
 
+# external library protocols
+OBJS-$(CONFIG_LIBRTMP_PROTOCOL)  += librtmp.o
+OBJS-$(CONFIG_LIBRTMPE_PROTOCOL) += librtmp.o
+OBJS-$(CONFIG_LIBRTMPS_PROTOCOL) += librtmp.o
+OBJS-$(CONFIG_LIBRTMPT_PROTOCOL) += librtmp.o
+OBJS-$(CONFIG_LIBRTMPTE_PROTOCOL)+= librtmp.o
+OBJS-$(CONFIG_LIBSMBCLIENT_PROTOCOL) += libsmbclient.o
+OBJS-$(CONFIG_LIBSRT_PROTOCOL)   += libsrt.o
+OBJS-$(CONFIG_LIBSSH_PROTOCOL)   += libssh.o
+
 # libavdevice dependencies
 OBJS-$(CONFIG_IEC61883_INDEV)+= dv.o
 


==

diff --cc configure
index d2df05fa55,1be3dfc9f1..9d10912120
--- a/configure
+++ b/configure
@@@ -3328,34 -2546,21 +3318,46 @@@ udplite_protocol_select="network
  unix_protocol_deps="sys_un_h"
  unix_protocol_select="network"
  
+ # external library protocols
+ librtmp_protocol_deps="librtmp"
+ librtmpe_protocol_deps="librtmp"
+ librtmps_protocol_deps="librtmp"
+ librtmpt_protocol_deps="librtmp"
+ librtmpte_protocol_deps="librtmp"
++libsmbclient_protocol_deps="libsmbclient gplv3"
+ libsrt_protocol_deps="libsrt"
+ libsrt_protocol_select="network"
++libssh_protocol_deps="libssh"
++libtls_conflict="openssl gnutls mbedtls"
+ 
  # filters
 -asyncts_filter_deps="avresample"
 +afftfilt_filter_deps="avcodec"
 +afftfilt_filter_select="fft"
 +afir_filter_deps="avcodec"
 +afir_filter_select="fft"
 +amovie_filter_deps="avcodec avformat"
 +aresample_filter_deps="swresample"
 +ass_filter_deps="libass"
 +atempo_filter_deps="avcodec"
 +atempo_filter_select="rdft"
 +avgblur_opencl_filter_deps="opencl"
 

[FFmpeg-cvslog] build: Group external library protocols separately

2018-09-02 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Thu Mar 22 
14:57:53 2018 +0100| [23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a] | committer: 
Diego Biurrun

build: Group external library protocols separately

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

 configure| 16 +---
 libavformat/Makefile |  6 +++---
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index 465fdcfb6d..1be3dfc9f1 100755
--- a/configure
+++ b/configure
@@ -2519,15 +2519,8 @@ httpproxy_protocol_suggest="zlib"
 https_protocol_select="tls_protocol"
 https_protocol_suggest="zlib"
 icecast_protocol_select="http_protocol"
-librtmp_protocol_deps="librtmp"
-librtmpe_protocol_deps="librtmp"
-librtmps_protocol_deps="librtmp"
-librtmpt_protocol_deps="librtmp"
-librtmpte_protocol_deps="librtmp"
 mmsh_protocol_select="http_protocol"
 mmst_protocol_select="network"
-libsrt_protocol_deps="libsrt"
-libsrt_protocol_select="network"
 rtmp_protocol_conflict="librtmp_protocol"
 rtmp_protocol_select="tcp_protocol"
 rtmp_protocol_suggest="zlib"
@@ -2553,6 +2546,15 @@ udp_protocol_select="network"
 unix_protocol_deps="sys_un_h"
 unix_protocol_select="network"
 
+# external library protocols
+librtmp_protocol_deps="librtmp"
+librtmpe_protocol_deps="librtmp"
+librtmps_protocol_deps="librtmp"
+librtmpt_protocol_deps="librtmp"
+librtmpte_protocol_deps="librtmp"
+libsrt_protocol_deps="libsrt"
+libsrt_protocol_select="network"
+
 # filters
 asyncts_filter_deps="avresample"
 blackframe_filter_deps="gpl"
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 96085d20c6..4f1e9bae85 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -377,9 +377,8 @@ OBJS-$(CONFIG_YOP_DEMUXER)   += yop.o
 OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)  += yuv4mpegdec.o
 OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)+= yuv4mpegenc.o
 
-# external libraries
+# external library muxers/demuxers
 OBJS-$(CONFIG_AVISYNTH_DEMUXER)  += avisynth.o
-OBJS-$(CONFIG_LIBRTMP)   += librtmp.o
 
 # protocols I/O
 OBJS-$(CONFIG_APPLEHTTP_PROTOCOL)+= hlsproto.o
@@ -414,7 +413,8 @@ OBJS-$(CONFIG_TLS_PROTOCOL)  += tls.o 
$(TLS-OBJS-yes)
 OBJS-$(CONFIG_UDP_PROTOCOL)  += udp.o
 OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o
 
-# external libraries
+# external library protocols
+OBJS-$(CONFIG_LIBRTMP)   += librtmp.o
 OBJS-$(CONFIG_LIBSRT_PROTOCOL)   += libsrt.o
 
 SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h

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


[FFmpeg-cvslog] lavf/libsmbclient: return AVERROR_EOF for EOF.

2018-09-02 Thread Nicolas George
ffmpeg | branch: release/4.0 | Nicolas George  | Thu Aug 30 
14:42:00 2018 +0200| [2be51cbeea352ea5fdfd3a4751f1960ba522174d] | committer: 
Nicolas George

lavf/libsmbclient: return AVERROR_EOF for EOF.

Fix trac ticket #7387.

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

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

diff --git a/libavformat/libsmbclient.c b/libavformat/libsmbclient.c
index b68cd8bd79..3285868957 100644
--- a/libavformat/libsmbclient.c
+++ b/libavformat/libsmbclient.c
@@ -166,7 +166,7 @@ static int libsmbc_read(URLContext *h, unsigned char *buf, 
int size)
 return ret;
 }
 
-return bytes_read;
+return bytes_read ? bytes_read : AVERROR_EOF;
 }
 
 static int libsmbc_write(URLContext *h, const unsigned char *buf, int size)

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


[FFmpeg-cvslog] lavf/libsmbclient: return AVERROR_EOF for EOF.

2018-09-02 Thread Nicolas George
ffmpeg | branch: master | Nicolas George  | Thu Aug 30 
14:42:00 2018 +0200| [b09a092edd55ab6185db4f29cf96aa5ab85484fe] | committer: 
Nicolas George

lavf/libsmbclient: return AVERROR_EOF for EOF.

Fix trac ticket #7387.

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

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

diff --git a/libavformat/libsmbclient.c b/libavformat/libsmbclient.c
index b68cd8bd79..3285868957 100644
--- a/libavformat/libsmbclient.c
+++ b/libavformat/libsmbclient.c
@@ -166,7 +166,7 @@ static int libsmbc_read(URLContext *h, unsigned char *buf, 
int size)
 return ret;
 }
 
-return bytes_read;
+return bytes_read ? bytes_read : AVERROR_EOF;
 }
 
 static int libsmbc_write(URLContext *h, const unsigned char *buf, int size)

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