Re: [FFmpeg-devel] [PATCH 3/3] tests: add README.md file with simple instructions

2022-04-04 Thread Thilo Borgmann
Hi, Am 03.04.22 um 15:59 schrieb Stefano Sabatini: --- tests/README.md | 48 1 file changed, 48 insertions(+) create mode 100644 tests/README.md diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 00..4bcae0b403

Re: [FFmpeg-devel] [PATCH v7 09/10] qsv: use a new method to create mfx session when using oneVPL

2022-04-04 Thread Hendrik Leppkes
On Tue, Mar 15, 2022 at 8:24 AM Xiang, Haihao wrote: > > On Fri, 2022-03-11 at 15:00 +0100, Hendrik Leppkes wrote: > > On Fri, Mar 11, 2022 at 2:43 PM Xiang, Haihao > > wrote: > > > > > > On Fri, 2022-03-11 at 09:35 +0100, Hendrik Leppkes wrote: > > > > On Fri, Mar 11, 2022 at 9:18 AM Xiang, Haih

[FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread Jan Ekström
From: Jan Ekström Additionally, they should not be probed, as this is essentially various types of binary data. Signed-off-by: Jan Ekström --- libavformat/mpegts.c| 48 + tests/fate/mpegts.mak | 3 ++ tests/ref/fate/mpegts-prob

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread Jan Ekström
On Mon, Apr 4, 2022 at 12:53 PM Jan Ekström wrote: > > From: Jan Ekström > > Additionally, they should not be probed, as this is essentially > various types of binary data. > > Signed-off-by: Jan Ekström > --- The test file referenced with this sort of signaling is available at: https://megumi

Re: [FFmpeg-devel] [PATCH 1/2] lafi/vf_edgedetect: Move some common functions into seperate file

2022-04-04 Thread Thilo Borgmann
Hi, v3 updated to current HEAD. -ThiloFrom ba103f0a51557aae4f1c242ccc394da6ddce64fb Mon Sep 17 00:00:00 2001 From: Thilo Borgmann Date: Tue, 30 Nov 2021 00:16:52 +0100 Subject: [PATCH v3 1/2] lafi/vf_edgedetect: Move some common functions into seperate file --- libavfilter/Makefile|

Re: [FFmpeg-devel] [PATCH 2/2] lavfi: Add blurriness filter

2022-04-04 Thread Thilo Borgmann
Hi, v3 updated to current HEAD. Named blurdetect filter now. Minor fixes on allocation and removed -f option. -ThiloFrom 1c81cf6f0586a3cc670e6d8354f35e5bdbe2a282 Mon Sep 17 00:00:00 2001 From: Thilo Borgmann Date: Mon, 4 Apr 2022 12:21:14 +0200 Subject: [PATCH v3 2/2] lavfi: Add blurdetect fil

Re: [FFmpeg-devel] [PATCH 2/2] lavfi: Add blurriness filter

2022-04-04 Thread Paul B Mahol
On Mon, Apr 4, 2022 at 12:25 PM Thilo Borgmann wrote: > Hi, > > v3 updated to current HEAD. > > Named blurdetect filter now. > Minor fixes on allocation and removed -f option. > Please make this per plane filtering, with default to measure only first plane. > -Thilo

[FFmpeg-devel] [RFC] Switching ffmpeg.c to a threaded architecture

2022-04-04 Thread Anton Khirnov
Hi, this WIP patchset is the first major part of my ongoing work to change ffmpeg.c architecture such that every - demuxer - decoder - filtergraph - encoder - muxer lives in its own thread. The advantages of doing this, beyond increased throughput, would be enforced separation between these compone

[FFmpeg-devel] [PATCH 02/49] fftools/ffmpeg: move a comment to a more appropriate place

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index afa1b012a6..13be32f0cf 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1238,6 +1238,11 @@ static void do_video_out(OutputFile *of, }

[FFmpeg-devel] [PATCH 01/49] fftools/ffmpeg: drop an obsolete hack

2022-04-04 Thread Anton Khirnov
Introduced in 05741d70c7a. All encoders should set the timestamps properly now, so it should never be necessary. --- fftools/ffmpeg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 6d62bdc7b0..afa1b012a6 100644 --- a/fftools/ffmpeg.c +++ b/fftools/f

[FFmpeg-devel] [PATCH 04/49] fftools/ffmpeg: pass the muxer context explicitly to some functions

2022-04-04 Thread Anton Khirnov
Stop accessing OutputFile.ctx. This will be useful in the following commits, where it will become hidden. --- fftools/ffmpeg_opt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 22c88287df..8e217af4ab 100644 --

[FFmpeg-devel] [PATCH 03/49] fftools/ffmpeg: stop using OutputStream.frame_number for streamcopy

2022-04-04 Thread Anton Khirnov
This field is currently used by checks - skipping packets before the first keyframe - skipping packets before start time to test whether any packets have been output already. But since frame_number is incremented after the bitstream filters are applied (which may involve delay), this use is incorre

[FFmpeg-devel] [PATCH 13/49] fftools/ffmpeg: refactor limiting output file size with -fs

2022-04-04 Thread Anton Khirnov
Move the file size checking code to ffmpeg_mux. Use the recently introduced of_filesize(), making this code consistent with the size shown by print_report(). --- fftools/ffmpeg.c | 4 +--- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_mux.c | 11 ++- fftools/ffmpeg_opt.c | 3 +-- 4

[FFmpeg-devel] [PATCH 14/49] fftools/ffmpeg: set want_sdp when initializing the muxer

2022-04-04 Thread Anton Khirnov
Allows making the variable local to ffmpeg_mux. --- fftools/ffmpeg.c | 9 + fftools/ffmpeg.h | 1 - fftools/ffmpeg_mux.c | 5 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 05e14c42c5..688e1c7e56 100644 --- a/fftools/f

[FFmpeg-devel] [PATCH 16/49] fftools/ffmpeg: move closing the file into of_write_trailer()

2022-04-04 Thread Anton Khirnov
The current code postpones closing the files until after printing the final report, which accesses the output file size. Deal with this by storing the final file size before closing the file. --- fftools/ffmpeg.c | 13 - fftools/ffmpeg_mux.c | 16 +++- 2 files changed,

[FFmpeg-devel] [PATCH 06/49] fftools/ffmpeg: move some muxing-related code into a separate file

2022-04-04 Thread Anton Khirnov
This is a first step towards making muxers more independent from the rest of the code. --- fftools/Makefile | 6 +- fftools/ffmpeg.c | 272 ++-- fftools/ffmpeg.h | 10 ++ fftools/ffmpeg_mux.c | 292 +++ 4 fi

[FFmpeg-devel] [PATCH 15/49] fftools/ffmpeg: write the header for stream-less outputs when initializing the muxer

2022-04-04 Thread Anton Khirnov
There is no reason to delay this. --- fftools/ffmpeg.c | 11 --- fftools/ffmpeg_mux.c | 7 +++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 688e1c7e56..e862a57215 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -

[FFmpeg-devel] [PATCH 22/49] fftools/ffmpeg_mux: split of_write_packet()

2022-04-04 Thread Anton Khirnov
It is currently called from two places: - output_packet() in ffmpeg.c, which submits the newly available output packet to the muxer - from of_check_init() in ffmpeg_mux.c after the header has been written, to flush the muxing queue Some packets will thus be processed by this function twice, so

[FFmpeg-devel] [PATCH 11/49] fftools/ffmpeg: add a helper function to access output file size

2022-04-04 Thread Anton Khirnov
Stop accessing muxer internals from outside of ffmpeg_mux. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 14 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index a85ed18b08..52dffa57

[FFmpeg-devel] [PATCH 21/49] fftools/ffmpeg_mux: split queuing packets into a separate function

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 72 +++- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 33cea56c62..e7b0a9ca99 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -63,12 +63,50 @@ stat

[FFmpeg-devel] [PATCH 24/49] fftools/ffmpeg: move processing video stats to ffmpeg_mux

2022-04-04 Thread Anton Khirnov
Currently it is called from - do_video_out(), at the end of each encode loop iteration - from flush_encoders(), after muxing each packet Since this function processes the data from the last encoded packet, neither of the above is fully correct, because - an encoder can in principle produce multipl

[FFmpeg-devel] [PATCH 17/49] fftools/ffmpeg: refactor the code checking for bitexact output

2022-04-04 Thread Anton Khirnov
Figure out earlier whether the output stream/file should be bitexact and store this information in a flag in OutputFile/OutputStream. Stop accessing the muxer in set_encoder_id(), which will become forbidden in future commits. --- fftools/ffmpeg.c | 21 + fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 20/49] fftools/ffmpeg: move the mux queue into muxer private data

