[FFmpeg-devel] [PATCH] avcodec/mpeg: Initialize quarter_sample parameter from previous thread.

2018-12-12 Thread Andriy Gelman
Fixes #7410. The value of sub-pixel precision for me/mc can change during an Intra frame. In multi-threaded decoding this change is not propagated to other frame threads causing decoding artifacts. This patch initializes the sub-pixel precision parameter from previous thread, which fixes the

[FFmpeg-devel] [PATCH] avcodec/packet: initialize payload size to zero

2019-04-02 Thread Andriy Gelman
From: Andriy Gelman --- libavcodec/avpacket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 8f0603df78..6ae092ed31 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -44,6 +44,7 @@ FF_ENABLE_DEPRECATION_WARNINGS pkt

[FFmpeg-devel] [PATCH] avformat/utils: Use av_packet_move_ref for packet ownership transfer

2019-04-04 Thread Andriy Gelman
From: Andriy Gelman This commit replaces packet assignment operator with av_packet_move_ref when there is a packet ownership transfer. --- Aims to address a TODO in libavformat/utils.c about using av_packet_mov_ref instead of assignment operator. libavformat/utils.c | 28

[FFmpeg-devel] [PATCH] avformat/mpegts.c: reduce buffering during initialization

2019-03-04 Thread andriy . gelman
From: Andriy Gelman Reduces buffering during estimation of mpegts raw_packet_size parameter. Instead of buffering a fixed 8192 bytes, calculate probe scores on a smaller buffer. Increase buffer size until probe score is greater than minimum value. --- libavformat/mpegts.c | 82

[FFmpeg-devel] [PATCH v2] avformat/mpegts: reduce buffering during initialization

2019-03-05 Thread Andriy Gelman
From: Andriy Gelman Reduces buffering latency with low bitrate streams, where 8192 bytes can mean several seconds. --- libavformat/mpegts.c | 60 +++- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat

Re: [FFmpeg-devel] [PATCH v2] avformat/mpegts: reduce buffering during initialization

2019-03-06 Thread Andriy Gelman
timate parameter if not set by user. Regards, Andriy On Wed, 6 Mar 2019 at 02:51, Carl Eugen Hoyos wrote: > 2019-03-06 7:01 GMT+01:00, Andriy Gelman : > > From: Andriy Gelman > > > > Reduces buffering latency with low bitrate streams, where > > 8192 bytes ca

Re: [FFmpeg-devel] [PATCH] avformat/mpegts.c: reduce buffering during initialization

2019-03-06 Thread Andriy Gelman
e use of margin address your comment? > the use of AVProbeData does not seem to help this code in any way I've removed AVProbeData and added buffer to stack. Regards, Andriy On Tue, 5 Mar 2019 at 19:25, Michael Niedermayer wrote: > On Mon, Mar 04, 2019 at 10:21:01PM -0500,

[FFmpeg-devel] [PATCH v3] avformat/mpegts: reduce buffering during initialization

2019-03-06 Thread Andriy Gelman
From: Andriy Gelman Reduces buffering latency with low bitrate streams, where 8192 bytes can mean several seconds. --- libavformat/mpegts.c | 60 +++- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat

Re: [FFmpeg-devel] [PATCH] avformat/mpegts.c: reduce buffering during initialization

2019-03-05 Thread Andriy Gelman
n Balint wrote: > > > On Mon, 4 Mar 2019, andriy.gel...@gmail.com wrote: > > > From: Andriy Gelman > > > > Reduces buffering during estimation of mpegts raw_packet_size > > parameter. Instead of buffering a fixed 8192 bytes, calculate > > probe scores

[FFmpeg-devel] [PATCH v5] avformat/mpegts: reduce buffering during initialization

2019-03-08 Thread Andriy Gelman
From: Andriy Gelman Reduces buffering latency with low bitrate streams, where 8192 bytes can mean several seconds. --- libavformat/mpegts.c | 59 +++- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat

[FFmpeg-devel] [PATCH v4] avformat/mpegts: reduce buffering during initialization

2019-03-07 Thread Andriy Gelman
From: Andriy Gelman Reduces buffering latency with low bitrate streams, where 8192 bytes can mean several seconds. --- libavformat/mpegts.c | 59 +++- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat

[FFmpeg-devel] Concatenate NAL units in av_write_frame call

2019-04-10 Thread Andriy Gelman
Hello, I've been working with HEVC + mpegts at low bitrates 10-20kbps. At these bitrates, mpegts can create a substantial overhead due to the 188 byte frame size (i.e. a NAL unit of 200 bytes will get rounded up to 376 bytes). I've tried to get around this by concatenating multiple NAL

[FFmpeg-devel] [PATCH v2] avformat/utils: Use av_packet_move_ref for packet ownership transfer

2019-04-08 Thread Andriy Gelman
From: Andriy Gelman This commit replaces packet assignment operator with av_packet_move_ref when there is a packet ownership transfer. --- Michael, the update patch now has correct behavior for ticket 4221. libavformat/utils.c | 30 -- 1 file changed, 16 insertions

Re: [FFmpeg-devel] [PATCH v2 2/2] fftools/ffmpeg: add support for per frame rotation and flip

