Re: [FFmpeg-devel] [PATCH] avformat:matroskadec: use a define to mark the EBML length is unknown
On 23/02/2019 19:37, Michael Niedermayer wrote: On Sat, Feb 23, 2019 at 11:14:33AM +0100, Steve Lhomme wrote: From: Steve Lhomme --- libavformat/matroskadec.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) I think the commit message is a bit terse. This is not just a cosmetic change (which one might think from reading just the commit message and not looking at the change or related mails) Can you provide a more verbose commit message ? ill apply it with that thanks [...] How about this ? " avformat:matroskadec: use a define to mark the EBML length is unknown Unifying the way the EBML unknown length is signaled, rather than using two incompatible values. UINT64_MAX cannot be read as a valid EBML length with the current code. Co-authored-by: Steve Lhomme Co-authored-by: Dale Curtis " ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat:matroskadec: use a define to mark the EBML length is unknown
On Sun, Feb 24, 2019 at 09:23:48AM +0100, Steve Lhomme wrote: > On 23/02/2019 19:37, Michael Niedermayer wrote: > >On Sat, Feb 23, 2019 at 11:14:33AM +0100, Steve Lhomme wrote: > >>From: Steve Lhomme > >> > >>--- > >> libavformat/matroskadec.c | 12 +++- > >> 1 file changed, 7 insertions(+), 5 deletions(-) > >I think the commit message is a bit terse. This is not just a cosmetic > >change (which one might think from reading just the commit message and > >not looking at the change or related mails) > > > >Can you provide a more verbose commit message ? > >ill apply it with that > > > >thanks > > > >[...] > > How about this ? > > " > avformat:matroskadec: use a define to mark the EBML length is unknown > > Unifying the way the EBML unknown length is signaled, rather than using two > incompatible values. UINT64_MAX cannot be read as a valid EBML length with > the > current code. > > Co-authored-by: Steve Lhomme > Co-authored-by: Dale Curtis > > " will apply with this as commit message thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/mpegtsenc: factorize writing registration_descriptor
2019-02-23 20:36 GMT+01:00, Marton Balint : > Signed-off-by: Marton Balint > --- > libavformat/mpegtsenc.c | 50 > ++--- > 1 file changed, 18 insertions(+), 32 deletions(-) > > diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c > index 35a72002c8..099d003f42 100644 > --- a/libavformat/mpegtsenc.c > +++ b/libavformat/mpegtsenc.c > @@ -270,6 +270,18 @@ static void putbuf(uint8_t **q_ptr, const uint8_t *buf, > size_t len) > *q_ptr += len; > } > > +static void put_registration_descriptor(uint8_t **q_ptr, uint32_t tag) > +{ > +uint8_t *q = *q_ptr; > +*q++ = 0x05; /* MPEG-2 registration descriptor*/ > +*q++ = 4; > +*q++ = tag; > +*q++ = tag >> 8; > +*q++ = tag >> 16; > +*q++ = tag >> 24; > +*q_ptr = q; > +} > + > static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) > { > MpegTSWrite *ts = s->priv_data; > @@ -396,14 +408,8 @@ static int mpegts_write_pmt(AVFormatContext *s, > MpegTSService *service) > *q++=1; // 1 byte, all flags sets to 0 > *q++=0; // omit all fields... > } > -if (st->codecpar->codec_id==AV_CODEC_ID_S302M) { > -*q++ = 0x05; /* MPEG-2 registration descriptor*/ > -*q++ = 4; > -*q++ = 'B'; > -*q++ = 'S'; > -*q++ = 'S'; > -*q++ = 'D'; > -} > +if (st->codecpar->codec_id==AV_CODEC_ID_S302M) > +put_registration_descriptor(&q, MKTAG('B', 'S', 'S', 'D')); > if (st->codecpar->codec_id==AV_CODEC_ID_OPUS) { > /* 6 bytes registration descriptor, 4 bytes Opus audio > descriptor */ > if (q - data > SECTION_LENGTH - 6 - 4) { > @@ -411,12 +417,7 @@ static int mpegts_write_pmt(AVFormatContext *s, > MpegTSService *service) > break; > } > > -*q++ = 0x05; /* MPEG-2 registration descriptor*/ > -*q++ = 4; > -*q++ = 'O'; > -*q++ = 'p'; > -*q++ = 'u'; > -*q++ = 's'; > +put_registration_descriptor(&q, MKTAG('O', 'p', 'u', 's')); > > *q++ = 0x7f; /* DVB extension descriptor */ > *q++ = 2; > @@ -602,29 +603,14 @@ static int mpegts_write_pmt(AVFormatContext *s, > MpegTSService *service) > break; > case AVMEDIA_TYPE_VIDEO: > if (stream_type == STREAM_TYPE_VIDEO_DIRAC) { > -*q++ = 0x05; /*MPEG-2 registration descriptor*/ > -*q++ = 4; > -*q++ = 'd'; > -*q++ = 'r'; > -*q++ = 'a'; > -*q++ = 'c'; > +put_registration_descriptor(&q, MKTAG('d', 'r', 'a', 'c')); > } else if (stream_type == STREAM_TYPE_VIDEO_VC1) { > -*q++ = 0x05; /*MPEG-2 registration descriptor*/ > -*q++ = 4; > -*q++ = 'V'; > -*q++ = 'C'; > -*q++ = '-'; > -*q++ = '1'; > +put_registration_descriptor(&q, MKTAG('V', 'C', '-', '1')); > } > break; > case AVMEDIA_TYPE_DATA: > if (st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV) { > -*q++ = 0x05; /* MPEG-2 registration descriptor */ > -*q++ = 4; > -*q++ = 'K'; > -*q++ = 'L'; > -*q++ = 'V'; > -*q++ = 'A'; > +put_registration_descriptor(&q, MKTAG('K', 'L', 'V', 'A')); > } else if (st->codecpar->codec_id == AV_CODEC_ID_TIMED_ID3) { > const char *tag = "ID3 "; > *q++ = 0x26; /* metadata descriptor */ Looks fine if tested. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/qtrle : improve decoding speed of 24bpp and 32 bpp
2019-02-23 16:02 GMT+01:00, Martin Vignali : > Hello, > > Patch in attach, improve decoding speed of qtrle (also known as Mov > Animation) > > Can't test on big endian. Test on big endian is welcome. Patch 1 works on BE and lgtm. Patch 2 does not work, correct change for case 32 on le and be is: avctx->pix_fmt = AV_PIX_FMT_ARGB; The patch cannot have a speed impact on BE, please fix the commit message. Patch 3 and 4 work fine on BE. Do you expect the speedup for 3 on both 32 and 64bit systems? If not please correct the commit message. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] fate/proresenc_aw : Add fate test for interlace and 444 encoding
On Sat, Feb 23, 2019 at 07:10:06PM +0100, Martin Vignali wrote: > Hello, > > Patch in attach add fate test for interlace and 444 encoding > > All prores_aw encoding test can be test with : > > make fate-vsynth3-prores;make fate-vsynth2-prores;make > fate-vsynth1-prores;make fate-vsynth_lena-prores SAMPLES=fate-suite/;make > fate-vsynth3-prores_int;make fate-vsynth2-prores_int;make > fate-vsynth1-prores_int;make fate-vsynth_lena-prores_int > SAMPLES=fate-suite/;make fate-vsynth3-prores_444;make > fate-vsynth2-prores_444;make fate-vsynth1-prores_444;make > fate-vsynth_lena-prores_444 SAMPLES=fate-suite/;make > fate-vsynth3-prores_444_int;make fate-vsynth2-prores_444_int;make > fate-vsynth1-prores_444_int;make fate-vsynth_lena-prores_444_int > SAMPLES=fate-suite/ > > Martin it seems a make fate fails with this: (linux x86-64) --- ./tests/ref/vsynth/vsynth3-prores_int 2019-02-24 19:01:09.512273452 +0100 +++ tests/data/fate/vsynth3-prores_int 2019-02-24 19:01:46.068274557 +0100 @@ -1,4 +1,4 @@ -264713812dba67134321546191e04d20 *tests/data/fate/vsynth3-prores_int.mov -140180 tests/data/fate/vsynth3-prores_int.mov -0d5b3eb01390b7bfcff050c7c8de931e *tests/data/fate/vsynth3-prores_int.out.rawvideo -stddev:9.96 PSNR: 28.16 MAXDIFF: 242 bytes:86700/86700 +2396cb75873839b3c2c6cc9dd4dcd062 *tests/data/fate/vsynth3-prores_int.mov +144416 tests/data/fate/vsynth3-prores_int.mov +0af96cb0463485c4ae28c2fdd729f64a *tests/data/fate/vsynth3-prores_int.out.rawvideo +stddev:8.70 PSNR: 29.33 MAXDIFF: 233 bytes:86700/86700 Test vsynth3-prores_int failed. Look at tests/data/fate/vsynth3-prores_int.err for details. make: *** [fate-vsynth3-prores_int] Error 1 TESTvsynth3-svq1 --- ./tests/ref/vsynth/vsynth3-prores_444_int 2019-02-24 19:01:09.512273452 +0100 +++ tests/data/fate/vsynth3-prores_444_int 2019-02-24 19:01:46.068274557 +0100 @@ -1,4 +1,4 @@ -7545847af47cc52059a47d1018d3ee55 *tests/data/fate/vsynth3-prores_444_int.mov -215553 tests/data/fate/vsynth3-prores_444_int.mov -5bfc7730a33163a9900d591a1ba0a090 *tests/data/fate/vsynth3-prores_444_int.out.rawvideo -stddev:9.99 PSNR: 28.14 MAXDIFF: 242 bytes:86700/86700 +c707175556f0689e2b4edb7c55935d96 *tests/data/fate/vsynth3-prores_444_int.mov +231464 tests/data/fate/vsynth3-prores_444_int.mov +624c79ce621f75ae39ce370a30a14439 *tests/data/fate/vsynth3-prores_444_int.out.rawvideo +stddev:8.60 PSNR: 29.43 MAXDIFF: 234 bytes:86700/86700 Test vsynth3-prores_444_int failed. Look at tests/data/fate/vsynth3-prores_444_int.err for details. make: *** [fate-vsynth3-prores_444_int] Error 1 [...] -- 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 https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add some assertions to ensure pkt->data is not null if pkt->size > 0
On Sun, 17 Feb 2019, Marton Balint wrote: This should fix the following Coverity false positives: Coverity CID #1405450. Coverity CID #1430930. Signed-off-by: Marton Balint Ping for the series, will apply soon. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] avformat/utils: be more strict about stream specifiers
On Tue, 19 Feb 2019, Carl Eugen Hoyos wrote: 2019-02-18 22:43 GMT+01:00, Marton Balint : On Sun, 17 Feb 2019, Carl Eugen Hoyos wrote: 2019-02-17 20:55 GMT+01:00, Marton Balint : This reworks the code to be more strict about accepting stream specifiers. From now on we strictly enforce the syntax in the documentation up until the decisive part of the stream specifier. Therefore matching stream specifiers always need to be correct, non matching specifiers only need to be correct until the decisive part. Could you give an example for something that changes behaviour with this patch? ffmpeg -f lavfi -i testsrc -codec:voohoo mpeg2video out.avi Example for the next patch: ffmpeg -f lavfi -i testsrc -codec:a:xxx mpeg2video out.avi Thank you! Ping for the series, will apply soon.. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avformat/mpegtsenc: write format_identifier HEVC for HEVC streams
On Sat, 23 Feb 2019, Carl Eugen Hoyos wrote: Hi Marton! Am 23.02.2019 um 20:36 schrieb Marton Balint : This improves compatibility with some consumer TVs which apparently either search a HEVC descriptor (which our mpegts muxer can't generate) or a format specifier. Since the HEVC format specifier is not registered (but used in the wild), it is not written if strict_std_compliance is higher than normal. This fixes the issue in ticket #7744. Could you test yourself? If not, please wait for the OP to comment. User confirmed via email that the patch indeed fixed LG TV play. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avformat/mpegtsenc: write format_identifier HEVC for HEVC streams
> Am 24.02.2019 um 23:39 schrieb Marton Balint : > >> On Sat, 23 Feb 2019, Carl Eugen Hoyos wrote: >> >> Hi Marton! >> >>> Am 23.02.2019 um 20:36 schrieb Marton Balint : >>> This improves compatibility with some consumer TVs which apparently either >>> search a HEVC descriptor (which our mpegts muxer can't generate) or a format >>> specifier. >>> Since the HEVC format specifier is not registered (but used in the wild), >>> it is >>> not written if strict_std_compliance is higher than normal. >> >> >>> This fixes the issue in ticket #7744. >> >> Could you test yourself? >> >> If not, please wait for the OP to comment. > > User confirmed via email that the patch indeed fixed LG TV play. Thank you! No more comments from me, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/gdv: Check for truncated tags in decompress_5()
Testcase: 13169/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5666354038833152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/gdv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c index c5d80f43f6..183286b55f 100644 --- a/libavcodec/gdv.c +++ b/libavcodec/gdv.c @@ -294,6 +294,8 @@ static int decompress_5(AVCodecContext *avctx, unsigned skip) while (bytestream2_get_bytes_left_p(pb) > 0 && bytestream2_get_bytes_left(gb) > 0) { int tag = read_bits2(&bits, gb); +if (bytestream2_get_bytes_left(gb) < 1) +return AVERROR_INVALIDDATA; if (tag == 0) { bytestream2_put_byte(pb, bytestream2_get_byte(gb)); } else if (tag == 1) { -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/bethsoftvideo: Check block_type
Fixes: Timeout (17 seconds -> 1 second) Fixes: 13184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BETHSOFTVID_fuzzer-5711446296494080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/bethsoftvideo.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index 274516bf4d..e5a73f55a1 100644 --- a/libavcodec/bethsoftvideo.c +++ b/libavcodec/bethsoftvideo.c @@ -109,6 +109,11 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx, if(yoffset >= avctx->height) return AVERROR_INVALIDDATA; dst += vid->frame->linesize[0] * yoffset; +case VIDEO_P_FRAME: +case VIDEO_I_FRAME: +break; +default: +return AVERROR_INVALIDDATA; } // main code -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/dashenc: Added option to repeatedly publish master playlist
On 2/19/19 12:18 PM, Karthick J wrote: > The master playlist can be published at a specified interval with this option > --- > doc/muxers.texi | 3 +++ > libavformat/dashenc.c | 9 - > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 36010cf2d1..372fab2f92 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -315,6 +315,9 @@ This option will also try to comply with the above open > spec, till Apple's spec > Applicable only when @var{streaming} and @var{hls_playlist} options are > enabled. > This is an experimental feature. > > +@item -master_m3u8_publish_rate @var{master_m3u8_publish_rate} > +Publish master playlist repeatedly every after specified number of segment > intervals. > + > @end table > > @anchor{framecrc} > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index 37a7547b12..a0b44a0ec3 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -141,6 +141,7 @@ typedef struct DASHContext { > SegmentType segment_type_option; /* segment type as specified in > options */ > int ignore_io_errors; > int lhls; > +int master_publish_rate; > } DASHContext; > > static struct codec_string { > @@ -965,13 +966,18 @@ static int write_manifest(AVFormatContext *s, int final) > return ret; > } > > -if (c->hls_playlist && !c->master_playlist_created) { > +if (c->hls_playlist) { > char filename_hls[1024]; > const char *audio_group = "A1"; > char audio_codec_str[128] = "\0"; > int is_default = 1; > int max_audio_bitrate = 0; > > +// Publish master playlist only the configured rate > +if (c->master_playlist_created && (!c->master_publish_rate || > + c->streams[0].segment_index % c->master_publish_rate)) > +return 0; > + > if (*c->dirname) > snprintf(filename_hls, sizeof(filename_hls), "%smaster.m3u8", > c->dirname); > else > @@ -1798,6 +1804,7 @@ static const AVOption options[] = { > { "webm", "make segment file in WebM format", 0, AV_OPT_TYPE_CONST, > {.i64 = SEGMENT_TYPE_WEBM }, 0, UINT_MAX, E, "segment_type"}, > { "ignore_io_errors", "Ignore IO errors during open and write. Useful > for long-duration runs with network output", OFFSET(ignore_io_errors), > AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, > { "lhls", "Enable Low-latency HLS(Experimental). Adds #EXT-X-PREFETCH > tag with current segment's URI", OFFSET(lhls), AV_OPT_TYPE_BOOL, { .i64 = 0 > }, 0, 1, E }, > +{ "master_m3u8_publish_rate", "Publish master playlist every after this > many segment intervals", OFFSET(master_publish_rate), AV_OPT_TYPE_INT, {.i64 > = 0}, 0, UINT_MAX, E}, > { NULL }, > }; Pushed Patchset. > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel