[FFmpeg-devel] [PATCH] libavformat/dashdec: Avoid multiple HTTP requests for initialization segment that is common among all representations

2018-04-09 Thread sanilraut
Hi,

The following patch avoid multiple HTTP requests for initialization segment 
that is common among all representations.

---
 libavformat/dashdec.c | 96 ---
 1 file changed, 83 insertions(+), 13 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 8bfde4d..4d0445f 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -149,6 +149,11 @@ typedef struct DASHContext {
 char *allowed_extensions;
 AVDictionary *avio_opts;
 int max_url_size;
+
+/* Flags for init section*/
+int is_init_section_common_video;
+int is_init_section_common_audio;
+
 } DASHContext;
 
 static int ishttp(char *url)
@@ -416,9 +421,9 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, 
const char *url,
 if (av_strstart(proto_name, "file", NULL)) {
 if (strcmp(c->allowed_extensions, "ALL") && !av_match_ext(url, 
c->allowed_extensions)) {
 av_log(s, AV_LOG_ERROR,
-"Filename extension of \'%s\' is not a common multimedia 
extension, blocked for security reasons.\n"
-"If you wish to override this adjust allowed_extensions, you 
can set it to \'ALL\' to allow all\n",
-url);
+   "Filename extension of \'%s\' is not a common multimedia 
extension, blocked for security reasons.\n"
+   "If you wish to override this adjust allowed_extensions, 
you can set it to \'ALL\' to allow all\n",
+   url);
 return AVERROR_INVALIDDATA;
 }
 } else if (av_strstart(proto_name, "http", NULL)) {
@@ -931,7 +936,7 @@ static int parse_manifest_representation(AVFormatContext 
*s, const char *url,
 rep->last_seq_no =(int64_t) strtoll(val, NULL, 10) - 1;
 xmlFree(val);
 }
- }
+}
 }
 
 fragment_timeline_node = 
find_child_node_by_name(representation_segmenttemplate_node, "SegmentTimeline");
@@ -1160,7 +1165,7 @@ static int parse_manifest(AVFormatContext *s, const char 
*url, AVIOContext *in)
 } else {
 LIBXML_TEST_VERSION
 
-doc = xmlReadMemory(buffer, filesize, c->base_url, NULL, 0);
+doc = xmlReadMemory(buffer, filesize, c->base_url, NULL, 0);
 root_element = xmlDocGetRootElement(doc);
 node = root_element;
 
@@ -1396,14 +1401,14 @@ static int refresh_manifest(AVFormatContext *s)
 
 if (c->n_videos != n_videos) {
 av_log(c, AV_LOG_ERROR,
-"new manifest has mismatched no. of video representations, %d -> 
%d\n",
-n_videos, c->n_videos);
+   "new manifest has mismatched no. of video representations, %d 
-> %d\n",
+   n_videos, c->n_videos);
 return AVERROR_INVALIDDATA;
 }
 if (c->n_audios != n_audios) {
 av_log(c, AV_LOG_ERROR,
-"new manifest has mismatched no. of audio representations, %d -> 
%d\n",
-n_audios, c->n_audios);
+   "new manifest has mismatched no. of audio representations, %d 
-> %d\n",
+   n_audios, c->n_audios);
 return AVERROR_INVALIDDATA;
 }
 
@@ -1862,6 +1867,45 @@ fail:
 return ret;
 }
 
+static int init_section_compare_video(DASHContext *c)
+{
+int i = 0;
+char *url = c->videos[0]->init_section->url;
+int64_t url_offset = c->videos[0]->init_section->url_offset;
+int64_t size = c->videos[0]->init_section->size;
+for (i=0;in_videos;i++) {
+if (av_strcasecmp(c->videos[i]->init_section->url,url) || 
c->videos[i]->init_section->url_offset != url_offset || 
c->videos[i]->init_section->size != size) {
+return 0;
+}
+}
+return 1;
+}
+
+static int init_section_compare_audio(DASHContext *c)
+{
+int i = 0;
+char *url = c->audios[0]->init_section->url;
+int64_t url_offset = c->audios[0]->init_section->url_offset;
+int64_t size = c->audios[0]->init_section->size;
+for (i=0;in_audios;i++) {
+if (av_strcasecmp(c->audios[i]->init_section->url,url) || 
c->audios[i]->init_section->url_offset != url_offset || 
c->audios[i]->init_section->size != size) {
+return 0;
+}
+}
+return 1;
+}
+
+static void copy_init_section(struct representation *rep_dest, struct 
representation *rep_src)
+{
+memcpy(rep_dest->init_section, rep_src->init_section, 
sizeof(rep_src->init_section));
+rep_dest->init_sec_buf = av_mallocz(rep_src->init_sec_buf_size);
+memcpy(rep_dest->init_sec_buf, rep_src->init_sec_buf, 
rep_src->init_sec_data_len);
+rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size;
+rep_dest->init_sec_data_len = rep_src->init_sec_data_len;
+rep_dest->cur_timestamp = rep_src->cur_timestamp;
+}
+
+
 static int dash_read_header(AVFormatContext *s)
 {
 void *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb;
@@ -1890,19 +1934,45 @@ static int dash_read_header(AVFormat

Re: [FFmpeg-devel] [PATCH] libavformat/aac: Parse all ID3 tags present between ADTS frames

2018-04-09 Thread Mattias Amnefelt

On 2018-04-05 01:00, Mattias Amnefelt wrote:

On 2018-04-04 09:22, Mattias Amnefelt wrote:

On 2018-04-04 03:42, James Almer wrote:

On 4/3/2018 10:40 PM, Carl Eugen Hoyos wrote:

2018-04-04 3:38 GMT+02:00, James Almer :

On 4/3/2018 10:33 PM, Carl Eugen Hoyos wrote:

The "-f aac" looks like a bad idea to me.
It's also true for the tests above, but that's still not reason to
add more.

Please avoid top-posting here, Carl Eugen

At least in one of them it was added because the sample had too few
frames and probing was detecting it with a score of 1, which 
seemed too

fragile.

I believe that it is good to have a sample that is detected with
a small score as part of fate.

Carl Eugen

When i asked it was suggested to just force the demuxer. I have no
opinion one way or another, so feel free to change it.
I have to admit I just copy-n-pasted the test above. I just 
double-checked and all the id3 tag tests pass without -f aac now. I'm 
not sure if anything has changed since the test was added or not. Do 
you want a patch which removes it for all of them?




Here's an updated version of the patch without -f aac

/mattiasa


Did anyone have any options on the updated patch?

/mattiasa

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


Re: [FFmpeg-devel] swscale/unscaled : Remove MMXext version of shufflebyte2103 and uyvyto422

2018-04-09 Thread Martin Vignali
>
> also IIRC all the really old SIMD code has been benchmarked when it was
> written in real use cases,
>

Ok, patch dropped.

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


[FFmpeg-devel] [PATCH] doc/filters: correct range for length in astats filter

2018-04-09 Thread Gyan Doshi
From 349c34686fefeb2c1c3909c8feab481375962111 Mon Sep 17 00:00:00 2001
From: Gyan Doshi 
Date: Mon, 9 Apr 2018 14:28:06 +0530
Subject: [PATCH] doc/filters: correct range for length in astats filter

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

diff --git a/doc/filters.texi b/doc/filters.texi
index 4438386f64..b78e05a329 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1750,7 +1750,7 @@ It accepts the following option:
 @table @option
 @item length
 Short window length in seconds, used for peak and trough RMS measurement.
-Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0.1 - 10]}.
+Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0.01 - 10]}.
 
 @item metadata
 
-- 
2.12.2.windows.2
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavformat/dashdec: Avoid multiple HTTP requests for initialization segment that is common among all representations

2018-04-09 Thread Steven Liu