2019-05-15 Thread Andriy Gelman
On Tue, 14. May 22:36, Jun Li wrote: > Fix #6945 > Current implementaion for autorotate works fine for stream > level rotataion but no support for frame level operation > and frame flip. This patch is for adding flip support and > per frame operations. > --- > fftools/cmdutils.c | 9 ++--- >

Re: [FFmpeg-devel] [PATCH v3 2/2] fftools/ffmpeg: add support for per frame rotation and flip

2019-05-16 Thread Andriy Gelman
Hi Jun, On Thu, 16. May 00:12, Jun Li wrote: > Fix #6945 > Current implementaion for autorotate works fine for stream > level rotataion but no support for frame level operation > and frame flip. This patch is for adding flip support and > per frame operations. > --- > fftools/cmdutils.c |

Re: [FFmpeg-devel] [PATCH v2 2/2] fftools/ffmpeg: add support for per frame rotation and flip

2019-05-15 Thread Andriy Gelman
On Wed, 15. May 11:57, Jun Li wrote: > On Wed, May 15, 2019 at 11:45 AM Andriy Gelman > wrote: > > > On Tue, 14. May 22:36, Jun Li wrote: > > > Fix #6945 > > > Current implementaion for autorotate works fine for stream > > > level rotataio

Re: [FFmpeg-devel] [PATCH v3 2/2] fftools/ffmpeg: add support for per frame rotation and flip

2019-05-16 Thread Andriy Gelman
On Thu, 16. May 18:28, Jun Li wrote: > On Thu, May 16, 2019 at 12:54 PM Andriy Gelman > wrote: > > > Hi Jun, > > > > On Thu, 16. May 00:12, Jun Li wrote: > > > Fix #6945 > > > Current implementaion for autorotate works fine for stream > &g

Re: [FFmpeg-devel] [PATCH v2 1/2] libavformat/utils: Interpolate missing timestamps in H264 and HEVC when no b-frames observed

2019-05-15 Thread Andriy Gelman
On Thu, 16. May 00:43, Michael Niedermayer wrote: > On Tue, May 14, 2019 at 05:54:21PM -0400, Andriy Gelman wrote: > > From: Andriy Gelman > > > > Fixes Ticket #7895. > > > > Currently, timestamp interpolation is disabled by default in H264 and > > H

Re: [FFmpeg-devel] [PATCH] libavformat/mpegtsenc: new interlaced mux mode