2022-04-04 Thread Anton Khirnov
The muxing queue currently lives in OutputStream, which is a very large struct storing the state for both encoding and muxing. The muxing queue is only used by the code in ffmpeg_mux, so it makes sense to restrict it to that file. This makes the first step towards reducing the scope of OutputStrea

[FFmpeg-devel] [PATCH 19/49] fftools/ffmpeg: do not log to the muxer context

2022-04-04 Thread Anton Khirnov
All other logging goes to NULL context. --- fftools/ffmpeg.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index b9ecbf4739..a9a62eb8c3 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2960,7 +2960,6 @@ static void init

[FFmpeg-devel] [PATCH 18/49] fftools/ffmpeg: access output file chapters through a wrapper

2022-04-04 Thread Anton Khirnov
Avoid accessing the muxer context directly, as this will become forbidden in future commits. --- fftools/ffmpeg.c | 15 +-- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_mux.c | 7 +++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ff

[FFmpeg-devel] [PATCH 08/49] fftools/ffmpeg: move freeing the output file to ffmpeg_mux.c

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 14 ++ fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 17 + 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index cc7855a4cc..69d1949103 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmp

[FFmpeg-devel] [PATCH 05/49] fftools/ffmpeg: store the output file index in OutputFile

2022-04-04 Thread Anton Khirnov
Use it to simplify check_init_output_file(). Will allow further simplifications in the following commits. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/f