> On 9 Apr 2018, at 15:02, sanilraut  wrote:
> 
> Hi,
> 
> The following patch avoid multiple HTTP requests for initialization segment 
> that is common among all representations.
> 
> ---
> libavformat/dashdec.c | 96 ---
> 1 file changed, 83 insertions(+), 13 deletions(-)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 8bfde4d..4d0445f 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -149,6 +149,11 @@ typedef struct DASHContext {
> char *allowed_extensions;
> AVDictionary *avio_opts;
> int max_url_size;
> +
> +/* Flags for init section*/
> +int is_init_section_common_video;
> +int is_init_section_common_audio;
> +
> } DASHContext;
> 
> static int ishttp(char *url)
> @@ -416,9 +421,9 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, 
> const char *url,
> if (av_strstart(proto_name, "file", NULL)) {
> if (strcmp(c->allowed_extensions, "ALL") && !av_match_ext(url, 
> c->allowed_extensions)) {
> av_log(s, AV_LOG_ERROR,
> -"Filename extension of \'%s\' is not a common multimedia 
> extension, blocked for security reasons.\n"
> -"If you wish to override this adjust allowed_extensions, you 
> can set it to \'ALL\' to allow all\n",
> -url);
> +   "Filename extension of \'%s\' is not a common multimedia 
> extension, blocked for security reasons.\n"
> +   "If you wish to override this adjust allowed_extensions, 
> you can set it to \'ALL\' to allow all\n",
> +   url);
> return AVERROR_INVALIDDATA;
> }
> } else if (av_strstart(proto_name, "http", NULL)) {
> @@ -931,7 +936,7 @@ static int parse_manifest_representation(AVFormatContext 
> *s, const char *url,
> rep->last_seq_no =(int64_t) strtoll(val, NULL, 10) - 
> 1;
> xmlFree(val);
> }
> - }
> +}
> }
> 
> fragment_timeline_node = 
> find_child_node_by_name(representation_segmenttemplate_node, 
> "SegmentTimeline");
> @@ -1160,7 +1165,7 @@ static int parse_manifest(AVFormatContext *s, const 
> char *url, AVIOContext *in)
> } else {
> LIBXML_TEST_VERSION
> 
> -doc = xmlReadMemory(buffer, filesize, c->base_url, NULL, 0);
> +doc = xmlReadMemory(buffer, filesize, c->base_url, NULL, 0);
> root_element = xmlDocGetRootElement(doc);
> node = root_element;
> 
> @@ -1396,14 +1401,14 @@ static int refresh_manifest(AVFormatContext *s)
> 
> if (c->n_videos != n_videos) {
> av_log(c, AV_LOG_ERROR,
> -"new manifest has mismatched no. of video representations, %d -> 
> %d\n",
> -n_videos, c->n_videos);
> +   "new manifest has mismatched no. of video representations, %d 
> -> %d\n",
> +   n_videos, c->n_videos);
> return AVERROR_INVALIDDATA;
> }
> if (c->n_audios != n_audios) {
> av_log(c, AV_LOG_ERROR,
> -"new manifest has mismatched no. of audio representations, %d -> 
> %d\n",
> -n_audios, c->n_audios);
> +   "new manifest has mismatched no. of audio representations, %d 
> -> %d\n",
> +   n_audios, c->n_audios);
> return AVERROR_INVALIDDATA;
> }
> 
> @@ -1862,6 +1867,45 @@ fail:
> return ret;
> }
> 
> +static int init_section_compare_video(DASHContext *c)
> +{
> +int i = 0;
> +char *url = c->videos[0]->init_section->url;
> +int64_t url_offset = c->videos[0]->init_section->url_offset;
> +int64_t size = c->videos[0]->init_section->size;
> +for (i=0;in_videos;i++) {
> +if (av_strcasecmp(c->videos[i]->init_section->url,url) || 
> c->videos[i]->init_section->url_offset != url_offset || 
> c->videos[i]->init_section->size != size) {
> +return 0;
> +}
> +}
> +return 1;
> +}
> +
> +static int init_section_compare_audio(DASHContext *c)
> +{
> +int i = 0;
> +char *url = c->audios[0]->init_section->url;
> +int64_t url_offset = c->audios[0]->init_section->url_offset;
> +int64_t size = c->audios[0]->init_section->size;
> +for (i=0;in_audios;i++) {
> +if (av_strcasecmp(c->audios[i]->init_section->url,url) || 
> c->audios[i]->init_section->url_offset != url_offset || 
> c->audios[i]->init_section->size != size) {
> +return 0;
> +}
> +}
> +return 1;
> +}
> +
> +static void copy_init_section(struct representation *rep_dest, struct 
> representation *rep_src)
> +{
> +memcpy(rep_dest->init_section, rep_src->init_section, 
> sizeof(rep_src->init_section));
> +rep_dest->init_sec_buf = av_mallocz(rep_src->init_sec_buf_size);
> +memcpy(rep_dest->init_sec_buf, rep_src->init_sec_buf, 
> rep_src->init_sec_data_len);
> +rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size;
> +rep_dest->in

Re: [FFmpeg-devel] [PATCH] [RFC]doc/examples: alternative input handler

2018-04-09 Thread Bodecs Bela



2018.04.08. 23:57 keltezéssel, Michael Niedermayer írta:

On Sun, Apr 08, 2018 at 05:27:56PM +0200, Bodecs Bela wrote:


2018.04.06. 0:39 keltezéssel, Michael Niedermayer írta:

On Fri, Mar 30, 2018 at 02:47:25PM +0200, Bodecs Bela wrote:

Hi All,

regularly, on different forums and mailing lists a requirement popups for a
feature to automatically failover switching between main input and a
secondary input in case of main input unavailability.

The base motivation: let's say you have a unreliable live stream source and
you
want to transcode its video and audio streams in realtime but you
want to survive the ocasions when the source is unavailable. So use a
secondary live source but the transition should occur seamlessly without
breaking/re-starting the transcoding processs.

Some days ago there was a discussion on devel-irc about this topic and we
concluded that this feature is not feasible inside ffmpeg without "hacking",
but a separate client app could do this.

So I created this example app to handle two separate input sources and
switching realtime between them. I am not sure wheter it should be inside
the tools subdir.

The detailed description is available in the header section of the source
file.

I will appretiate your suggestions about it.

Thank you in advance.

best,

Bela Bodecs


  configure|2
  doc/examples/Makefile|1
  doc/examples/Makefile.example|1
  doc/examples/alternative_input.c | 1233 
+++

You may want to add yourself to MAINTAINERS, so it is not unmaintained

ok
I have checked the MAINAINERS file but curretly there is no Examples 
section, I have created it.

I think this is complex enough that it needs a maintainer


May I take your response as you agree to inlcude this as an example app?

iam fine with either






[...]


+static int open_single_input(int input_index)
+{
+int ret, i;
+AVInputFormat *input_format = NULL;
+AVDictionary * input_options = NULL;
+AVFormatContext * input_fmt_ctx = NULL;
+
+if (app_ctx.input_format_names[input_index]) {
+if (!(input_format = 
av_find_input_format(app_ctx.input_format_names[input_index]))) {
+timed_log(AV_LOG_ERROR, "Input #%d Unknown input format: '%s'\n", 
input_index,
+  app_ctx.input_format_names[input_index]);
+return EINVAL;
+}
+}
+
+av_dict_set(&input_options, "rw_timeout", "200", 0);
+av_dict_set(&input_options, "timeout", "2000", 0);
+if ((app_ctx.input_fmt_ctx[input_index] = avformat_alloc_context()) < 0)
+return AVERROR(ENOMEM);

i guess this was intended to be "!= NULL"

yes, I will fix it

also you are mixing EINVAL with AVERROR(ENOMEM) these arent compatible.
Either all should be AVERROR or none

ok, should I will modify EIVAL all of them to AVERROR(EINVAL)?

yes

thx

[...]



Here is an updated version.

bb


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


From 7f23ad48dac2901b4eb1e7b40a90d716d5d54733 Mon Sep 17 00:00:00 2001
From: Bela Bodecs 
Date: Fri, 30 Mar 2018 14:30:25 +0200
Subject: [PATCH] [RFC]doc/examples: alternative input handler

API utility for automatic failover switching between main input and
secondary input in case of input unavailability.
Motivation: let's say you have a unreliable live stream source and you
want totranscode its first video and audio stream in realtime but you
want to survive the ocasions when the source is unavailable. So use a
secondary live source but the transition should occur seamlessly without
breaking/re-starting the transcoding processs.


Signed-off-by: Bela Bodecs 
---
 MAINTAINERS  |2 +-
 configure|2 +
 doc/examples/Makefile|1 +
 doc/examples/Makefile.example|1 +
 doc/examples/alternative_input.c | 1340 ++
 5 files changed, 1345 insertions(+), 1 deletion(-)
 create mode 100644 doc/examples/alternative_input.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 3c54ad6..f411d56 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -45,7 +45,7 @@ presets Robert Swain
 metadata subsystem  Aurelien Jacobs
 release management  Michael Niedermayer
 API tests   Ludmila Glinskih
-
+examplesBéla Bödecs
 
 Communication
 =
diff --git a/configure b/configure
index 0c5ed07..5585c60 100755
--- a/configure
+++ b/configure
@@ -1529,6 +1529,7 @@ EXAMPLE_LIST="
 transcoding_example
 vaapi_encode_example
 vaapi_transcode_example
+alternative_input_example
 "
 
 EXTERNAL_AUTODETECT_LIBRARY_LIST="
@@ -3337,6 +3338,7 @@ transcode_aac_example_deps="avcodec avformat swresample"
 transcoding_example_deps="avfilter avcodec avformat avutil"
 vaapi_e

[FFmpeg-devel] backport request: AV_PKT_FLAG_DISPOSABLE

2018-04-09 Thread Dominik 'Rathann' Mierzejewski
Hello,
could someone backport these commits:
00d454ed2ca3f8b4d454a837e95931afe604c53f
79a744768aa6f498e4f46fca4ff01cd04eade9a5
to 3.4 and 3.3 branches?

Regards,
Dominik
-- 
Fedora   https://getfedora.org  |  RPMFusion   http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] backport request: AV_PKT_FLAG_DISPOSABLE

2018-04-09 Thread Carl Eugen Hoyos
2018-04-09 14:25 GMT+02:00, Dominik 'Rathann' Mierzejewski
:
> Hello,
> could someone backport these commits:
> 00d454ed2ca3f8b4d454a837e95931afe604c53f
> 79a744768aa6f498e4f46fca4ff01cd04eade9a5
> to 3.4 and 3.3 branches?

This is an API change, we try not to backport
such changes.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] GSOC 2018 qualification task.

2018-04-09 Thread Michael Niedermayer
Hi

On Mon, Apr 09, 2018 at 08:29:21AM +0530, ANURAG SINGH IIT BHU wrote:
> This mail is regarding the qualification task assigned to me for the
> GSOC project
> in FFmpeg for automatic real-time subtitle generation using speech to text
> translation ML model. My assigned task by Michael sir was writing a
> ffmpeg-libavfilter filter which outputs a "Hello World minute: sec"
> subtitle each second.

Yes
the exact task was to have the filter produce subtitle frames/packets and
then have these pass through the filter chain and into ffmpeg.
so that a subsequent filter could render them into the video or
ffmpeg store it in a file,
This would have required extending libavfilter to pass subtitles through
at least enough for this specific use case.

The time for this qualification task was very short as you contacted me rather
late.


> 
> I have built a libavfilter filter named "hellosubs" using the existing
> subtitle filter. hellosubs filter accepts a video file as input, along with
> any subtitle file of any supported subtitle format of FFmpeg with any
> number of enteries(>0), any entries i.e any random subtitle file, as an
> argument and writes "Hello World minute: sec" subtitle each second on the
> video.

yes, i understand that given the limited time that was as much as could be
implemented.
Ill review this patch below


>  Makefile   |1 
>  allfilters.c   |1 
>  vf_hellosubs.c |  463 
> +
>  3 files changed, 465 insertions(+)
> 73061db543833e745b2accee67d9cca3870c1996  
> 0001-avfilter-add-hellosub-filter.patch
> From 38fcf8c80f71a4186f03f33c9272b707390add67 Mon Sep 17 00:00:00 2001
> From: ddosvulnerability 
> Date: Fri, 6 Apr 2018 11:30:17 +0530
> Subject: [PATCH] avfilter: add hellosub filter.
> 
> ---
>  
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   1 +
>  libavfilter/vf_hellosubs.c | 463 
> +
>  3 files changed, 465 insertions(+)
>  create mode 100644 libavfilter/vf_hellosubs.c
> 
> 
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index a90ca30..770b1b5 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -331,6 +331,7 @@ OBJS-$(CONFIG_SSIM_FILTER)   += vf_ssim.o 
> framesync.o
>  OBJS-$(CONFIG_STEREO3D_FILTER)   += vf_stereo3d.o
>  OBJS-$(CONFIG_STREAMSELECT_FILTER)   += f_streamselect.o framesync.o
>  OBJS-$(CONFIG_SUBTITLES_FILTER)  += vf_subtitles.o
> +OBJS-$(CONFIG_HELLOSUBS_FILTER)  += vf_hellosubs.o
>  OBJS-$(CONFIG_SUPER2XSAI_FILTER) += vf_super2xsai.o
>  OBJS-$(CONFIG_SWAPRECT_FILTER)   += vf_swaprect.o
>  OBJS-$(CONFIG_SWAPUV_FILTER) += vf_swapuv.o
> diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
> index 6eac828..a008908 100644
> --- a/libavfilter/allfilters.c
> +++ b/libavfilter/allfilters.c
> @@ -322,6 +322,7 @@ extern AVFilter ff_vf_ssim;
>  extern AVFilter ff_vf_stereo3d;
>  extern AVFilter ff_vf_streamselect;
>  extern AVFilter ff_vf_subtitles;
> +extern AVFilter ff_vf_hellosubs;
>  extern AVFilter ff_vf_super2xsai;
>  extern AVFilter ff_vf_swaprect;
>  extern AVFilter ff_vf_swapuv;
> diff --git a/libavfilter/vf_hellosubs.c b/libavfilter/vf_hellosubs.c
> new file mode 100644
> index 000..7ba3a0e
> --- /dev/null
> +++ b/libavfilter/vf_hellosubs.c
> @@ -0,0 +1,463 @@
> +/*
> + * Copyright (c) 2011 Baptiste Coudurier
> + * Copyright (c) 2011 Stefano Sabatini
> + * Copyright (c) 2012 Clément Bœsch
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +/**
> + * @file
> + * Libass hellosubs burning filter.
> + *

> + * @see{http://www.matroska.org/technical/specs/hellosubs/ssa.html}

this looks like a search and replace error, this link does not work anymore


> + */
> +
> +#include 
> +
> +#include "config.h"
> +#if CONFIG_SUBTITLES_FILTER
> +# include "libavcodec/avcodec.h"
> +# include "libavformat/avformat.h"
> +#endif
> +#include "libavutil/avstring.h"
> +#include "libavutil/imgutils.h"
> +#include "libavutil/opt.h"
> +#include "libavutil/parseutils.h"
> +#include "drawutils.h"
> +#include "avfilter.h"
> +#include "internal.h"
> +#include "format

Re: [FFmpeg-devel] [PATCH] configure: disable direct stripping in OpenBSD

2018-04-09 Thread Derek Buitenhuis
On 4/7/2018 10:58 PM, James Almer wrote:
> It appears strip -o creates new files without preserving permissions
> from the source binary, resulting in non executable files.

This sounds like something the OpenBSD people should be informed of, no?

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


Re: [FFmpeg-devel] [PATCH] configure: disable direct stripping in OpenBSD

2018-04-09 Thread James Almer
On 4/9/2018 11:15 AM, Derek Buitenhuis wrote:
> On 4/7/2018 10:58 PM, James Almer wrote:
>> It appears strip -o creates new files without preserving permissions
>> from the source binary, resulting in non executable files.
> 
> This sounds like something the OpenBSD people should be informed of, no?
> 
> - Derek

Maybe they already know and it was fixed at some point, seeing the
OpenBSD fate client we have has software from 2007 (gcc 4.2, and safe to
assume equally outdated binutils).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: disable direct stripping in OpenBSD

2018-04-09 Thread Derek Buitenhuis
On 4/9/2018 3:32 PM, James Almer wrote:
> Maybe they already know and it was fixed at some point, seeing the
> OpenBSD fate client we have has software from 2007 (gcc 4.2, and safe to
> assume equally outdated binutils).

OpenBSD doesn't update their toolchain AFAIK, but maintains their own forks,
so probably still useful.

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


Re: [FFmpeg-devel] [PATCH] lavc/amfenc: Retain a reference to D3D frames used as input during the encoding process

2018-04-09 Thread Alexander Kravchenko
Hi, could you please review updated patch?

Fixes according on Mark's review:
* Macroses changed to functions
* error level of AMF_RETURN_IF_FALSE changed to fatal (all cases it returns are 
fatal according on fatal error level description)
* used AMF_RETURN_IF_FALSE for case if a frame reference has been completely 
lost (was just warning before)

Hopefully this patch is ok enough to be applied :).
FYI, near time I am going to send the following patches 
* cosmetic fixes
* hwcontext_amf (to be reused in encoder and color space converter)
* AMF colors space converter (input memory types: opencl, dx9, dx11, host; 
output memory types: opencl, dx9, dx11)