2019-06-11 Thread Andriy Gelman
Hello, On Mon, 10. Jun 17:29, Andreas Håkon wrote: > Hi, > > Here is a list of comments on this patch: > (Note: I use for all the tests the file > https://samples.ffmpeg.org/HDTV/bshi01.tp) > > - By default the current behavior is selected. You can verify that this > patch doesn’t alter the

Re: [FFmpeg-devel] [PATCH v2 1/2] libavformat/utils: Interpolate missing timestamps in H264 and HEVC when no b-frames observed

2019-06-15 Thread Andriy Gelman
Michael, On Thu, 16. May 00:43, Michael Niedermayer wrote: > On Tue, May 14, 2019 at 05:54:21PM -0400, Andriy Gelman wrote: > > From: Andriy Gelman > > > > Fixes Ticket #7895. > > > > Currently, timestamp interpolation is disabled by default in H264 and > &

[FFmpeg-devel] [PATCH] libavformat/utils: Interpolate missing timestamps in H264 and HEVC when no b-frames observed.

2019-05-11 Thread Andriy Gelman
From: Andriy Gelman Fixes Ticket #7895. Currently, timestamp interpolation is disabled by default in H264 and HEVC. This creates playback issues when the demuxer does not output a valid timestamp. This patch allows interpolation when no b-frames have been observed during decoding, which fixes

Re: [FFmpeg-devel] [PATCH] libavformat/utils: Interpolate missing timestamps in H264 and HEVC when no b-frames observed.

2019-05-13 Thread Andriy Gelman
Hello, On Mon, 13. May 12:04, Michael Niedermayer wrote: > On Sat, May 11, 2019 at 11:20:51PM -0400, Andriy Gelman wrote: > > From: Andriy Gelman > > > > Fixes Ticket #7895. > > > > Currently, timestamp interpolation is disabled by default in H264 and > &

[FFmpeg-devel] [PATCH v2 1/2] libavformat/utils: Interpolate missing timestamps in H264 and HEVC when no b-frames observed

2019-05-14 Thread Andriy Gelman
From: Andriy Gelman Fixes Ticket #7895. Currently, timestamp interpolation is disabled by default in H264 and HEVC. This creates playback issues when the demuxer does not output a valid timestamp. This patch allows interpolation when no b-frames have been observed during decoding, which fixes

Re: [FFmpeg-devel] [PATCH v2 2/2] tests/fate: Add fate test for timestamp interpolation

2019-05-14 Thread Andriy Gelman
Hello, On Tue, 14. May 17:54, Andriy Gelman wrote: > From: Andriy Gelman > > This test verifies that missing timestamps from mpegts are interpolated > for a HEVC stream. > --- > tests/fate/mpegts.mak | 7 ++ > tests/ref/fate/mpegts-p

[FFmpeg-devel] [PATCH v2 2/2] tests/fate: Add fate test for timestamp interpolation

2019-05-14 Thread Andriy Gelman
From: Andriy Gelman This test verifies that missing timestamps from mpegts are interpolated for a HEVC stream. --- tests/fate/mpegts.mak | 7 ++ tests/ref/fate/mpegts-probe-interptime | 154 + 2 files changed, 161 insertions(+) create mode 100644

Re: [FFmpeg-devel] [PATCH v3] avformat/utils: Use av_packet_move_ref for packet ownership transfer

2019-05-19 Thread Andriy Gelman
On Sun, 21. Apr 10:14, Andriy Gelman wrote: > From: Andriy Gelman > > During AVPacket assignment, it is currently not clear when the lhs takes > ownership of the packet. This commit replaces assignment with an > explicit av_packet_move_ref call when there is an ownership tran

Re: [FFmpeg-devel] [PATCH v2 2/2] fftools/ffmpeg: add support for per frame rotation and flip

2019-05-15 Thread Andriy Gelman
On Tue, 14. May 22:36, Jun Li wrote: > Fix #6945 > Current implementaion for autorotate works fine for stream > level rotataion but no support for frame level operation > and frame flip. This patch is for adding flip support and > per frame operations. > --- > fftools/cmdutils.c | 9 ++--- >

Re: [FFmpeg-devel] [PATCH v2] avformat/utils: Use av_packet_move_ref for packet ownership transfer

2019-04-19 Thread Andriy Gelman
On Mon, 08. Apr 14:03, Andriy Gelman wrote: > From: Andriy Gelman > > This commit replaces packet assignment operator with av_packet_move_ref > when there is a packet ownership transfer. > --- > Michael, the update patch now has correct behavior for ticket 4221. > >

[FFmpeg-devel] [PATCH] avformat/rawenc: avoid divide by 0 when writing adx trailer

2019-07-13 Thread Andriy Gelman
From: Andriy Gelman Fixes #7985 This patch checks that the number of audio channels is not zero when writing the total sample count in adx header. --- libavformat/rawenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 993d232b70

Re: [FFmpeg-devel] [PATCH] avformat/rawenc: avoid divide by 0 when writing adx trailer

2019-07-13 Thread Andriy Gelman
On Sat, 13. Jul 23:10, Andriy Gelman wrote: > On Sun, 14. Jul 00:40, Carl Eugen Hoyos wrote: > > > > > Am 13.07.2019 um 22:50 schrieb Andriy Gelman : > > > > > > From: Andriy Gelman > > > > > > Fixes #7985 > > > > Did you c

Re: [FFmpeg-devel] [PATCH] avformat/rawenc: avoid divide by 0 when writing adx trailer

2019-07-13 Thread Andriy Gelman
On Sun, 14. Jul 00:40, Carl Eugen Hoyos wrote: > > > Am 13.07.2019 um 22:50 schrieb Andriy Gelman : > > > > From: Andriy Gelman > > > > Fixes #7985 > > Did you check the patch mentioned there? Sorry, I missed that you sent a patch. I appl

[FFmpeg-devel] [PATCH v3] avformat/utils: Use av_packet_move_ref for packet ownership transfer

2019-04-21 Thread Andriy Gelman
From: Andriy Gelman During AVPacket assignment, it is currently not clear when the lhs takes ownership of the packet. This commit replaces assignment with an explicit av_packet_move_ref call when there is an ownership transfer to clear the distinction. --- libavformat/utils.c | 30

Re: [FFmpeg-devel] [PATCH 1/4] avformat/mpegtsenc: fix incorrect PCR selection with multiple programs

2019-08-02 Thread Andriy Gelman
On Sat, 03. Aug 00:37, Marton Balint wrote: > The MPEG-TS muxer had a serious bug related to the use of multiple programs: > in that case, the PCR pid selection was incomplete for all services except > one. > This patch solves this problem and selects a stream to become PCR for each > service,

Re: [FFmpeg-devel] [PATCHv2 1/4] avformat/mpegtsenc: fix incorrect PCR selection with multiple programs

2019-08-03 Thread Andriy Gelman
On Sat, 03. Aug 10:19, Marton Balint wrote: > The MPEG-TS muxer had a serious bug related to the use of multiple programs: > in that case, the PCR pid selection was incomplete for all services except > one. > This patch solves this problem and selects a stream to become PCR for each > service,

Re: [FFmpeg-devel] [PATCH] hevc_mp4toannexb: Do not duplicate parameter sets

2019-08-18 Thread Andriy Gelman
Andreas, On Tue, 13. Aug 06:24, Andreas Rheinhardt wrote: > Andriy Gelman: > > Andreas, > > > > On Sun, 21. Jul 10:47, Andreas Rheinhardt wrote: > >> Andriy Gelman: > >>> From: Andriy Gelman > >>> > >>> Fixes #7799 >

Re: [FFmpeg-devel] [PATCH] hevc_mp4toannexb: Do not duplicate parameter sets

2019-08-12 Thread Andriy Gelman
Andreas, On Sun, 21. Jul 10:47, Andreas Rheinhardt wrote: > Andriy Gelman: > > From: Andriy Gelman > > > > Fixes #7799 > > > > Currently, the mp4toannexb filter always inserts extradata at the start > > of each IRAP unit. This can lead to duplication of p

[FFmpeg-devel] [PATCH v3] libavformat: Add ZeroMQ as a protocol option

2019-08-19 Thread Andriy Gelman
Minor changes in v3: 1. Removed tab character from as per feedback 2. Removed unused timeout variable from ZMQContext Andriy >From 66c11c12fcfa8a7fbb3c8c09d23c017992229a99 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30 Jul 2019 14:39:32 -0400 Subject: [PATCH] libavformat:

Re: [FFmpeg-devel] [PATCH v2] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-08-19 Thread Andriy Gelman
On Tue, 20. Aug 01:01, Michael Niedermayer wrote: > On Sun, Aug 18, 2019 at 10:37:57PM -0400, Andriy Gelman wrote: > [...] > > diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak > > index 559c3898bc..46f130f4d1 100644 > > --- a/tests/fate/hevc.mak > > +++ b/tes

[FFmpeg-devel] [PATCH v2] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-08-18 Thread Andriy Gelman
From: Andriy Gelman Fixes #7799 Currently, the mp4toannexb filter always inserts the same extradata at the start of the first IRAP unit. As in ticket #7799, this can lead to decoding errors if modified parameter sets are signalled in-band. This commit keeps track of the vps/sps/pps parameter

Re: [FFmpeg-devel] [PATCH v2] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-08-20 Thread Andriy Gelman
Andreas, On Tue, 20. Aug 07:54, Andreas Rheinhardt wrote: > Hello, > > I have not looked at the *PS and the SEI stuff yet, but here is > already my review of the general code. > > Andriy Gelman: > > From: Andriy Gelman > > > > Fixes #7799 > > &g

Re: [FFmpeg-devel] [PATCH v2 5/8] avformat/utils: Fix memleaks II

2019-08-24 Thread Andriy Gelman
Andreas, On Mon, 19. Aug 23:56, Andreas Rheinhardt wrote: > Up until now, avformat_find_stream_info had a potential for memleaks: > When everything is fine, it read packets and (depending upon whether > AVFMT_FLAG_NOBUFFER was set) put them in a packet list or unreferenced > them when they were

[FFmpeg-devel] [PATCH v5] Add ZeroMQ as protocol option

2019-08-30 Thread Andriy Gelman
Changes in v5: - Use polling in a loop to check interrupt callback. - Remove timeout_send/timeout_recv options and update documentation. Thanks, Andriy >From a0c642f59c314c7ae53917f2b0d02bc6779009c2 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30 Jul 2019 14:39

Re: [FFmpeg-devel] [PATCH v4] Add ZeroMQ as protocol option

2019-08-30 Thread Andriy Gelman
On Thu, 29. Aug 21:01, Marton Balint wrote: > > > On Thu, 29 Aug 2019, Andriy Gelman wrote: > > > Changes in v4: > > - Use polling instead of non-blocking option for socket > >read/write operations. > > - Added pkt_size, timeout_send, timeout_recv o

[FFmpeg-devel] Blocking vs non-blocking modes in protocols

2019-09-01 Thread Andriy Gelman
Marton, Below are my notes on blocking and non-blocking modes in protocols. Proposed changes that I'd like to make are at the end. Thanks, Andriy ---General notes-- -blocking mode- - transfer_function deals with polling and timeout - block inside transfer_function for max

Re: [FFmpeg-devel] Blocking vs non-blocking modes in protocols

2019-09-02 Thread Andriy Gelman
Nicolas, thank you for clarifying On Mon, 02. Sep 17:21, Nicolas George wrote: > Andriy Gelman (12019-09-01): > > Below are my notes on blocking and non-blocking modes in protocols. Proposed > > changes that I'd like to make are at the end. > > > > Thanks, > >

Re: [FFmpeg-devel] [PATCH v2 7/8] avformat/utils: Remove unnecessary packet copies

2019-08-28 Thread Andriy Gelman
On Mon, 19. Aug 23:56, Andreas Rheinhardt wrote: > Up until now, read_frame_internal in avformat/utils.c uses a spare > packet on the stack that serves no real purpose: At no point in this > function is there a need for another packet besides the packet destined > for output: > 1. If the packet

[FFmpeg-devel] [PATCH v4] Add ZeroMQ as protocol option

2019-08-29 Thread Andriy Gelman
rom ca5aa5149b97152b15457b2f40c753c80e68e3de Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30 Jul 2019 14:39:32 -0400 Subject: [PATCH] libavformat: Add ZeroMQ as a protocol option Currently multiple clients are only supported by using a multicast destination address. An alternative is to str

Re: [FFmpeg-devel] [PATCH v5] Add ZeroMQ as protocol option

2019-08-31 Thread Andriy Gelman
On Sat, 31. Aug 01:59, Marton Balint wrote: > > > On Fri, 30 Aug 2019, Andriy Gelman wrote: > > > Changes in v5: > >- Use polling in a loop to check interrupt callback. > >- Remove timeout_send/timeout_recv options and update > > documentatio

Re: [FFmpeg-devel] [PATCH v4] Add ZeroMQ as protocol option

2019-08-31 Thread Andriy Gelman
On Sat, 31. Aug 03:20, Marton Balint wrote: > > > On Sat, 31 Aug 2019, Marton Balint wrote: > > > > > > > On Fri, 30 Aug 2019, Andriy Gelman wrote: > > > > > On Thu, 29. Aug 21:01, Marton Balint wrote: > > > >

[FFmpeg-devel] [PATCH v6] Add ZeroMQ as protocol option

2019-08-31 Thread Andriy Gelman
952 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30 Jul 2019 14:39:32 -0400 Subject: [PATCH] libavformat: Add ZeroMQ as a protocol option Currently multiple clients are only supported by using a multicast destination address. An alternative is to stream to a server which re-distribu

Re: [FFmpeg-devel] [PATCH v3] libavformat: Add ZeroMQ as a protocol option

2019-08-23 Thread Andriy Gelman
On Mon, 19. Aug 17:28, Andriy Gelman wrote: > Minor changes in v3: > 1. Removed tab character from as per feedback > 2. Removed unused timeout variable from ZMQContext > > Andriy > From 66c11c12fcfa8a7fbb3c8c09d23c017992229a99 Mon Sep 17 00:00:00 2001 > From: Andriy Ge

Re: [FFmpeg-devel] [PATCH v3] libavformat: Add ZeroMQ as a protocol option

2019-08-28 Thread Andriy Gelman
Marton, Thanks for reviewing this patch. On Sat, 24. Aug 19:33, Marton Balint wrote: > > > On Fri, 23 Aug 2019, Andriy Gelman wrote: > > > On Mon, 19. Aug 17:28, Andriy Gelman wrote: > > > Minor changes in v3: 1. Removed tab character from as per feedback >

Re: [FFmpeg-devel] [PATCH v3] libavformat: Add ZeroMQ as a protocol option

2019-08-28 Thread Andriy Gelman
On Thu, 29. Aug 02:28, Marton Balint wrote: > > > On Wed, 28 Aug 2019, Andriy Gelman wrote: > > > > > > +h->is_streamed = 1; > > > > > + > > > > > +av_strstart(uri, "zmq:", ); > > > > > +

Re: [FFmpeg-devel] [PATCH v6] Add ZeroMQ as protocol option

2019-09-04 Thread Andriy Gelman
On Wed, 04. Sep 13:39, Moritz Barsnick wrote: > You and the patch submitter failed to reset MICRO to 100 when bumping > MINOR. Too late now. sorry for this Andriy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH v3] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-04 Thread Andriy Gelman
. Thanks, Andriy >From fd53cb5140aaeb71a55686b419c3e57ddebf5eb5 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Sun, 18 Aug 2019 21:48:43 -0400 Subject: [PATCH 1/2] hevc_mp4toannexb: Insert correct parameter sets before IRAP Fixes #7799 Currently, the mp4toannexb filter always inse