[FFmpeg-devel] [PATCH 07/49] fftools/ffmpeg: move writing the trailer to ffmpeg_mux.c

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 16 +++- fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 21 + 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 47724f7231..cc7855a4cc 100644 --- a/fftools/ffmpeg.c +++ b/fftool

[FFmpeg-devel] [PATCH 10/49] fftools/ffmpeg_mux: add private muxer context

2022-04-04 Thread Anton Khirnov
Move header_written into it, which is not (and should not be) used by any code outside of ffmpeg_mux. In the future this context will contain more muxer-private state that should not be visible to other code. --- fftools/ffmpeg.h | 6 -- fftools/ffmpeg_mux.c | 26 ++--

[FFmpeg-devel] [PATCH 09/49] fftools/ffmpeg: store output format separately from the muxer context

2022-04-04 Thread Anton Khirnov
Allows accessing it without going through the muxer context. This will be useful in the following commits, where the muxer context will be hidden. --- fftools/ffmpeg.c | 18 ++ fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 1 + 3 files changed, 13 insertions(+), 8 delet

[FFmpeg-devel] [PATCH 25/49] fftools/ffmpeg_mux: drop a useless check and reduce indentation

2022-04-04 Thread Anton Khirnov
do_video_stats() is only ever called for video. --- fftools/ffmpeg_mux.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 5facc9b1fc..059beabaf3 100644 --- a/fftools/ffmpeg_mux.c +++ b

[FFmpeg-devel] [PATCH 28/49] fftools/ffmpeg_mux: merge variable declaration and initialization

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 8e0e278e4f..b7140fca5e 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -58,7 +58,7 @@ static int want_sdp = 1; static void do_video_st

[FFmpeg-devel] [PATCH 12/49] fftools/ffmpeg: fix the type of limit_filesize

2022-04-04 Thread Anton Khirnov
The option is parsed as INT64 (signed). It is also compared to the output of avio_tell(), which is also int64_t. --- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_opt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index fa7b202ae6..d76f

[FFmpeg-devel] [PATCH 26/49] fftools/ffmpeg_mux: stop using AVStream.nb_frames in do_video_stats()

2022-04-04 Thread Anton Khirnov
Its use for muxing is not documented, in practice it is incremented per each packet successfully passed to the muxer's write_packet(). Since there is a lot of indirection between ffmpeg submitting a packet to the muxer and it actually being written (e.g. the interleaving queue), using nb_frames to

[FFmpeg-devel] [PATCH 23/49] fftools/ffmpeg: move output file opts into private context