---
 libavcodec/amfenc.c | 94 -
 libavcodec/amfenc.h |  5 ++-
 2 files changed, 97 insertions(+), 2 deletions(-)

diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
index 89a10ff253..ea2c5acbbf 100644
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -157,6 +157,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 );
@@ -187,6 +190,7 @@ static int amf_init_context(AVCodecContext *avctx)
 if (!ctx->hw_frames_ctx) {
 return AVERROR(ENOMEM);
 }
+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");
@@ -443,6 +447,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(&var);
+if (res == AMF_OK) {
+AMFGuid guid_AMFInterface = IID_AMFInterface();
+AMFInterface *amf_interface;
+res = val->pVtbl->QueryInterface(val, &guid_AMFInterface, 
(void**)&amf_interface);
+
+if (res == AMF_OK) {
+res = AMFVariantAssignInterface(&var, amf_interface);
+amf_interface->pVtbl->Release(amf_interface);
+}
+if (res == AMF_OK) {
+res = object->pVtbl->SetProperty(object, name, var);
+}
+AMFVariantClear(&var);
+}
+return res;
+}
+
+static AMF_RESULT amf_get_property_buffer(AMFData *object, const wchar_t 
*name, AMFBuffer **val)
+{
+AMF_RESULT res;
+AMFVariantStruct var;
+res = AMFVariantInit(&var);
+if (res == AMF_OK) {
+res = object->pVtbl->GetProperty(object, name, &var);
+if (res == AMF_OK) {
+if (var.type == AMF_VARIANT_INTERFACE) {
+AMFGuid guid_AMFBuffer = IID_AMFBuffer();
+AMFInterface *amf_interface = AMFVariantInterface(&var);
+res = amf_interface->pVtbl->QueryInterface(amf_interface, 
&guid_AMFBuffer, (void**)val);
+} else {
+res = AMF_INVALID_DATA_TYPE;
+}
+}
+AMFVariantClear(&var);
+}
+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), &frame_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), 
&frame_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(&av_frame_ref, 
frame_ref_storage_buffer->pVtbl->GetNative(frame_ref_storage_buffer), 
sizeof(av_frame_ref));
+av_frame_free(&av_frame_ref);
+frame_ref_storage_buffer->pVtbl->Release(frame_ref_storage_buffer);
+} 
 
 int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame)
 {
@@ -484,6 +557,8 @@ int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame 
*frame)
 (ctx->hw_device_ctx && 
((AVHWFramesContext*)frame->hw_frames_ctx->data)->device_ctx ==
 (AVHWDeviceContext*)ctx->hw_device_ctx->data)
 )) {
+AMFBuffer *frame_ref

Re: [FFmpeg-devel] [PATCH] avformat/rawenc: check stream type

2018-04-09 Thread Gyan Doshi


On 4/6/2018 8:34 PM, Gyan Doshi wrote:


On 4/5/2018 12:09 AM, Michael Niedermayer wrote:


This does not work
breaks fate-unknown_layout-ac3

also the tests mayb too strict, there are similar codec_ids like mpeg1/2
or jpeg variants which are all basically the same from a muxers point 
of view


Revised patch passes FATE. Set looser conditions for mpeg-1/2/4 and jpeg 
muxer.


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


Re: [FFmpeg-devel] GSOC 2018 qualification task.

2018-04-09 Thread Rostislav Pehlivanov
On 9 April 2018 at 03:59, ANURAG SINGH IIT BHU <
anurag.singh.ph...@iitbhu.ac.in> wrote:

> This mail is regarding the qualification task assigned to me for the
> GSOC project
> in FFmpeg for automatic real-time subtitle generation using speech to text
> translation ML model.
>

i really don't think lavfi is the correct place for such code, nor that the
project's repo should contain such code at all.
This would need to be in another repo and a separate library.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] GSOC 2018 qualification task.