Re: [FFmpeg-devel] [PATCH v2] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-04 Thread Andriy Gelman
Andreas, Thanks again for reviewing this patch. On Tue, 20. Aug 07:54, Andreas Rheinhardt wrote: > Hello, > > I have not looked at the *PS and the SEI stuff yet, but here is > already my review of the general code. > > Andriy Gelman: > > From: Andriy Gelm

Re: [FFmpeg-devel] [PATCH v3] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-08 Thread Andriy Gelman
On Sun, 08. Sep 14:18, Andreas Rheinhardt wrote: > Andriy Gelman: > > Changes in v3: > > Patch 1/2 > > - Fixed a bug where rbsp payload (without 0x03) was > > written into packet instead of the raw data (with > > 0x03). > > - Segm

Re: [FFmpeg-devel] [PATCH v2] avcodec/h2645_parse: refine the code for better readiablity

2019-09-10 Thread Andriy Gelman
On Tue, 10. Sep 13:38, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavcodec/h2645_parse.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c > index

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: simplify memset call

2019-09-10 Thread Andriy Gelman
On Sat, 07. Sep 15:55, Andriy Gelman wrote: > From: Andriy Gelman > > Removed (new_size - pkt->nals_allocated) because this value is always 1 > during the call. > --- > libavcodec/h2645_parse.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --

