[FFmpeg-devel] [PATCH] avformat/utils: fix stream ordering for program ID stream specifiers
Fixes a regression introduced in dbfd042983eed8586d4048795c00af820f5b6b1f. Signed-off-by: Marton Balint --- doc/fftools-common-opts.texi | 5 - libavformat/utils.c | 16 +++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index e75bec4354..4359526f19 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -36,7 +36,10 @@ Possible forms of stream specifiers are: Matches the stream with this index. E.g. @code{-threads:1 4} would set the thread count for the second stream to 4. If @var{stream_index} is used as an additional stream specifier (see below), then it selects stream number -@var{stream_index} from the matching streams. +@var{stream_index} from the matching streams. Stream numbering is based on the +order of the streams as detected by libavformat except when a program ID is +specified. In this case it is based on the ordering of the streams in the +program. @item @var{stream_type}[:@var{additional_stream_specifier}] @var{stream_type} is one of following: 'v' or 'V' for video, 'a' for audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v' matches all video diff --git a/libavformat/utils.c b/libavformat/utils.c index 6ef94239a4..3d764c18d6 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5107,7 +5107,7 @@ AVRational av_guess_frame_rate(AVFormatContext *format, AVStream *st, AVFrame *f * >0 if st is a matching stream */ static int match_stream_specifier(AVFormatContext *s, AVStream *st, - const char *spec, const char **indexptr) + const char *spec, const char **indexptr, AVProgram **p) { int match = 1; /* Stores if the specifier matches so far. */ while (*spec) { @@ -5162,6 +5162,8 @@ FF_DISABLE_DEPRECATION_WARNINGS for (j = 0; j < s->programs[i]->nb_stream_indexes; j++) { if (st->index == s->programs[i]->stream_index[j]) { found = 1; +if (p) +*p = s->programs[i]; i = s->nb_programs; break; } @@ -5264,8 +5266,10 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int ret, index; char *endptr; const char *indexptr = NULL; +AVProgram *p = NULL; +int nb_streams; -ret = match_stream_specifier(s, st, spec, ); +ret = match_stream_specifier(s, st, spec, , ); if (ret < 0) goto error; @@ -5283,11 +5287,13 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, return (index == st->index); /* If we requested a matching stream index, we have to ensure st is that. */ -for (int i = 0; i < s->nb_streams && index >= 0; i++) { -ret = match_stream_specifier(s, s->streams[i], spec, NULL); +nb_streams = p ? p->nb_stream_indexes : s->nb_streams; +for (int i = 0; i < nb_streams && index >= 0; i++) { +AVStream *candidate = p ? s->streams[p->stream_index[i]] : s->streams[i]; +ret = match_stream_specifier(s, candidate, spec, NULL, NULL); if (ret < 0) goto error; -if (ret > 0 && index-- == 0 && st == s->streams[i]) +if (ret > 0 && index-- == 0 && st == candidate) return 1; } return 0; -- 2.16.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [FFMPEG DEVEL] [PATCH v4] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
--- Add the index of the timecode in case of multiple timecodes values Limit to 3 the number of timecodes remove break Thanks you ! --- fftools/ffprobe.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index dea489d02e..b43349f746 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2199,6 +2199,20 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data)); print_str("timecode", tcbuf); +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) { +uint32_t *tc = (uint32_t*)sd->data; +for (int j = 1; j <= FFMIN(tc[0],3); j++) { +char tcbuf[AV_TIMECODE_STR_SIZE]; +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); +if (j > 1){ +writer_print_section_header(w, SECTION_ID_FRAME_SIDE_DATA); +print_str("side_data_type", name ? name : "unknown"); +} +print_str("timecode", tcbuf); +print_int("id",j); +if (j < tc[0]) +writer_print_section_footer(w); +} } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) { AVMasteringDisplayMetadata *metadata = (AVMasteringDisplayMetadata *)sd->data; -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] Revert "lavf/utils: Allow url credentials to contain a slash."
On Sat, 18 May 2019, Carl Eugen Hoyos wrote: Am 18.05.2019 um 16:48 schrieb Marton Balint : On Tue, 14 May 2019, Hendrik Leppkes wrote: On Tue, May 14, 2019 at 10:34 PM Marton Balint wrote: On Sun, 5 May 2019, Carl Eugen Hoyos wrote: Am So., 5. Mai 2019 um 20:51 Uhr schrieb Marton Balint : This reverts commit dd06f022b07438d650c82255dff16908ba04244a. Fixes ticket #7871 and reopens ticket #7816. I'll send an alternative patch in a moment. Ping for this, I still think the revert is the best we can do here. I agree. Slashes are flat out not allowed in that part of the URI and will always result in ambigious parsing. Will apply soon. Please do if you don’t see a better solution. Thanks, applied. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [DECISION] Ban Nicolas George from project
On 2019-05-18 11:57 -0300, James Almer wrote: > On 5/18/2019 9:24 AM, Paul B Mahol wrote: > > On 5/18/19, Reimar Döffinger wrote: > >> Voting is not yet another mobbing tool for when you get tired of other > >> ways. > >> If you wish for an end to that feud, you can ask other developers to try > >> and > >> help, but you've kept this going for years and usually responded somewhere > >> between dismissive and insulting to any such attempts. > >> If you wish to keep the feud going, please deal with the consequences > >> yourself and stop dragging the whole project into your self-created messes. > >> > >> Sorry for the bluntness and my excuses if I ruined the chances for a > >> peaceful weekend. > > > > You are obviously biased toward Nicolas, and far from being neutral. > > So I will just ignore your tries to be "helpful". > > You're not helping your cause in the slightest with this kind of reply. > > Just drop this. This is not how you solve a conflict between developers. > A call for a vote without first presenting the issue for debate to the > community isn't going anywhere. This is so sad :( And I am looking at both of you Nicolas and Paul. From what I know libavfilter wouldn't be anywhere near where it is today without you two! There needs to be room for discussion on the mailing list. If Nicolas has a comment that "blocks" one of your patches Paul, you should be polite and try to implement it or to find convincing argument that shows that it is better to do things differently. Yes, the process can be weary and demotivating at times. OTOH Nicolas should accept that often perfect is the enemy of good and having a solution now can be better than having it later or never. Also I think it is required to provide help and pointers and not only to say it is blocked because of X. Just less black and white. The world isn't ideal and there are advantages and drawbacks to each and every thing. Alexander ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFMPEG DEVEL] [PATCH v2] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
On Sat, 18 May 2019, Antonin Gouzer wrote: Thank you for your response, I don't have any example of such a file. I was thinking that GOP timecode was reserved to MPEG2 files and S12M to H265/H264 files ? In every writer the type of timecode is already an attribute: side_data_type. With the actual xsd the result should be, with the XML writer: That should be ok don't you think ? Ah, OK then. I see another issue though: what if S12M side data has more than one timecode in it? Having the same attirbute multiple times in an XML tag is not valid. On Fri, 17 May 2019, Antonin Gouzer wrote: > Thanks in advance. > --- > fftools/ffprobe.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index dea489d02e..4763ce6d98 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, > char tcbuf[AV_TIMECODE_STR_SIZE]; > av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data)); > print_str("timecode", tcbuf); > +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) { > +uint32_t *tc = (uint32_t*)sd->data; An assert makes sense here to check if tc[0] <= 3. > +for (int j = 1; j <= tc[0]; j++) { > +char tcbuf[AV_TIMECODE_STR_SIZE]; > +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); > +print_str("timecode", tcbuf); > +} > +break; Why the break? Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] Revert "lavf/utils: Allow url credentials to contain a slash."
> Am 18.05.2019 um 16:48 schrieb Marton Balint : > > > >>> On Tue, 14 May 2019, Hendrik Leppkes wrote: >>> >>> On Tue, May 14, 2019 at 10:34 PM Marton Balint wrote: >>> >>> >>> On Sun, 5 May 2019, Carl Eugen Hoyos wrote: > Am So., 5. Mai 2019 um 20:51 Uhr schrieb Marton Balint : > > This reverts commit dd06f022b07438d650c82255dff16908ba04244a. > > Fixes ticket #7871 and reopens ticket #7816. I'll send an alternative patch in a moment. >>> >>> Ping for this, I still think the revert is the best we can do here. >> >> I agree. Slashes are flat out not allowed in that part of the URI and >> will always result in ambigious parsing. > > Will apply soon. Please do if you don’t see a better solution. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
On Sat, May 18, 2019 at 01:05:01PM +0200, Reimar Döffinger wrote: > On 18.05.2019, at 12:15, Michael Niedermayer wrote: > > > On Sat, May 18, 2019 at 12:02:55PM +0200, James Darnley wrote: > >> On 2019-05-18 09:39, Michael Niedermayer wrote: > >>> Fixes: "null pointer dereference" > >>> Fixes: > >>> 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680 > >>> > >>> Found-by: continuous fuzzing process > >>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > >>> Signed-off-by: Michael Niedermayer > >>> --- > >>> libavcodec/v210dec.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c > >>> index bc1e1d34ff..5a33d8c089 100644 > >>> --- a/libavcodec/v210dec.c > >>> +++ b/libavcodec/v210dec.c > >>> @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void > >>> *data, int *got_frame, > >>> && avpkt->size - 64 >= stride * avctx->height) > >>> psrc += 64; > >>> > >>> -aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); > >>> +aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); > >>> if (aligned_input != s->aligned_input) { > >>> s->aligned_input = aligned_input; > >>> ff_v210dec_init(s); > >>> > >> > >> Ah yes, that'll be needed after the recent addition of avx2. LGTM and > >> sorry. > >> > > > >> I object to the commit message though because it isn't a "null pointer > >> dereference" but if that is the error as reported by the tool then keep > >> it as is. > > > > yes, the tool(s) say things like "Null-dereference READ", "SEGV on unknown > > address 0x" > > Is that a tool bug or are we missing something that goes on here besides the > alignment? > If it's a tool bug can we try to get it fixed? > This has a big risk of wasting time if they print straight-up wrong > information... I do not know for 100% sure. I actually have to admit that i tested on a pre AVX2 CPU (sandybridge). I confirmed the bug and fix on a AVX2 box but the ossfuzz stuff is not setup on that box. What ossfuzz on the web interface says is that theres a null pointer dereference in ff_v210_planar_unpack_aligned_avx2. And no anomaly is reproducable on sandybridge. The tools seem to lack support for providing usefull information about asm code. Theres for example no line numbers, no register values, ... Ill try to report this issue in case this patch fixes it (and thus proofs that the alignment fix indeed matches the null pointer report. Thanks PS: yes i know i should upgrade that sandybridge box, i had planed to but theres always something that causes me to move it down on my todo list ... -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v4] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
--- I just correct the indentation in the for loop Thanks --- fftools/ffprobe.c | 8 1 file changed, 8 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index dea489d02e..da92c1592f 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data)); print_str("timecode", tcbuf); +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) { +uint32_t *tc = (uint32_t*)sd->data; +for (int j = 1; j <= tc[0]; j++) { +char tcbuf[AV_TIMECODE_STR_SIZE]; +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); +print_str("timecode", tcbuf); +} +break; } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) { AVMasteringDisplayMetadata *metadata = (AVMasteringDisplayMetadata *)sd->data; -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index dea489d02e..da92c1592f 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data)); print_str("timecode", tcbuf); +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) { +uint32_t *tc = (uint32_t*)sd->data; +for (int j = 1; j <= tc[0]; j++) { +char tcbuf[AV_TIMECODE_STR_SIZE]; +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); +print_str("timecode", tcbuf); +} +break; } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) { AVMasteringDisplayMetadata *metadata = (AVMasteringDisplayMetadata *)sd->data; -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFMPEG DEVEL] [PATCH v2] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
Thank you for your response, I don't have any example of such a file. I was thinking that GOP timecode was reserved to MPEG2 files and S12M to H265/H264 files ? In every writer the type of timecode is already an attribute: side_data_type. With the actual xsd the result should be, with the XML writer: That should be ok don't you think ? Antonin Le sam. 18 mai 2019 à 18:20, Marton Balint a écrit : > > > > On Fri, 17 May 2019, Antonin Gouzer wrote: > > > Thanks in advance. > > --- > > fftools/ffprobe.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > > index dea489d02e..4763ce6d98 100644 > > --- a/fftools/ffprobe.c > > +++ b/fftools/ffprobe.c > > @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame > > *frame, AVStream *stream, > > char tcbuf[AV_TIMECODE_STR_SIZE]; > > av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t > > *)(sd->data)); > > print_str("timecode", tcbuf); > > +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size > > >= 8) { > > +uint32_t *tc = (uint32_t*)sd->data; > > +for (int j = 1; j <= tc[0]; j++) { > > +char tcbuf[AV_TIMECODE_STR_SIZE]; > > +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); > > +print_str("timecode", tcbuf); > > +} > > +break; > > A frame can have GOP_TIMECODE and S12M_TIMECODE side data at the same > time, a separate name (e.g. s12m_timecode) should be used and the ffprobe > xsd should be extended accordingly. > > Regards, > Marton > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFMPEG DEVEL] [PATCH v2] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
On Fri, 17 May 2019, Antonin Gouzer wrote: Thanks in advance. --- fftools/ffprobe.c | 8 1 file changed, 8 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index dea489d02e..4763ce6d98 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data)); print_str("timecode", tcbuf); +} else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) { +uint32_t *tc = (uint32_t*)sd->data; +for (int j = 1; j <= tc[0]; j++) { +char tcbuf[AV_TIMECODE_STR_SIZE]; +av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); +print_str("timecode", tcbuf); +} +break; A frame can have GOP_TIMECODE and S12M_TIMECODE side data at the same time, a separate name (e.g. s12m_timecode) should be used and the ffprobe xsd should be extended accordingly. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [DECISION] Ban Nicolas George from project
On 5/18/2019 9:24 AM, Paul B Mahol wrote: > On 5/18/19, Reimar Döffinger wrote: >> Voting is not yet another mobbing tool for when you get tired of other ways. >> If you wish for an end to that feud, you can ask other developers to try and >> help, but you've kept this going for years and usually responded somewhere >> between dismissive and insulting to any such attempts. >> If you wish to keep the feud going, please deal with the consequences >> yourself and stop dragging the whole project into your self-created messes. >> >> Sorry for the bluntness and my excuses if I ruined the chances for a >> peaceful weekend. > > You are obviously biased toward Nicolas, and far from being neutral. > So I will just ignore your tries to be "helpful". You're not helping your cause in the slightest with this kind of reply. Just drop this. This is not how you solve a conflict between developers. A call for a vote without first presenting the issue for debate to the community isn't going anywhere. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] Revert "lavf/utils: Allow url credentials to contain a slash."
On Tue, 14 May 2019, Hendrik Leppkes wrote: On Tue, May 14, 2019 at 10:34 PM Marton Balint wrote: On Sun, 5 May 2019, Carl Eugen Hoyos wrote: > Am So., 5. Mai 2019 um 20:51 Uhr schrieb Marton Balint : >> >> This reverts commit dd06f022b07438d650c82255dff16908ba04244a. >> >> Fixes ticket #7871 and reopens ticket #7816. > > I'll send an alternative patch in a moment. Ping for this, I still think the revert is the best we can do here. I agree. Slashes are flat out not allowed in that part of the URI and will always result in ambigious parsing. Will apply soon. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [DECISION] Ban Nicolas George from project
On 5/18/19, Reimar Döffinger wrote: > Voting is not yet another mobbing tool for when you get tired of other ways. > If you wish for an end to that feud, you can ask other developers to try and > help, but you've kept this going for years and usually responded somewhere > between dismissive and insulting to any such attempts. > If you wish to keep the feud going, please deal with the consequences > yourself and stop dragging the whole project into your self-created messes. > > Sorry for the bluntness and my excuses if I ruined the chances for a > peaceful weekend. You are obviously biased toward Nicolas, and far from being neutral. So I will just ignore your tries to be "helpful". > > Best regards, Not really. > Reimar Döffinger. > > On 17.05.2019, at 21:25, Paul B Mahol wrote: > >> Hi, >> >> $subject. >> >> He is constantly against my patches, and derailing it with other things >> to just block them. >> >> He is also misguiding other fellow developers with unreasonable and >> impossible refactoring task, see that frame rotating patch set. >> >> libavfilter does not allow dynamic changing of frame parameters. >> And he know it very well. >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
On 2019-05-18 12:15, Michael Niedermayer wrote: > On Sat, May 18, 2019 at 12:02:55PM +0200, James Darnley wrote: >> I object to the commit message though because it isn't a "null pointer >> dereference" but if that is the error as reported by the tool then keep >> it as is. > > yes, the tool(s) say things like "Null-dereference READ", "SEGV on unknown > address 0x" > Hm. It is almost certainly an aligned move on an unaligned address. I don't care that much about the rest of the commit message; the subject is correct which is good enough. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
On 18.05.2019, at 12:15, Michael Niedermayer wrote: > On Sat, May 18, 2019 at 12:02:55PM +0200, James Darnley wrote: >> On 2019-05-18 09:39, Michael Niedermayer wrote: >>> Fixes: "null pointer dereference" >>> Fixes: >>> 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680 >>> >>> Found-by: continuous fuzzing process >>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >>> Signed-off-by: Michael Niedermayer >>> --- >>> libavcodec/v210dec.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c >>> index bc1e1d34ff..5a33d8c089 100644 >>> --- a/libavcodec/v210dec.c >>> +++ b/libavcodec/v210dec.c >>> @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void >>> *data, int *got_frame, >>> && avpkt->size - 64 >= stride * avctx->height) >>> psrc += 64; >>> >>> -aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); >>> +aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); >>> if (aligned_input != s->aligned_input) { >>> s->aligned_input = aligned_input; >>> ff_v210dec_init(s); >>> >> >> Ah yes, that'll be needed after the recent addition of avx2. LGTM and >> sorry. >> > >> I object to the commit message though because it isn't a "null pointer >> dereference" but if that is the error as reported by the tool then keep >> it as is. > > yes, the tool(s) say things like "Null-dereference READ", "SEGV on unknown > address 0x" Is that a tool bug or are we missing something that goes on here besides the alignment? If it's a tool bug can we try to get it fixed? This has a big risk of wasting time if they print straight-up wrong information... ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter: add apitch filter
On 5/18/19, Michael Niedermayer wrote: > On Wed, May 15, 2019 at 07:19:43PM +0200, Paul B Mahol wrote: >> On 5/12/19, Paul B Mahol wrote: >> > On 5/12/19, Michael Niedermayer wrote: >> >> On Sun, May 12, 2019 at 11:00:51PM +0200, Nicolas George wrote: >> >>> Marton Balint (12019-05-12): >> >>> > Yeah, you are right, what I had in mind was this: >> >>> > >> >>> > apitch === asetrate,aresample,atempo >> >>> >> >>> Exactly. And reciprocally, atempo = apitch+asetrate+aresample. >> >>> >> >>> Furthermore, since it works with the spectrum, the filter that does >> >>> the >> >>> hard work can probably easily output at any sample rate, at a cost >> >>> much >> >>> lower than resampling afterwards. Therefore, it makes most sense to >> >>> have >> >>> a single filter with all three parameters (sample rate, speed >> >>> adjustment >> >>> and pitch adjustment). >> >> >> >> and if thats done in our resampler than that can also be combined with >> >> changing the channel order, layout, sample type and so on. >> >> Iam not sure its a good idea but purely technically it should be more >> >> efficient to do it all together. >> >> Also swresample already supports an external FFT resampler so it might >> >> actually fit in there nicely and it might even allow us to remove an >> >> external >> >> dependancy without loosing a feature. (assuming the new FFT resampler >> >> would be equally good) >> >> >> >> >> > >> > To make it work dynamically, filter must resample audio internally. >> > >> >> Can I get testers? > > Iam not sure what you ask for exactly (which is why i didnt reply sooner) > but if theres a patch for an implementation in swr then sure as the > maintainer > of swr i will test it. But iam not sure thats what you had in mind ... > Why you want to put everything in swr? Swr is not for time stretching and pitch shifting. More over it can be done in several ways. > Thanks > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > When you are offended at any man's fault, turn to yourself and study your > own failings. Then you will forget your anger. -- Epictetus > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
On Sat, May 18, 2019 at 12:02:55PM +0200, James Darnley wrote: > On 2019-05-18 09:39, Michael Niedermayer wrote: > > Fixes: "null pointer dereference" > > Fixes: > > 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/v210dec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c > > index bc1e1d34ff..5a33d8c089 100644 > > --- a/libavcodec/v210dec.c > > +++ b/libavcodec/v210dec.c > > @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void > > *data, int *got_frame, > > && avpkt->size - 64 >= stride * avctx->height) > > psrc += 64; > > > > -aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); > > +aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); > > if (aligned_input != s->aligned_input) { > > s->aligned_input = aligned_input; > > ff_v210dec_init(s); > > > > Ah yes, that'll be needed after the recent addition of avx2. LGTM and > sorry. > > I object to the commit message though because it isn't a "null pointer > dereference" but if that is the error as reported by the tool then keep > it as is. yes, the tool(s) say things like "Null-dereference READ", "SEGV on unknown address 0x" [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter: add apitch filter
On Wed, May 15, 2019 at 07:19:43PM +0200, Paul B Mahol wrote: > On 5/12/19, Paul B Mahol wrote: > > On 5/12/19, Michael Niedermayer wrote: > >> On Sun, May 12, 2019 at 11:00:51PM +0200, Nicolas George wrote: > >>> Marton Balint (12019-05-12): > >>> > Yeah, you are right, what I had in mind was this: > >>> > > >>> > apitch === asetrate,aresample,atempo > >>> > >>> Exactly. And reciprocally, atempo = apitch+asetrate+aresample. > >>> > >>> Furthermore, since it works with the spectrum, the filter that does the > >>> hard work can probably easily output at any sample rate, at a cost much > >>> lower than resampling afterwards. Therefore, it makes most sense to have > >>> a single filter with all three parameters (sample rate, speed adjustment > >>> and pitch adjustment). > >> > >> and if thats done in our resampler than that can also be combined with > >> changing the channel order, layout, sample type and so on. > >> Iam not sure its a good idea but purely technically it should be more > >> efficient to do it all together. > >> Also swresample already supports an external FFT resampler so it might > >> actually fit in there nicely and it might even allow us to remove an > >> external > >> dependancy without loosing a feature. (assuming the new FFT resampler > >> would be equally good) > >> > >> > > > > To make it work dynamically, filter must resample audio internally. > > > > Can I get testers? Iam not sure what you ask for exactly (which is why i didnt reply sooner) but if theres a patch for an implementation in swr then sure as the maintainer of swr i will test it. But iam not sure thats what you had in mind ... Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
On 2019-05-18 09:39, Michael Niedermayer wrote: > Fixes: "null pointer dereference" > Fixes: > 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/v210dec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c > index bc1e1d34ff..5a33d8c089 100644 > --- a/libavcodec/v210dec.c > +++ b/libavcodec/v210dec.c > @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void > *data, int *got_frame, > && avpkt->size - 64 >= stride * avctx->height) > psrc += 64; > > -aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); > +aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); > if (aligned_input != s->aligned_input) { > s->aligned_input = aligned_input; > ff_v210dec_init(s); > Ah yes, that'll be needed after the recent addition of avx2. LGTM and sorry. I object to the commit message though because it isn't a "null pointer dereference" but if that is the error as reported by the tool then keep it as is. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/aacdec_template: skip apply_tns() if max_sfb is 0 (from previous header decode failure)
Fixes: NULL pointer dereference Fixes: 14723/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5654612436058112 Fixes: 14724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5712607111020544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/aacdec_template.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 721511c5e9..39d859e458 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -2493,6 +2493,9 @@ static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, INTFLOAT tmp[TNS_MAX_ORDER+1]; UINTFLOAT *coef = coef_param; +if(!mmm) +return; + for (w = 0; w < ics->num_windows; w++) { bottom = ics->num_swb; for (filt = 0; filt < tns->n_filt[w]; filt++) { -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/v210dec: Fix alignment check for AVX2
Fixes: "null pointer dereference" Fixes: 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/v210dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index bc1e1d34ff..5a33d8c089 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, && avpkt->size - 64 >= stride * avctx->height) psrc += 64; -aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); +aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); if (aligned_input != s->aligned_input) { s->aligned_input = aligned_input; ff_v210dec_init(s); -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3] libavfilter/dnn_native: Add multiple padding methods in dnn native
Add another two padding methods "VALID" and "SAME" as tensorflow, and keep the existing "SAME_CLAMP_TO_EDGE" method suggested by sr filter. As "SAME_CLAMP_TO_EDGE"can keep the output with the same size as original input, and gives a slight better result as mentioned by sr filter. Signed-off-by: Xuewei Meng --- libavfilter/dnn_backend_native.c | 52 libavfilter/dnn_backend_native.h | 3 ++ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c index 06fbdf368b..171a756385 100644 --- a/libavfilter/dnn_backend_native.c +++ b/libavfilter/dnn_backend_native.c @@ -61,6 +61,12 @@ static DNNReturnType set_input_output_native(void *model, DNNInputData *input, c return DNN_ERROR; } cur_channels = conv_params->output_num; + +if(conv_params->padding_method == VALID){ +int pad_size = conv_params->kernel_size - 1; +cur_height -= pad_size; +cur_width -= pad_size; +} break; case DEPTH_TO_SPACE: depth_to_space_params = (DepthToSpaceParams *)network->layers[layer].params; @@ -77,6 +83,10 @@ static DNNReturnType set_input_output_native(void *model, DNNInputData *input, c if (network->layers[layer].output){ av_freep(>layers[layer].output); } + +if(cur_height <= 0 || cur_width <= 0) +return DNN_ERROR; + network->layers[layer].output = av_malloc(cur_height * cur_width * cur_channels * sizeof(float)); if (!network->layers[layer].output){ return DNN_ERROR; @@ -154,13 +164,14 @@ DNNModel *ff_dnn_load_model_native(const char *model_filename) ff_dnn_free_model_native(); return NULL; } +conv_params->padding_method = (int32_t)avio_rl32(model_file_context); conv_params->activation = (int32_t)avio_rl32(model_file_context); conv_params->input_num = (int32_t)avio_rl32(model_file_context); conv_params->output_num = (int32_t)avio_rl32(model_file_context); conv_params->kernel_size = (int32_t)avio_rl32(model_file_context); kernel_size = conv_params->input_num * conv_params->output_num * conv_params->kernel_size * conv_params->kernel_size; -dnn_size += 16 + (kernel_size + conv_params->output_num << 2); +dnn_size += 20 + (kernel_size + conv_params->output_num << 2); if (dnn_size > file_size || conv_params->input_num <= 0 || conv_params->output_num <= 0 || conv_params->kernel_size <= 0){ avio_closep(_file_context); @@ -218,23 +229,35 @@ DNNModel *ff_dnn_load_model_native(const char *model_filename) static void convolve(const float *input, float *output, const ConvolutionalParams *conv_params, int width, int height) { -int y, x, n_filter, ch, kernel_y, kernel_x; int radius = conv_params->kernel_size >> 1; int src_linesize = width * conv_params->input_num; int filter_linesize = conv_params->kernel_size * conv_params->input_num; int filter_size = conv_params->kernel_size * filter_linesize; +int pad_size = (conv_params->padding_method == VALID) ? (conv_params->kernel_size - 1) / 2 : 0; -for (y = 0; y < height; ++y){ -for (x = 0; x < width; ++x){ -for (n_filter = 0; n_filter < conv_params->output_num; ++n_filter){ +for (int y = pad_size; y < height - pad_size; ++y){ +for (int x = pad_size; x < width - pad_size; ++x){ +for (int n_filter = 0; n_filter < conv_params->output_num; ++n_filter){ output[n_filter] = conv_params->biases[n_filter]; -for (ch = 0; ch < conv_params->input_num; ++ch){ -for (kernel_y = 0; kernel_y < conv_params->kernel_size; ++kernel_y){ -for (kernel_x = 0; kernel_x < conv_params->kernel_size; ++kernel_x){ -output[n_filter] += input[CLAMP_TO_EDGE(y + kernel_y - radius, height) * src_linesize + - CLAMP_TO_EDGE(x + kernel_x - radius, width) * conv_params->input_num + ch] * -conv_params->kernel[n_filter * filter_size + kernel_y * filter_linesize + -kernel_x * conv_params->input_num + ch]; + +for (int ch = 0; ch < conv_params->input_num; ++ch){ +for (int kernel_y = 0; kernel_y < conv_params->kernel_size; ++kernel_y){ +for (int kernel_x = 0; kernel_x < conv_params->kernel_size; ++kernel_x){ +float input_pel; +if(conv_params->padding_method == SAME_CLAMP_TO_EDGE){ +