2022-04-04 Thread Anton Khirnov
It is private to the muxer, no reason to access it from outside. --- fftools/ffmpeg.h | 3 +-- fftools/ffmpeg_mux.c | 9 ++--- fftools/ffmpeg_opt.c | 12 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 5f002521ab..c6

[FFmpeg-devel] [PATCH 29/49] fftools/ffmpeg_mux: move processing AV_PKT_DATA_QUALITY_STATS to do_video_stats()

2022-04-04 Thread Anton Khirnov
This is a more appropriate place for this code, since the values we read from AV_PKT_DATA_QUALITY_STATS side data are primarily written into video stats. Rename the function to update_video_stats() to better reflect its new purpose. --- fftools/ffmpeg_mux.c | 37 +++---

[FFmpeg-devel] [PATCH 35/49] fftools/ffmpeg: use the sync queues to handle -frames

2022-04-04 Thread Anton Khirnov
Same issues apply to it as to -shortest. Changes the results of the following tests: - matroska-flac-extradata-update The test reencodes two input FLAC streams into three output FLAC streams. The last output stream is limited to 8 frames. The current code results in the first two output stre

[FFmpeg-devel] [PATCH 36/49] fftools/ffmpeg: stop using OutputStream.frame_number in print_report()

2022-04-04 Thread Anton Khirnov
This field means different things for video encoding (number of frames emitted to the encoding sync queue/encoder by the video sync code) and for everything else (number of packets sent to the muxer sync queue). Print the value of packets_written instead, which means the same thing for all kinds o

[FFmpeg-devel] [PATCH 38/49] fftools/ffmpeg: make the muxer AVFormatContext private to ffmpeg_mux.c

2022-04-04 Thread Anton Khirnov
Since the muxer will operate in a separate thread in the future, the muxer context should not be accessed from the outside. --- fftools/ffmpeg.c| 4 +-- fftools/ffmpeg.h| 6 ++-- fftools/ffmpeg_filter.c | 6 ++-- fftools/ffmpeg_mux.c| 80 +

[FFmpeg-devel] [PATCH 37/49] fftools/ffmpeg: only set OutputStream.frame_number for video encoding

2022-04-04 Thread Anton Khirnov
It is unused otherwise. Rename the field to vsync_frame_number to better reflect its current purpose. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 3 ++- fftools/ffmpeg_mux.c | 11 --- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/

[FFmpeg-devel] [PATCH 31/49] fftools/ffmpeg: reuse the encoding code for flushing encoders

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 72 1 file changed, 18 insertions(+), 54 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 662a5d22b1..adf69cb43e 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -826,12 +826,12 @@ static int encode_

[FFmpeg-devel] [PATCH 30/49] fftools/ffmpeg: share the code encoding a single frame between video and audio

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 136 --- 1 file changed, 58 insertions(+), 78 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 68e720d889..662a5d22b1 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -821,63 +821,93 @@ static int init_ou

[FFmpeg-devel] [PATCH 34/49] fftools/ffmpeg: rework -shortest implementation

2022-04-04 Thread Anton Khirnov
The -shortest option (which finishes the output file at the time the shortest stream ends) is currently implemented by faking the -t option when an output stream ends. This approach is fragile, since it depends on the frames/packets being processed in a specific order. E.g. there are currently some

[FFmpeg-devel] [PATCH 32/49] fftools/ffmpeg: reindent after previous commit

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 56 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index adf69cb43e..e0f15c0f61 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -830,15 +830,15 @@ static int encode_

[FFmpeg-devel] [PATCH 41/49] fftools/ffmpeg_mux: return errors from write_packet()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 69af2c8d46..37ae61fee8 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -166,7 +166,7 @@ static int queue_packet(OutputFi

[FFmpeg-devel] [PATCH 39/49] fftools/ffmpeg_mux: return errors from of_submit_packet()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 54 +++- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_mux.c | 12 ++ 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 7e9ac943de..9987b15888 100644 --- a/fftools/ffm

[FFmpeg-devel] [PATCH 27/49] fftools/ffmpeg_mux: stop using av_stream_get_end_pts() in do_video_stats()

2022-04-04 Thread Anton Khirnov
It retrieves libavformat's internal dts value (contrary to the function's name), which is not necessary here because we can access the packet directly. --- fftools/ffmpeg_mux.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.