[FFmpeg-devel] [PATCH] avcodec/h2645_parse: simplify memset call

2019-09-07 Thread Andriy Gelman
From: Andriy Gelman Removed (new_size - pkt->nals_allocated) because this value is always 1 during the call. --- libavcodec/h2645_parse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index 307e8643e6..ef6a6b4b4f 100

Re: [FFmpeg-devel] [PATCH v1] swscale/swscale: various cosmetics for the code style

2019-09-07 Thread Andriy Gelman
On Sat, 07. Sep 23:50, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libswscale/swscale.c | 40 > 1 file changed, 12 insertions(+), 28 deletions(-) > > diff --git a/libswscale/swscale.c b/libswscale/swscale.c >

Re: [FFmpeg-devel] [PATCH v4 2/4] fate: Overwrite output file in hevc-bsf-mp4toannexb test

2019-09-18 Thread Andriy Gelman
On Wed, 18. Sep 22:34, Carl Eugen Hoyos wrote: > Am Mi., 18. Sept. 2019 um 21:38 Uhr schrieb Andriy Gelman > : > > > > From: Andriy Gelman > > > > Overwrite tests/data/fate/hevc-bsf-mp4toannexb.out in case it exists. > > --- > > tests/fate/hevc.mak | 2

Re: [FFmpeg-devel] [PATCH v4 2/4] fate: Overwrite output file in hevc-bsf-mp4toannexb test

2019-09-18 Thread Andriy Gelman
On Wed, 18. Sep 23:39, Carl Eugen Hoyos wrote: > Am Mi., 18. Sept. 2019 um 23:15 Uhr schrieb Andriy Gelman > : > > > > On Wed, 18. Sep 22:34, Carl Eugen Hoyos wrote: > > > Am Mi., 18. Sept. 2019 um 21:38 Uhr schrieb Andriy Gelman > > > :