2018-04-09 Thread Paul B Mahol
On 4/9/18, Rostislav Pehlivanov  wrote:
> On 9 April 2018 at 03:59, ANURAG SINGH IIT BHU <
> anurag.singh.ph...@iitbhu.ac.in> wrote:
>
>> This mail is regarding the qualification task assigned to me for the
>> GSOC project
>> in FFmpeg for automatic real-time subtitle generation using speech to text
>> translation ML model.
>>
>
> i really don't think lavfi is the correct place for such code, nor that the
> project's repo should contain such code at all.
> This would need to be in another repo and a separate library.

Why? Are you against ocr filter too?

This is necessarey for A->S filter, once subtitles are supported by lavfi.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] lavc/cbs: Add tests for VP9

2018-04-09 Thread James Almer
On 4/8/2018 2:48 PM, Mark Thompson wrote:
> Uses the same mechanism as other codecs - conformance test files are
> passed through the metadata filter (which, with no options, reads the
> input and writes it back) and the output verified to match the input.
> ---
>  tests/fate/cbs.mak | 34 
> ++
>  tests/ref/fate/cbs-vp9-vp90-2-03-deltaq|  1 +
>  tests/ref/fate/cbs-vp9-vp90-2-05-resize|  1 +
>  tests/ref/fate/cbs-vp9-vp90-2-06-bilinear  |  1 +
>  tests/ref/fate/cbs-vp9-vp90-2-09-lf_deltas |  1 +
>  .../ref/fate/cbs-vp9-vp90-2-10-show-existing-frame |  1 +
>  .../fate/cbs-vp9-vp90-2-10-show-existing-frame2|  1 +
>  .../ref/fate/cbs-vp9-vp90-2-segmentation-aq-akiyo  |  1 +
>  .../ref/fate/cbs-vp9-vp90-2-segmentation-sf-akiyo  |  1 +
>  tests/ref/fate/cbs-vp9-vp90-2-tiling-pedestrian|  1 +
>  tests/ref/fate/cbs-vp9-vp91-2-04-yuv422|  1 +
>  tests/ref/fate/cbs-vp9-vp91-2-04-yuv444|  1 +
>  tests/ref/fate/cbs-vp9-vp92-2-20-10bit-yuv420  |  1 +
>  tests/ref/fate/cbs-vp9-vp93-2-20-10bit-yuv422  |  1 +
>  tests/ref/fate/cbs-vp9-vp93-2-20-12bit-yuv444  |  1 +
>  15 files changed, 43 insertions(+), 5 deletions(-)
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-03-deltaq
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-05-resize
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-06-bilinear
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-09-lf_deltas
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-10-show-existing-frame
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-10-show-existing-frame2
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-segmentation-aq-akiyo
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-segmentation-sf-akiyo
>  create mode 100644 tests/ref/fate/cbs-vp9-vp90-2-tiling-pedestrian
>  create mode 100644 tests/ref/fate/cbs-vp9-vp91-2-04-yuv422
>  create mode 100644 tests/ref/fate/cbs-vp9-vp91-2-04-yuv444
>  create mode 100644 tests/ref/fate/cbs-vp9-vp92-2-20-10bit-yuv420
>  create mode 100644 tests/ref/fate/cbs-vp9-vp93-2-20-10bit-yuv422
>  create mode 100644 tests/ref/fate/cbs-vp9-vp93-2-20-12bit-yuv444

I'd say add at least one yuv440p test.

LGTM either way.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] lavc: Add coded bitstream read/write support for VP9

2018-04-09 Thread James Almer
On 4/8/2018 2:48 PM, Mark Thompson wrote:
> ---
>  configure|   2 +
>  libavcodec/Makefile  |   1 +
>  libavcodec/cbs.c |   6 +
>  libavcodec/cbs_internal.h|   1 +
>  libavcodec/cbs_vp9.c | 666 
> +++
>  libavcodec/cbs_vp9.h | 171 +
>  libavcodec/cbs_vp9_syntax_template.c | 388 
>  7 files changed, 1235 insertions(+)
>  create mode 100644 libavcodec/cbs_vp9.c
>  create mode 100644 libavcodec/cbs_vp9.h
>  create mode 100644 libavcodec/cbs_vp9_syntax_template.c

[...]