[FFmpeg-devel] [PATCH 45/49] fftools/ffmpeg: stop using av_stream_get_end_pts()

2022-04-04 Thread Anton Khirnov
It retrieves some muxer's internal timestamp with under-defined semantics. Continuing to use this value would also require synchronization once the muxer is moved to a separate thread. Replace the value with last_mux_dts. --- fftools/ffmpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletion

[FFmpeg-devel] [PATCH 33/49] fftools/ffmpeg: use refcounted packets for encoded subtitles

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e0f15c0f61..07d1fc8a5d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -141,8 +141,6 @@ unsigned nb_output_dumped = 0; static Bench

[FFmpeg-devel] [PATCH 46/49] fftools/ffmpeg: do not write the output file header from init_output_stream()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 4 - fftools/ffmpeg.h | 2 - fftools/ffmpeg_mux.c | 186 ++- 3 files changed, 96 insertions(+), 96 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0cab73ad7a..2dff41e57f 100644 --- a/fftools/ffmpeg.c ++

[FFmpeg-devel] [PATCH 40/49] fftools/ffmpeg_mux: return errors from submit_packet()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 3ea7636380..69af2c8d46 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -253,7 +253,7 @@ static void write_packet(OutputFile *o

[FFmpeg-devel] [PATCH 47/49] fftools/ffmpeg: depend on threads

2022-04-04 Thread Anton Khirnov
ffmpeg will be switched to a fully threaded architecture, starting with muxers. --- configure| 2 +- fftools/ffmpeg.c | 20 fftools/ffmpeg.h | 2 -- fftools/ffmpeg_opt.c | 2 -- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/configure b/c

[FFmpeg-devel] [PATCH 43/49] fftools/ffmpeg_mux: return errors from update_video_stats()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 2cdbd5feef..087009e0eb 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -63,7 +63,7 @@ struct Muxer { static int want_sd

[FFmpeg-devel] [PATCH 42/49] fftools/ffmpeg_mux: simplify submit_packet()

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 37ae61fee8..2cdbd5feef 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -258,18 +258,14 @@ static int submit_packet(Output

[FFmpeg-devel] [PATCH 48/49] fftools: add a multistream thread-safe queue

2022-04-04 Thread Anton Khirnov
It is similar to AVThreadMessageQueue, but supports multiple streams, each with its own EOF state. --- fftools/Makefile | 1 + fftools/thread_queue.c | 232 + fftools/thread_queue.h | 37 +++ 3 files changed, 270 insertions(+) create mode 10064

[FFmpeg-devel] [PATCH 44/49] fftools/ffmpeg_mux: do not call exit_program() in print_sdp()

2022-04-04 Thread Anton Khirnov
Return an error instead, as is already done in other places in this function. --- fftools/ffmpeg_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 087009e0eb..2fd131d1bc 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg

[FFmpeg-devel] [PATCH 49/49] fftools/ffmpeg: move each muxer to a separate thread

2022-04-04 Thread Anton Khirnov
--- fftools/ffmpeg.c | 38 +++-- fftools/ffmpeg.h | 7 +- fftools/ffmpeg_mux.c | 197 +++ 3 files changed, 178 insertions(+), 64 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 9dfbc4216a..8ea27d3422 100644 --- a/fftools/f

Re: [FFmpeg-devel] [EXT] [PATCH v5 7/7] avcodec/v4l2_m2m_dec: setup capture queue before enqueue the first frame

2022-04-04 Thread Ming Qian
> From: Andriy Gelman > Sent: Monday, April 4, 2022 6:29 AM > To: Ming Qian > Cc: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [EXT] [PATCH v5 7/7] avcodec/v4l2_m2m_dec: > setup capture queue before enqueue the first frame > > Caution: EXT Email >

Re: [FFmpeg-devel] [PATCH] avfilter/alimiter: Remove the delay introduced by lookahead buffer

2022-04-04 Thread Paul B Mahol
On Wed, Mar 30, 2022 at 11:05 PM Wang Cao wrote: > The change essentially removes the delay introduces by lookahead buffer. > The valid audio data in the internal buffer is also flushed to ensure > the integrity of output. > > This adds extra delay, and complicates current code a lot. > Signe

Re: [FFmpeg-devel] [PATCH] avfilter/alimiter: Add "flush_buffer" option to flush the remaining valid data to the output

2022-04-04 Thread Paul B Mahol
On Sun, Mar 27, 2022 at 11:41 PM Marton Balint wrote: > > > On Sat, 26 Mar 2022, Wang Cao wrote: > > > The change in the commit will add some samples to the end of the audio > > stream. The intention is to add a "zero_delay" option eventually to not > > have the delay in the begining the output f

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread TADANO Tokumei
As I posted a patch on Apr. 3rd, you should use "desc_end" rather than "p_end" for get16() or get8() to parse each descriptor. On 2022/04/04 18:53, Jan Ekström wrote: From: Jan Ekström Additionally, they should not be probed, as this is essentially various types of binary data. Signed-off-by:

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread TADANO Tokumei
... and, it is better to check broken packet. On 2022/04/05 1:04, TADANO Tokumei wrote: As I posted a patch on Apr. 3rd, you should use "desc_end" rather than "p_end" for get16() or get8() to parse each descriptor. On 2022/04/04 18:53, Jan Ekström wrote: From: Jan Ekström Additionally, they

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread TADANO Tokumei
Ah, the variables should be int. On 2022/04/05 1:16, TADANO Tokumei wrote: ... and, it is better to check broken packet. On 2022/04/05 1:04, TADANO Tokumei wrote: As I posted a patch on Apr. 3rd, you should use "desc_end" rather than "p_end" for get16() or get8() to parse each descriptor. On

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread Jan Ekström
On Mon, Apr 4, 2022 at 7:04 PM TADANO Tokumei wrote: > > As I posted a patch on Apr. 3rd, you should use "desc_end" rather than "p_end" > for get16() or get8() to parse each descriptor. > Yes, I had noticed and planned to look into those patches, but did not have the time to do that yet. Also FY

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: set data broadcast streams as such

2022-04-04 Thread Jan Ekström
On Mon, Apr 4, 2022 at 7:32 PM TADANO Tokumei wrote: > > Ah, the variables should be int. > > On 2022/04/05 1:16, TADANO Tokumei wrote: > > ... and, it is better to check broken packet. > > Yes. I guess I'll swap those for ints, although I like having the original unsigned sizes :) . I think alt

Re: [FFmpeg-devel] [PATCH] avfilter/alimiter: Add "flush_buffer" option to flush the remaining valid data to the output

2022-04-04 Thread Marton Balint
On Mon, 4 Apr 2022, Paul B Mahol wrote: On Sun, Mar 27, 2022 at 11:41 PM Marton Balint wrote: On Sat, 26 Mar 2022, Wang Cao wrote: The change in the commit will add some samples to the end of the audio stream. The intention is to add a "zero_delay" option eventually to not have the del

[FFmpeg-devel] FFmpeg 4.4.2

2022-04-04 Thread Michael Niedermayer
Hi I intend to do a 4.4.2 release from the release/4.4 branch in the next days as its high time to make a new release with all the bugfixes so if you want to backport something please do so after that the other releases branches which are still on downstreams should follow as i have time thx --

Re: [FFmpeg-devel] [PATCH] ffmpeg: document -d option

2022-04-04 Thread Anton Khirnov
Quoting Stefano Sabatini (2022-04-03 17:27:06) > Option was added in commit 39aafa5ee90e10382e. > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > --- > doc/ffmpeg.texi | 12 > fftools/ffmpeg_opt.c | 3 +++ > 2 files changed, 15 insertions(+) Does this option do anything

Re: [FFmpeg-devel] [PATCH v2 1/4] avutil: add ambient viewing environment metadata side data

2022-04-04 Thread lance . lmwang
On Mon, Mar 28, 2022 at 08:41:08PM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavutil/frame.c | 1 + > libavutil/frame.h | 6 + > libavutil/mastering_display_metadata.c | 23 + >

[FFmpeg-devel] [PATCH] libavcodec/hevcdec: detect non-conformant missing refs

2022-04-04 Thread Xiaolei Yu
For cases which prefer rejecting broken bitstreams. --- libavcodec/hevc_refs.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c index fe18ca2b1d..7ea70e301b 100644 --- a/libavcodec/hevc_refs.c +++ b/libavcodec/he