[FFmpeg-devel] [PATCH v4 4/4] hevc_mp4toannexb: Parse extradata directly from HVCC format

2019-09-18 Thread Andriy Gelman
From: Andriy Gelman Since the original extradata is in HVCC format, there is no need to segment the output extradata into nal units. --- libavcodec/hevc_mp4toannexb_bsf.c | 66 --- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/libavcodec

[FFmpeg-devel] [PATCH v4 3/4] fate: Add tests for hevc_mp4annexb bsf

2019-09-18 Thread Andriy Gelman
From: Andriy Gelman Test hevc-mp4annexb-pps: Test contains 63 PPS that are signalled in extradata. Different PPS are referenced by the VCL nal units during the mp4 to annexb conversion. Test hevc-mp4annexb-sps: Access units contain PPS that reference different cached SPS nal units. --- tests

[FFmpeg-devel] [PATCH v4 0/4] hevc_mp4toannexb: Insert correct parameter sets

2019-09-18 Thread Andriy Gelman
Changes in v4: - Always insert SEI from extradata before IRAP (same approach as original code). New SEIs are inserted before IRAP, or forwarded after the nal unit. - Before writing each VCL, I check whether the PPS has already been signalled in the CVS. If it hasn't been

[FFmpeg-devel] [PATCH v4 2/4] fate: Overwrite output file in hevc-bsf-mp4toannexb test

2019-09-18 Thread Andriy Gelman
From: Andriy Gelman Overwrite tests/data/fate/hevc-bsf-mp4toannexb.out in case it exists. --- tests/fate/hevc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 4f812b0834..b11e209be0 100644 --- a/tests/fate/hevc.mak +++ b

[FFmpeg-devel] [PATCH v4 1/4] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-18 Thread Andriy Gelman
From: Andriy Gelman Fixes #7799 Currently, the mp4toannexb filter always inserts the same extradata at the start of the first IRAP unit. As in ticket #7799, this can lead to decoding errors if modified parameter sets are signalled in-band. This commit keeps track of the VPS/SPS/PPS parameter

Re: [FFmpeg-devel] [PATCH v3] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-08 Thread Andriy Gelman
:18, Andreas Rheinhardt wrote: > Andriy Gelman: > > Changes in v3: > > Patch 1/2 > > - Fixed a bug where rbsp payload (without 0x03) was > > written into packet instead of the raw data (with > > 0x03). > > - Segment packe

[FFmpeg-devel] [PATCH] libavformat: Add ZeroMQ as a protocol option

2019-07-30 Thread Andriy Gelman
zmq:tcp://127.0.0.1: Multiple clients can then connect with: $ ./ffplay zmq:tcp://127.0.0.1: I would be happy to maintain the code. Thanks, Andriy >From 366f705945f9b2c40158730ec18ac9259bca2695 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30 Jul 2019 14:39:32 -0400 Subj

[FFmpeg-devel] [PATCH] lavfi/zmq: Avoid mem copy past the end of input buffer

2019-07-30 Thread Andriy Gelman
From: Andriy Gelman --- libavfilter/f_zmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 89da5bef06..744c721305 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -139,7 +139,7 @@ static int recv_msg

[FFmpeg-devel] [PATCH 2/2] avformat/mpegtsenc: Remove redundant goto after malloc fail

2019-07-31 Thread Andriy Gelman
From: Andriy Gelman --- libavformat/mpegtsenc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index fc0ea225c6..1541a7a073 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -846,10 +846,8 @@ static

[FFmpeg-devel] [PATCH 1/2] lavfi/zmq: Avoid mem copy past the end of input buffer

2019-07-31 Thread Andriy Gelman
From: Andriy Gelman --- libavfilter/f_zmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 89da5bef06..744c721305 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -139,7 +139,7 @@ static int recv_msg

Re: [FFmpeg-devel] libavformat/mpegtsenc: fix incorrect PCR with multiple programs [v4]

2019-07-31 Thread Andriy Gelman
tests pointed by Michael Niedermayer (Sample_cut.ts) and > Andriy Gelman (day_flight.mpg). > > I hope this time the patch will be accepted. > Regards. > A.H. > > --- > From 8381febd0e881cfcd53583b0ccdd7eb2c580e422 Mon Sep 17 00:00:00 2001 > From: Andreas Hakon > D

Re: [FFmpeg-devel] libavformat/mpegtsenc: fix incorrect PCR with multiple programs [v3]

2019-07-29 Thread Andriy Gelman
Andreas, On Sun, 28. Jul 19:07, Andreas Håkon wrote: > Hi, > > This last version fixes the small bug discovered by Michael Niedermayer: > https://patchwork.ffmpeg.org/patch/14099/ > > This version is finally clean. > > Regards. > A.H. > > --- > From 08565b81aa2b6d75043e5e984da143480891c3b0

Re: [FFmpeg-devel] [PATCH] libavformat/mpegtsenc: fix incorrect PCR with multiple programs