> diff --git a/libavcodec/cbs_vp9.h b/libavcodec/cbs_vp9.h
> new file mode 100644
> index 00..a678f7f478
> --- /dev/null
> +++ b/libavcodec/cbs_vp9.h
> @@ -0,0 +1,171 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#ifndef AVCODEC_CBS_VP9_H
> +#define AVCODEC_CBS_VP9_H
> +
> +#include 
> +#include 
> +
> +#include "cbs.h"
> +
> +
> +enum {
> +VP9_MAX_SEGMENTS = 8,
> +VP9_SEG_LVL_MAX  = 4,
> +VP9_MIN_TILE_WIDTH_B64 = 4,
> +VP9_MAX_TILE_WIDTH_B64 = 64,
> +
> +VP9_FRAME_SYNC_0 = 0x49,
> +VP9_FRAME_SYNC_1 = 0x83,
> +VP9_FRAME_SYNC_2 = 0x42,
> +
> +VP9_SUPERFRAME_MARKER = 6,
> +};
> +
> +enum {
> +VP9_CS_UNKNOWN   = 0,
> +VP9_CS_BT_601= 1,
> +VP9_CS_BT_709= 2,
> +VP9_CS_SMPTE_170 = 3,
> +VP9_CS_SMPTE_240 = 4,
> +VP9_CS_BT_2020   = 5,
> +VP9_CS_RESERVED  = 6,
> +VP9_CS_RGB   = 7,
> +};

Ideally, standard codec defines like this would be in a header used by
the decoder and de/muxers as well. Think {h264,hevc}.h {h264,hevc}_ps.h,
{h264,hevc}_sei.h. Only the stuff below is cbs implementation specific.
It's a nit in any case, no need to change that before committing this.

No comments about the bitstream parsing code since i don't know it well
enough.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself to the general developers list

2018-04-09 Thread Michael Niedermayer
On Tue, Apr 03, 2018 at 07:24:21AM +0800, Jun Zhao wrote:
> Want to close work with this community, so I request as
> a general developer.

>  MAINTAINERS |1 +
>  1 file changed, 1 insertion(+)
> b874d130cf4de51accf7045a90a9487cc5c8c492  
> 0001-MAINTAINERS-add-myself-to-the-general-developers-lis.patch
> From 4a21d75db2070031986d92cde45d3c1ea64f0cfa Mon Sep 17 00:00:00 2001
> From: Jun Zhao 
> Date: Tue, 3 Apr 2018 07:14:46 +0800
> Subject: [PATCH] MAINTAINERS: add myself to the general developers list
> 
> Signed-off-by: Jun Zhao 
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3c54ad6781..5c7bf4726f 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -552,6 +552,7 @@ Ivan Uskov
>  James Darnley
>  Jan Ekström
>  Joakim Plate
> +Jun Zhao
>  Kieran Kunhya
>  Kirill Gavrilov
>  Martin Storsjö

will apply

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] Sega FILM: set dts and duration when demuxing

2018-04-09 Thread Kyle Swanson
Hi,

On Sun, Apr 8, 2018 at 6:27 PM,  wrote:

> From: Misty De Meo 
>
> ---
>  libavformat/segafilm.c | 19 +++
>  1 file changed, 19 insertions(+)
>
> diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
> index 4c0cca0140..e72c26b144 100644
> --- a/libavformat/segafilm.c
> +++ b/libavformat/segafilm.c
> @@ -270,6 +270,8 @@ static int film_read_packet(AVFormatContext *s,
>  FilmDemuxContext *film = s->priv_data;
>  AVIOContext *pb = s->pb;
>  film_sample *sample;
> +film_sample *next_sample = NULL;
> +int next_sample_id;
>  int ret = 0;
>
>  if (film->current_sample >= film->sample_count)
> @@ -277,6 +279,20 @@ static int film_read_packet(AVFormatContext *s,
>
>  sample = &film->sample_table[film->current_sample];
>
> +/* Find the next sample from the same stream, assuming there is one;
> + * this is used to calculate the duration below */
> +next_sample_id = film->current_sample + 1;
> +while (next_sample == NULL) {
> +if (next_sample_id >= film->sample_count)
> +break;
> +
> +next_sample = &film->sample_table[next_sample_id];
> +if (next_sample->stream != sample->stream) {
> +next_sample = NULL;
> +next_sample_id++;
> +}
> +}
> +
>  /* position the stream (will probably be there anyway) */
>  avio_seek(pb, sample->sample_offset, SEEK_SET);
>
> @@ -285,8 +301,11 @@ static int film_read_packet(AVFormatContext *s,
>  ret = AVERROR(EIO);
>
>  pkt->stream_index = sample->stream;
> +pkt->dts = sample->pts;
>  pkt->pts = sample->pts;
>  pkt->flags |= sample->keyframe ? AV_PKT_FLAG_KEY : 0;
> +if (next_sample != NULL)
> +pkt->duration = next_sample->pts - sample->pts;
>
>  film->current_sample++;
>
> --
> 2.17.0
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavf/segafilmenc: Do not mix variable declaration and code.

2018-04-09 Thread Kyle Swanson
On Mon, Apr 9, 2018 at 3:50 PM, Carl Eugen Hoyos  wrote:

> ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Apr
> 10 00:50:01 2018 +0200| [4d1d7263d8ff32e67710b41f24fe485818c87211] |
> committer: Carl Eugen Hoyos
>
> lavf/segafilmenc: Do not mix variable declaration and code.
>
> Fixes two warnings: ISO C90 forbids mixed declarations and code
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=
> 4d1d7263d8ff32e67710b41f24fe485818c87211
> ---
>
>  libavformat/segafilmenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c
> index 86c0ab0d1c..5b0d7e69e8 100644
> --- a/libavformat/segafilmenc.c
> +++ b/libavformat/segafilmenc.c
> @@ -121,12 +121,12 @@ static int film_write_packet(AVFormatContext
> *format_context, AVPacket *pkt)
>  if (encoded_buf_size != pkt->size && (pkt->size %
> encoded_buf_size) != 0) {
>  avio_write(pb, pkt->data, pkt->size);
>  } else {
> +uint8_t padding[2] = {0, 0};
>  /* In Sega Cinepak, the reported size in the Cinepak header is
>   * 8 bytes too short. However, the size in the STAB section
> of the header
>   * is correct, taking into account the extra two bytes. */
>  AV_WB24(&pkt->data[1], pkt->size - 8 + 2);
>  metadata->size += 2;
> -uint8_t padding[2] = {0, 0};
>
>  avio_write(pb, pkt->data, 10);
>  avio_write(pb, padding, 2);
> @@ -158,6 +158,7 @@ static int get_audio_codec_id(enum AVCodecID codec_id)
>
>  static int film_init(AVFormatContext *format_context)
>  {
> +AVStream *audio = NULL;
>  FILMOutputContext *film = format_context->priv_data;
>  film->audio_index = -1;
>  film->video_index = -1;
> @@ -165,7 +166,6 @@ static int film_init(AVFormatContext *format_context)
>  film->packet_count = 0;
>  film->start = NULL;
>  film->last = NULL;
> -AVStream *audio = NULL;
>
>  for (int i = 0; i < format_context->nb_streams; i++) {
>  AVStream *st = format_context->streams[i];
>
> ___
> ffmpeg-cvslog mailing list
> ffmpeg-cvs...@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


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


Re: [FFmpeg-devel] [PATCH] avformat/rawenc: check stream type

2018-04-09 Thread Michael Niedermayer
On Fri, Apr 06, 2018 at 08:34:12PM +0530, Gyan Doshi wrote:
> 
> On 4/5/2018 12:09 AM, Michael Niedermayer wrote:
> >
> >This does not work
> >breaks fate-unknown_layout-ac3
> >
> >also the tests mayb too strict, there are similar codec_ids like mpeg1/2
> >or jpeg variants which are all basically the same from a muxers point of view
> 
> Revised patch passes FATE. Set looser conditions for mpeg-1/2/4 and jpeg
> muxer.
> 
> Regards,
> Gyan

>  rawenc.c |   36 
>  1 file changed, 36 insertions(+)
> 5aaae3c1bf40a983cff15bc2fc603ac214d9437a  
> v2-0001-avformat-rawenc-check-stream-type.patch
> From a4ae3eb20af9a4c6e5feb201347b5b044541c59b Mon Sep 17 00:00:00 2001
> From: Gyan Doshi 
> Date: Fri, 6 Apr 2018 20:21:57 +0530
> Subject: [PATCH v2] avformat/rawenc: check stream type
> 
> Validate codec of stream to be muxed except for data muxer.
> ---
>  libavformat/rawenc.c | 36 
>  1 file changed, 36 insertions(+)
> 
> diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
> index 809ca23b1a..19028329f7 100644
> --- a/libavformat/rawenc.c
> +++ b/libavformat/rawenc.c
> @@ -34,12 +34,48 @@ int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
>  
>  static int force_one_stream(AVFormatContext *s)
>  {
> +enum AVCodecID id;
> +const char *idname;

indention is wrong


> +
>  if (s->nb_streams != 1) {
>  av_log(s, AV_LOG_ERROR, "%s files have exactly one stream\n",
> s->oformat->name);
>  return AVERROR(EINVAL);
>  }
> +
> +if (!strcmp("data", s->oformat->name))
> +return 0;
> +
> +id = s->streams[0]->codecpar->codec_id;
> +idname = avcodec_get_name(id);

same


> +
> +switch(s->streams[0]->codecpar->codec_type) {
> +case AVMEDIA_TYPE_AUDIO:
> +if (s->oformat->audio_codec != id)
> +goto fail;
> +break;
> +case AVMEDIA_TYPE_VIDEO:
> +if (strstr(s->oformat->name, "mpeg") != NULL) {
> +if (strstr(idname, "mpeg") == NULL)
> +goto fail;
> +} else if (strstr(s->oformat->name, "m4v") != NULL) {
> +   if (strstr(idname, "mpeg4") == NULL)
> +   goto fail;
> +} else if (strstr(s->oformat->name, "jpeg") != NULL) {
> +   if (strstr(idname, "jpeg") == NULL)
> +   goto fail;
> +} else if (s->oformat->video_codec != id)
> +   goto fail;
> +break;

iam not sure these cross similarity stuff should be hardcoded here.
It seems painfull to have to maintain this.
also the ones i mentioned might not be all cases

To implement generic "codec supported" checks, muxers would have to
list what they support.
There are 3 ways i know how this can be done in the current API
1. the audio_codec / video_codec / ... fields
2. the codec_tag array (this was in fact IIRC one of the intended uses of it)
3. the querry_format callback

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] GSOC 2018 qualification task.

2018-04-09 Thread Rostislav Pehlivanov
On 9 April 2018 at 19:10, Paul B Mahol  wrote:

> On 4/9/18, Rostislav Pehlivanov  wrote:
> > On 9 April 2018 at 03:59, ANURAG SINGH IIT BHU <
> > anurag.singh.ph...@iitbhu.ac.in> wrote:
> >
> >> This mail is regarding the qualification task assigned to me for the
> >> GSOC project
> >> in FFmpeg for automatic real-time subtitle generation using speech to
> text
> >> translation ML model.
> >>
> >
> > i really don't think lavfi is the correct place for such code, nor that
> the
> > project's repo should contain such code at all.
> > This would need to be in another repo and a separate library.
>
> Why? Are you against ocr filter too?
>

The OCR filter uses libtessract so I'm fine with it. Like I said, as long
as the actual code to do it is in an external library I don't mind.
Mozilla recently released Deep Speech (https://github.com/mozilla/DeepSpeech)
which does pretty much exactly speech to text and is considered to have the
most accurate one out there. Someone just needs to convert the tensorflow
code to something more usable.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] avformat/mov: Fix extradata memleak

2018-04-09 Thread Michael Niedermayer
Fixes: crbug 822705

Reported-by: Matt Wolenetz 
Reviewed-by: Matt Wolenetz 
Signed-off-by: Michael Niedermayer 
---
 libavformat/mov.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 97b1462aab..1340bf3913 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2592,6 +2592,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 
 return mov_finalize_stsd_codec(c, pb, st, sc);
 fail:
+if (sc->extradata) {
+int j;
+for (j = 0; j < sc->stsd_count; j++)
+av_freep(&sc->extradata[j]);
+}
+
 av_freep(&sc->extradata);
 av_freep(&sc->extradata_size);
 return ret;
-- 
2.17.0

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


[FFmpeg-devel] [PATCH 2/2] avcodec/h264_slice: Fix integer overflow with last_poc

2018-04-09 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483646 - -2816 cannot be represented in 
type 'int'
Fixes: crbug 823145

Reported-by: Matt Wolenetz 
Signed-off-by: Michael Niedermayer 
---
 libavcodec/h264_slice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 90e05ed8f1..d71ddbe9ba 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1316,7 +1316,7 @@ static int h264_select_output_frame(H264Context *h)
 }
 out_of_order = MAX_DELAYED_PIC_COUNT - i;
 if(   cur->f->pict_type == AV_PICTURE_TYPE_B
-   || (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && 
h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 
2))
+   || (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && 
h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - 
(int64_t)h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 2))
 out_of_order = FFMAX(out_of_order, 1);
 if (out_of_order == MAX_DELAYED_PIC_COUNT) {
 av_log(h->avctx, AV_LOG_VERBOSE, "Invalid POC %d<%d\n", cur->poc, 
h->last_pocs[0]);
-- 
2.17.0

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


[FFmpeg-devel] [PATCH 2/4] lavf/hls: use ff_get_chomp_line

2018-04-09 Thread Jun Zhao

From 4cd7996babcb80a0bae6bb4c0f31600d70b5f575 Mon Sep 17 00:00:00 2001
From: Jun Zhao 
Date: Mon, 9 Apr 2018 23:11:02 +0800
Subject: [PATCH 2/4] lavf/hls: use ff_get_chomp_line

Signed-off-by: Jun Zhao 
---
 libavformat/hls.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index ae0545a086..1257cd101c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -216,14 +216,6 @@ typedef struct HLSContext {
 AVIOContext *playlist_pb;
 } HLSContext;
 
-static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-{
-int len = ff_get_line(s, buf, maxlen);
-while (len > 0 && av_isspace(buf[len - 1]))
-buf[--len] = '\0';
-return len;
-}
-
 static void free_segment_list(struct playlist *pls)
 {
 int i;
@@ -770,7 +762,7 @@ static int parse_playlist(HLSContext *c, const char *url,
 if (av_opt_get(in, "location", AV_OPT_SEARCH_CHILDREN, &new_url) >= 0)
 url = new_url;
 
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (strcmp(line, "#EXTM3U")) {
 ret = AVERROR_INVALIDDATA;
 goto fail;
@@ -782,7 +774,7 @@ static int parse_playlist(HLSContext *c, const char *url,
 pls->type = PLS_TYPE_UNSPECIFIED;
 }
 while (!avio_feof(in)) {
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) {
 is_variant = 1;
 memset(&variant_info, 0, sizeof(variant_info));
-- 
2.14.1

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


[FFmpeg-devel] [PATCH 4/4] lavf/hlsproto: use ff_get_chomp_line

2018-04-09 Thread Jun Zhao

From beace363b11e4a472d84d001458ffd4017788cfb Mon Sep 17 00:00:00 2001
From: Jun Zhao 
Date: Mon, 9 Apr 2018 23:13:03 +0800
Subject: [PATCH 4/4] lavf/hlsproto: use ff_get_chomp_line

Signed-off-by: Jun Zhao 
---
 libavformat/hlsproto.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index 2b19ed0cf6..e7ef2d88ea 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -69,14 +69,6 @@ typedef struct HLSContext {
 int64_t last_load_time;
 } HLSContext;
 
-static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-{
-int len = ff_get_line(s, buf, maxlen);
-while (len > 0 && av_isspace(buf[len - 1]))
-buf[--len] = '\0';
-return len;
-}
-
 static void free_segment_list(HLSContext *s)
 {
 int i;
@@ -122,7 +114,7 @@ static int parse_playlist(URLContext *h, const char *url)
h->protocol_whitelist, 
h->protocol_blacklist)) < 0)
 return ret;
 
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (strcmp(line, "#EXTM3U")) {
 ret = AVERROR_INVALIDDATA;
 goto fail;
@@ -131,7 +123,7 @@ static int parse_playlist(URLContext *h, const char *url)
 free_segment_list(s);
 s->finished = 0;
 while (!avio_feof(in)) {
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) {
 struct variant_info info = {{0}};
 is_variant = 1;
-- 
2.14.1

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


[FFmpeg-devel] [PATCH 3/4] lavf/hlsenc: use ff_get_chomp_line

2018-04-09 Thread Jun Zhao

From a883ac7d3db7c42e87f645dbc00423ad906ede0d Mon Sep 17 00:00:00 2001
From: Jun Zhao 
Date: Mon, 9 Apr 2018 23:12:16 +0800
Subject: [PATCH 3/4] lavf/hlsenc: use ff_get_chomp_line

Signed-off-by: Jun Zhao 
---
 libavformat/hlsenc.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 2a54b4342e..20982ced75 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -680,14 +680,6 @@ static int hls_encryption_start(AVFormatContext *s)
 return 0;
 }
 
-static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-{
-int len = ff_get_line(s, buf, maxlen);
-while (len > 0 && av_isspace(buf[len - 1]))
-buf[--len] = '\0';
-return len;
-}
-
 static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
 {
 AVDictionary *options = NULL;
@@ -1055,7 +1047,7 @@ static int parse_playlist(AVFormatContext *s, const char 
*url, VariantStream *vs
s->protocol_whitelist, 
s->protocol_blacklist)) < 0)
 return ret;
 
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (strcmp(line, "#EXTM3U")) {
 ret = AVERROR_INVALIDDATA;
 goto fail;
@@ -1063,7 +1055,7 @@ static int parse_playlist(AVFormatContext *s, const char 
*url, VariantStream *vs
 
 vs->discontinuity = 0;
 while (!avio_feof(in)) {
-read_chomp_line(in, line, sizeof(line));
+ff_get_chomp_line(in, line, sizeof(line));
 if (av_strstart(line, "#EXT-X-MEDIA-SEQUENCE:", &ptr)) {
 int64_t tmp_sequence = strtoll(ptr, NULL, 10);
 if (tmp_sequence < vs->sequence)
-- 
2.14.1

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


Re: [FFmpeg-devel] [PATCH 1/1] Sega FILM: set dts and duration when demuxing

2018-04-09 Thread Michael Niedermayer
On Mon, Apr 09, 2018 at 04:11:43PM -0700, Kyle Swanson wrote:
> Hi,
> 
> On Sun, Apr 8, 2018 at 6:27 PM,  wrote:
> 
> > From: Misty De Meo 
> >
> > ---
> >  libavformat/segafilm.c | 19 +++
> >  1 file changed, 19 insertions(+)
> >
> > diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
> > index 4c0cca0140..e72c26b144 100644
> > --- a/libavformat/segafilm.c
> > +++ b/libavformat/segafilm.c
> > @@ -270,6 +270,8 @@ static int film_read_packet(AVFormatContext *s,
> >  FilmDemuxContext *film = s->priv_data;
> >  AVIOContext *pb = s->pb;
> >  film_sample *sample;
> > +film_sample *next_sample = NULL;
> > +int next_sample_id;
> >  int ret = 0;
> >
> >  if (film->current_sample >= film->sample_count)
> > @@ -277,6 +279,20 @@ static int film_read_packet(AVFormatContext *s,
> >
> >  sample = &film->sample_table[film->current_sample];
> >
> > +/* Find the next sample from the same stream, assuming there is one;
> > + * this is used to calculate the duration below */
> > +next_sample_id = film->current_sample + 1;
> > +while (next_sample == NULL) {
> > +if (next_sample_id >= film->sample_count)
> > +break;
> > +
> > +next_sample = &film->sample_table[next_sample_id];
> > +if (next_sample->stream != sample->stream) {
> > +next_sample = NULL;
> > +next_sample_id++;
> > +}
> > +}
> > +
> >  /* position the stream (will probably be there anyway) */
> >  avio_seek(pb, sample->sample_offset, SEEK_SET);
> >
> > @@ -285,8 +301,11 @@ static int film_read_packet(AVFormatContext *s,
> >  ret = AVERROR(EIO);
> >
> >  pkt->stream_index = sample->stream;
> > +pkt->dts = sample->pts;
> >  pkt->pts = sample->pts;
> >  pkt->flags |= sample->keyframe ? AV_PKT_FLAG_KEY : 0;
> > +if (next_sample != NULL)
> > +pkt->duration = next_sample->pts - sample->pts;
> >
> >  film->current_sample++;
> >
> > --
> > 2.17.0
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> lgtm

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/filters: correct range for length in astats filter

2018-04-09 Thread Michael Niedermayer
On Mon, Apr 09, 2018 at 02:30:59PM +0530, Gyan Doshi wrote:
>  filters.texi |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> f265e67910c3940db7122c808e61054a93e50a75  
> 0001-doc-filters-correct-range-for-length-in-astats-filte.patch
> From 349c34686fefeb2c1c3909c8feab481375962111 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi 
> Date: Mon, 9 Apr 2018 14:28:06 +0530
> Subject: [PATCH] doc/filters: correct range for length in astats filter
> 
> ---
>  doc/filters.texi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/4] lavf/aviobuf: add ff_get_chomp_line

2018-04-09 Thread Jun Zhao

From 58e8cb520eeeb727ee834ee81877db7c81fe089b Mon Sep 17 00:00:00 2001
From: Jun Zhao 
Date: Mon, 9 Apr 2018 23:05:42 +0800
Subject: [PATCH 1/4] lavf/aviobuf: add ff_get_chomp_line

Same as ff_get_line but strip the white-space characters in the
string tail.

Signed-off-by: Jun Zhao 
---
 libavformat/aviobuf.c  |  8 
 libavformat/internal.h | 10 ++
 2 files changed, 18 insertions(+)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 95b3364478..e752d0e1a6 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -823,6 +823,14 @@ int ff_get_line(AVIOContext *s, char *buf, int maxlen)
 return i;
 }
 
+int ff_get_chomp_line(AVIOContext *s, char *buf, int maxlen)
+{
+int len = ff_get_line(s, buf, maxlen);
+while (len > 0 && av_isspace(buf[len - 1]))
+buf[--len] = '\0';
+return len;
+}
+
 int64_t ff_read_line_to_bprint(AVIOContext *s, AVBPrint *bp)
 {
 int len, end;
diff --git a/libavformat/internal.h b/libavformat/internal.h
index c50382ad29..3582682925 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -299,6 +299,16 @@ void ff_put_v(AVIOContext *bc, uint64_t val);
  */
 int ff_get_line(AVIOContext *s, char *buf, int maxlen);
 
+/**
+ * Same as ff_get_line but strip the white-space characters in the text tail
+ *
+ * @param s the read-only AVIOContext
+ * @param buf buffer to store the read line
+ * @param maxlen size of the buffer
+ * @return the length of the string written in the buffer
+ */
+int ff_get_chomp_line(AVIOContext *s, char *buf, int maxlen);
+
 /**
  * Read a whole line of text from AVIOContext to an AVBPrint buffer. Stop
  * reading after reaching a \\r, a \\n, a \\r\\n, a \\0 or EOF.  The line
-- 
2.14.1

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


Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself to the general developers list

2018-04-09 Thread Jun Zhao


On 2018/4/10 6:58, Michael Niedermayer wrote:
> On Tue, Apr 03, 2018 at 07:24:21AM +0800, Jun Zhao wrote:
>> Want to close work with this community, so I request as
>> a general developer.
>>  MAINTAINERS |1 +
>>  1 file changed, 1 insertion(+)
>> b874d130cf4de51accf7045a90a9487cc5c8c492  
>> 0001-MAINTAINERS-add-myself-to-the-general-developers-lis.patch
>> From 4a21d75db2070031986d92cde45d3c1ea64f0cfa Mon Sep 17 00:00:00 2001
>> From: Jun Zhao 
>> Date: Tue, 3 Apr 2018 07:14:46 +0800
>> Subject: [PATCH] MAINTAINERS: add myself to the general developers list
>>
>> Signed-off-by: Jun Zhao 
>> ---
>>  MAINTAINERS | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 3c54ad6781..5c7bf4726f 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -552,6 +552,7 @@ Ivan Uskov
>>  James Darnley
>>  Jan Ekström
>>  Joakim Plate
>> +Jun Zhao
>>  Kieran Kunhya
>>  Kirill Gavrilov
>>  Martin Storsjö
> will apply
>
> thanks
Thanks a lot, Michael.
>
> [...]
>
>
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] Support for Ambisonics and OpusProjection* API.

2018-04-09 Thread Drew Allen
Friendly weekly ping about this patch.

Can someone please let me know if I need to do anything more to submit this
patch? Thanks!

On Mon, Apr 2, 2018 at 9:13 AM Drew Allen  wrote:

> Friendly ping to allow this to push to the member list, please.
>
> On Wed, Mar 28, 2018 at 2:58 PM Drew Allen  wrote:
>
>> Hello all,
>>
>> My name is Andrew Allen and I'm a contributor to Opus, supporting new
>> channel mappings 2 and 3 for ambisonics compression. I've attached a patch
>> to support the new OpusProjectionEncoder and OpusProjectionDecoder APIs for
>> handling the new channel mapping 3 in OPUS.
>>
>> Please let me know of any changes I should make or if there are any
>> questions I can help answer.
>>
>> Cheers,
>> Drew
>>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/4] lavf/aviobuf: add ff_get_chomp_line

2018-04-09 Thread Steven Liu


> On 10 Apr 2018, at 08:33, Jun Zhao  wrote:
> 
> 
> <0001-lavf-aviobuf-add-ff_get_chomp_line.patch>___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

patchset LGTM

Thanks
Steven





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


Re: [FFmpeg-devel] [PATCH v2 1/2] lavf: make overlay_qsv work based on framesync

2018-04-09 Thread Li, Zhong
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Ruiling Song
> Sent: Tuesday, April 3, 2018 9:50 AM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Song, Ruiling 
> Subject: [FFmpeg-devel] [PATCH v2 1/2] lavf: make overlay_qsv work based
> on framesync
> 
> The existing version which was cherry-picked from Libav does not work with
> FFmpeg framework, because ff_request_frame() was totally different
> between Libav (recursive) and FFmpeg (non-recursive).
> The existing overlay_qsv implementation depends on the recursive version of
> ff_request_frame to trigger immediate call to request_frame() on input pad.
> But this has been removed in FFmpeg since "lavfi: make request_frame()
> non-recursive."
> Now that we have handy framesync support in FFmpeg, so I make it work
> based on framesync. Some other fixing which is also needed to make
> overlay_qsv work are put in a separate patch.
> 
> v2:
> add .preinit field to initilize framesync options.
> export more options like vf_overlay.c

How about taking these options as a separated patch? 
It doesn't take obvious effect to make qsv overlay work. 

> 
> Signed-off-by: Ruiling Song 
> ---
>  libavfilter/Makefile |   2 +-
>  libavfilter/vf_overlay_qsv.c | 213 
> ---
>  2 files changed, 78 insertions(+), 137 deletions(-)
> 
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 
> a90ca30..7f2ad1f
> 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -267,7 +267,7 @@ OBJS-$(CONFIG_OSCILLOSCOPE_FILTER)
> += vf_datascope.o
>  OBJS-$(CONFIG_OVERLAY_FILTER)+= vf_overlay.o
> framesync.o
>  OBJS-$(CONFIG_OVERLAY_OPENCL_FILTER) +=
> vf_overlay_opencl.o opencl.o \
> 
> opencl/overlay.o framesync.o
> -OBJS-$(CONFIG_OVERLAY_QSV_FILTER)+= vf_overlay_qsv.o
> +OBJS-$(CONFIG_OVERLAY_QSV_FILTER)+= vf_overlay_qsv.o
> framesync.o
>  OBJS-$(CONFIG_OWDENOISE_FILTER)  += vf_owdenoise.o
>  OBJS-$(CONFIG_PAD_FILTER)+= vf_pad.o
>  OBJS-$(CONFIG_PALETTEGEN_FILTER) += vf_palettegen.o
> diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index
> 6c3efdb..2087178 100644
> --- a/libavfilter/vf_overlay_qsv.c
> +++ b/libavfilter/vf_overlay_qsv.c
> @@ -36,6 +36,7 @@
>  #include "formats.h"
>  #include "video.h"
> 
> +#include "framesync.h"
>  #include "qsvvpp.h"
> 
>  #define MAIN0
> @@ -56,14 +57,10 @@ enum var_name {
>  VAR_VARS_NB
>  };
> 
> -enum EOFAction {
> -EOF_ACTION_REPEAT,
> -EOF_ACTION_ENDALL
> -};
> -
>  typedef struct QSVOverlayContext {
>  const AVClass  *class;
> 
> +FFFrameSync fs;
>  QSVVPPContext  *qsv;
>  QSVVPPParamqsv_param;
>  mfxExtVPPComposite comp_conf;
> @@ -72,10 +69,6 @@ typedef struct QSVOverlayContext {
>  char *overlay_ox, *overlay_oy, *overlay_ow, *overlay_oh;
>  uint16_t  overlay_alpha, overlay_pixel_alpha;
> 
> -enum EOFAction eof_action;  /* action to take on EOF from source */
> -
> -AVFrame *main;
> -AVFrame *over_prev, *over_next;
>  } QSVOverlayContext;
> 
>  static const char *const var_names[] = { @@ -90,20 +83,25 @@ static
> const char *const var_names[] = {
>  NULL
>  };
> 
> -static const AVOption options[] = {
> +static const AVOption overlay_qsv_options[] = {
>  { "x", "Overlay x position", OFFSET(overlay_ox), AV_OPT_TYPE_STRING,
> { .str="0"}, 0, 255, .flags = FLAGS},
>  { "y", "Overlay y position", OFFSET(overlay_oy), AV_OPT_TYPE_STRING,
> { .str="0"}, 0, 255, .flags = FLAGS},
>  { "w", "Overlay width",  OFFSET(overlay_ow),
> AV_OPT_TYPE_STRING, { .str="overlay_iw"}, 0, 255, .flags = FLAGS},
>  { "h", "Overlay height", OFFSET(overlay_oh),
> AV_OPT_TYPE_STRING, { .str="overlay_ih*w/overlay_iw"}, 0, 255, .flags =
> FLAGS},
>  { "alpha", "Overlay global alpha", OFFSET(overlay_alpha),
> AV_OPT_TYPE_INT, { .i64 = 255}, 0, 255, .flags = FLAGS},
>  { "eof_action", "Action to take when encountering EOF from
> secondary input ",
> -OFFSET(eof_action), AV_OPT_TYPE_INT, { .i64 =
> EOF_ACTION_REPEAT },
> -EOF_ACTION_REPEAT, EOF_ACTION_ENDALL, .flags = FLAGS,
> "eof_action" },
> -{ "repeat", "Repeat the previous frame.", 0, AV_OPT_TYPE_CONST,
> { .i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
> -{ "endall", "End both streams.",  0,
> AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_ENDALL }, .flags = FLAGS,
> "eof_action" },
> +OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 =
> EOF_ACTION_REPEAT },
> +EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS,
> "eof_action" },
> +{ "repeat", "Repeat the previous frame.",   0,
> AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_REPEAT }, .flags = FLAGS,
> "eof_action" },
> +{ "endall", "End both streams.",0,
> AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_ENDALL }, .flags = FLAGS,
> "eof_action" },
> +{ "pass",   "Pass through

[FFmpeg-devel] [PATCH v2] doc: update loglevel option documentation

2018-04-09 Thread Tobias Rapp
Updates documentation after the changes to loglevel flag prefix parsing
in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.

Signed-off-by: Tobias Rapp 
---
 doc/fftools-common-opts.texi | 37 +
 1 file changed, 29 insertions(+), 8 deletions(-)

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 185ec21..aa1bb63 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -168,14 +168,24 @@ The returned list cannot be assumed to be always complete.
 ffmpeg -sinks pulse,server=192.168.0.4
 @end example
 
-@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
-Set the logging level used by the library.
-Adding "repeat+" indicates that repeated log output should not be compressed
-to the first line and the "Last message repeated n times" line will be
-omitted. "repeat" can also be used alone.
-If "repeat" is used alone, and with no prior loglevel set, the default
-loglevel will be used. If multiple loglevel parameters are given, using
-'repeat' will not change the loglevel.
+@item -loglevel [@var{flags}+]@var{loglevel} | -v [@var{flags}+]@var{loglevel}
+Set logging level and flags used by the library.
+
+The optional @var{flags} prefix can consist of the following values:
+@table @samp
+@item repeat
+Indicates that repeated log output should not be compressed to the first line
+and the "Last message repeated n times" line will be omitted.
+@item level
+Indicates that log output should add a @code{[level]} prefix to each message
+line. This can be used as an alternative to log coloring, e.g. when dumping the
+log to file.
+@end table
+Flags can also be used alone by adding a '+'/'-' prefix to set/reset a single
+flag without affecting other @var{flags} or changing @var{loglevel}. When
+setting both @var{flags} and @var{loglevel}, a '+' separator is expected
+between the last @var{flags} value and before @var{loglevel}.
+
 @var{loglevel} is a string or a number containing one of the following values:
 @table @samp
 @item quiet, -8
@@ -201,6 +211,17 @@ Show everything, including debugging information.
 @item trace, 56
 @end table
 
+For example to enable repeated log output and set @var{loglevel} to
+@code{verbose}:
+@example
+ffmpeg -loglevel repeat+verbose -i input output
+@end example
+Another example that disables the @code{level} prefix without affecting the
+current state of @code{repeat} flag or @var{loglevel}:
+@example
+ffmpeg [...] -loglevel -level
+@end example
+
 By default the program logs to stderr. If coloring is supported by the
 terminal, colors are used to mark errors and warnings. Log coloring
 can be disabled setting the environment variable
-- 
2.7.4


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