2019-07-27 Thread Andriy Gelman
Andreas, On Mon, 22. Jul 12:22, Andreas Håkon wrote: > Hi, > > Based on the discussion of my previous patch > https://patchwork.ffmpeg.org/patch/13487/ > Here I publish a first part of the patch that only addresses the PCR problem. Thanks for splitting the patch set. > > This supersedes

Re: [FFmpeg-devel] [PATCH v2] libavformat: Add ZeroMQ as a protocol option

2019-08-06 Thread Andriy Gelman
On Sun, 04. Aug 14:36, Andriy Gelman wrote: > Changes in v2: > 1. Replaced zmq_poll with zmq_msg_recv. > 2. Remove user timeout option as zmq_msg_recv(.., .., ZMQ_DONTWAIT) is a > non-blocking call. > 3. Updated docs. > > Andriy > > From 53e6e00d30c9fbf51

[FFmpeg-devel] [PATCH] tools/zmqsend: Avoid mem copy past the end of input buffer

2019-08-08 Thread Andriy Gelman
From: Andriy Gelman This patch avoids a read past the end of the input buffer in memcpy since the size of the received zmq message is recv_buf_size - 1. --- tools/zmqsend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/zmqsend.c b/tools/zmqsend.c index 7bd7fe4199

Re: [FFmpeg-devel] libavformat/mpegtsenc: fix incorrect PCR with multiple programs [v4]

2019-08-01 Thread Andriy Gelman
Andreas, On Thu, 01. Aug 08:24, Andreas Håkon wrote: > Hi Andriy, > > > ‐‐‐ Original Message ‐‐‐ > On Thursday, 1 de August de 2019 0:23, Andriy Gelman > wrote: > > > > +for (i = 0; i < ts->nb_services; i++) { > > > +serv

[FFmpeg-devel] [PATCH v2] libavformat: Add ZeroMQ as a protocol option

2019-08-04 Thread Andriy Gelman
Changes in v2: 1. Replaced zmq_poll with zmq_msg_recv. 2. Remove user timeout option as zmq_msg_recv(.., .., ZMQ_DONTWAIT) is a non-blocking call. 3. Updated docs. Andriy >From 53e6e00d30c9fbf5127eea9d377686d37e981c0c Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 30

[FFmpeg-devel] [PATCH] hevc_mp4toannexb: Do not duplicate parameter sets

2019-07-20 Thread Andriy Gelman
From: Andriy Gelman Fixes #7799 Currently, the mp4toannexb filter always inserts extradata at the start of each IRAP unit. This can lead to duplication of parameter sets if the demuxed packet from mdat atom already contains a version of the parameters. As in ticket #7799 this can also lead

[FFmpeg-devel] [PATCH] avcodec/hevc_ps: Remove dead code in vps_id check

2019-09-20 Thread Andriy Gelman
From: Andriy Gelman Since reading 4 bits always returns a value in the range [0, 15], the check for vps_id >= HEVC_MAX_VPS_COUNT, where HEVC_MAX_VPS_COUNT = 16, is redudant. --- libavcodec/hevc_ps.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libavco

Re: [FFmpeg-devel] [PATCH v2] avcodec/hevc_ps: Remove dead code in vps_id check

2019-09-26 Thread Andriy Gelman
On Sun, 22. Sep 00:17, Andriy Gelman wrote: > From: Andriy Gelman > > Since reading 4 bits always returns a value in the range [0, 15], the > check for vps_id >= HEVC_MAX_VPS_COUNT, where HEVC_MAX_VPS_COUNT = 16, is > redundant. > > Signed-off-by: Andriy Gelman >

[FFmpeg-devel] [PATCH v5 1/3] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-09-26 Thread Andriy Gelman
From: Andriy Gelman Fixes #7799 Currently, the mp4toannexb filter always inserts the same extradata at the start of the first IRAP unit. As in ticket #7799, this can lead to decoding errors if modified parameter sets are signalled in-band. This commit keeps track of the VPS/SPS/PPS parameter

[FFmpeg-devel] [PATCH v5 2/3] fate: Add tests for hevc_mp4annexb bsf

2019-09-26 Thread Andriy Gelman
From: Andriy Gelman Test hevc-mp4annexb-pps: Test contains 64 PPS that are signalled in extradata. Different PPS are referenced by the VCL nal units during the mp4 to annexb conversion. Test hevc-mp4annexb-sps: Access units contain PPS that reference different cached SPS nal units. --- tests

[FFmpeg-devel] [PATCH v5 0/3] hevc_mp4toannexb: Insert correct parameter sets

2019-09-26 Thread Andriy Gelman
Changes to v5: - Remove -y from new fate tests so that they are in the same format as other md5 tests. And removed proposed change to existing fate test. -- Andriy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH v5 3/3] hevc_mp4toannexb: Parse extradata directly from HVCC format

2019-09-26 Thread Andriy Gelman
From: Andriy Gelman Since the original extradata is in HVCC format, there is no need to segment the output extradata into nal units. --- libavcodec/hevc_mp4toannexb_bsf.c | 66 --- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/libavcodec

[FFmpeg-devel] [PATCH] avformat: Add max_probe_packets option

2019-09-27 Thread Andriy Gelman
From: Andriy Gelman This allows the user to set a maximum number of buffered packets when probing a codec. It was a hard-coded parameter before this commit. --- doc/formats.texi| 4 libavformat/avformat.h | 7 +++ libavformat/internal.h | 2 -- libavformat

[FFmpeg-devel] [PATCH v2] avcodec/hevc_ps: Remove dead code in vps_id check

2019-09-21 Thread Andriy Gelman
From: Andriy Gelman Since reading 4 bits always returns a value in the range [0, 15], the check for vps_id >= HEVC_MAX_VPS_COUNT, where HEVC_MAX_VPS_COUNT = 16, is redundant. Signed-off-by: Andriy Gelman --- libavcodec/hevc_ps.c | 8 1 file changed, 8 deletions(-) diff --

Re: [FFmpeg-devel] [PATCH] avformat: Add max_probe_packets option

2019-10-02 Thread Andriy Gelman
On Fri, 27. Sep 16:26, Andriy Gelman wrote: > From: Andriy Gelman > > This allows the user to set a maximum number of buffered packets when > probing a codec. It was a hard-coded parameter before this commit. > --- > doc/formats.texi| 4 > libavforma

Re: [FFmpeg-devel] [PATCH v5 1/3] hevc_mp4toannexb: Insert correct parameter sets before IRAP

2019-10-02 Thread Andriy Gelman
On Thu, 26. Sep 14:09, Andriy Gelman wrote: > From: Andriy Gelman > > Fixes #7799 > > Currently, the mp4toannexb filter always inserts the same extradata at > the start of the first IRAP unit. As in ticket #7799, this can lead to > decoding errors if modified paramet

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: Remove dead code in vps_id check

2019-09-21 Thread Andriy Gelman
On Sun, 22. Sep 00:44, Carl Eugen Hoyos wrote: > Am Sa., 21. Sept. 2019 um 04:06 Uhr schrieb Andriy Gelman > : > > > > From: Andriy Gelman > > > > Since reading 4 bits always returns a value in the range [0, 15], the > > check for vps_id >= HEVC_MAX_V

Re: [FFmpeg-devel] [PATCH v1 04/14] avformat/avidec: add logging context to log

2019-09-30 Thread Andriy Gelman
On Mon, 30. Sep 15:17, Steven Liu wrote: > Signed-off-by: Steven Liu > --- > libavformat/avidec.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/libavformat/avidec.c b/libavformat/avidec.c > index e3cd844169..a492b3d037 100644 > --- a/libavformat/avidec.c

Re: [FFmpeg-devel] [PATCH 5/5] startcode: Filter out non-startcodes earlier

2019-06-30 Thread Andriy Gelman
Andreas, On Sun, 09. Jun 13:00, Andreas Rheinhardt wrote: > Up until now, the bitmasks used to initially find out when one needs > to take a closer look and search for startcodes were rather primitive: > If a block (of four or eight bytes, depending on the system) contained a > zero, it was

Re: [FFmpeg-devel] [PATCH] libavcodec/v4l2_m2m_enc:free v4l2 encode session properly when initialiZzation fails Fix ticket 8285 bug

2019-11-02 Thread Andriy Gelman
On Mon, 21. Oct 23:01, Colin NG wrote: > --- > libavcodec/v4l2_m2m_enc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c > index 474e6bef89..17fc3d30cf 100644 > --- a/libavcodec/v4l2_m2m_enc.c > +++ b/libavcodec/v4l2_m2m_enc.c > @@

[FFmpeg-devel] [PATCH v3] avdevice/v4l2: Remove av_assert0 when format not supported

2019-11-04 Thread Andriy Gelman
From: Andriy Gelman Before this commit an av_assert0 would fail if a v4l2 device did not support a target format. For example, ./ffmpeg -f v4l2 -codec:v h264 -i /dev/video0 -f mpegts - would signal an abort if /dev/video0 did not support h264. The new behaviour is to return an AVERROR(EINVAL

Re: [FFmpeg-devel] [PATCH] avdevice/v4l2: Change assert type when format not supported

2019-11-03 Thread Andriy Gelman
On Sun, 03. Nov 17:37, Nicolas George wrote: > Andriy Gelman (12019-11-03): > > From: Andriy Gelman > > > > Currently an av_assert0 is triggered when a target format is not > > supported by a v4l2 device. Replace by av_assert1 to fix this issue. > > > >

[FFmpeg-devel] [PATCH] avdevice/v4l2: Change assert type when format not supported

2019-11-03 Thread Andriy Gelman
From: Andriy Gelman Currently an av_assert0 is triggered when a target format is not supported by a v4l2 device. Replace by av_assert1 to fix this issue. Fixes #6629. --- libavdevice/v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/v4l2.c b/libavdevice

Re: [FFmpeg-devel] [PATCH V1 1/3] lavf/mpegtsenc: fix logic check error

2019-11-03 Thread Andriy Gelman
On Sun, 16. Jun 01:13, Jun Zhao wrote: > From: Jun Zhao > > fix the logic check error > > Signed-off-by: Jun Zhao > --- > libavformat/mpegtsenc.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c > index

[FFmpeg-devel] [PATCH v2] avdevice/v4l2: Remove av_assert0 when format not supported

2019-11-03 Thread Andriy Gelman
From: Andriy Gelman This commit removes an av_assert0 which signals an abort when a v4l2 device does not support a target format. For example: ./ffmpeg -f v4l2 -codec:v h264 -i /dev/video0 -f mpegts - will currently signal an abort if /dev/video0 does not support h264. The new behaviour

  1   2   3   4   5   6   >