Re: [FFmpeg-devel] [PATCH v5 1/4] avcodec/loongarch: Add wrapper for __lsx_vldx

2022-08-03 Thread Andreas Rheinhardt
Andreas Rheinhardt: > __lsx_vldx does not accept a pointer to const (in fact, > no function in lsxintrin.h does so), although it is not allowed > to modify the pointed-to buffer. Therefore this commit adds a wrapper > for it in order to constify the HEVC DSP functions in a later commit. > > Signed

Re: [FFmpeg-devel] [PATCH 01/11] avcodec/flacdsp: Remove unused function parameter

2022-08-03 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Forgotten in e609cfd697f8eed7325591f767585041719807d1. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/arm/flacdsp_init_arm.c | 3 +-- > libavcodec/flacdec.c | 6 +++--- > libavcodec/flacdsp.c | 7 +++ > libavcodec/flacdsp.h

Re: [FFmpeg-devel] [PATCH 19/25] fftools/ffmpeg: report new streams from the input thread

2022-08-03 Thread Andreas Rheinhardt
Anton Khirnov: > This avoids a potential race with the demuxer adding new streams. It is > also more efficient, since we no longer do inter-thread transfers of > packets that will be just discarded. > --- > fftools/ffmpeg.c | 22 -- > fftools/ffmpeg_demux.c | 23 +

Re: [FFmpeg-devel] [PATCH] avformat: allow .ec3 as extension for raw E-AC-3 stream

2022-08-03 Thread Rubén Gonzalez
Hello community, please, Let me know if something is pending to start the review process. On Thu, Jun 23, 2022 at 2:14 PM Ruben Gonzalez wrote: > In addition to .eac3, .ec3 is also commonly used by people to name raw > E-AC-3 streams. Enables automatic recognition of the eac3 format for > the

[FFmpeg-devel] [PATCH 1/3 v4] avutil/frame: add av_frame_replace

2022-08-03 Thread James Almer
Signed-off-by: James Almer --- libavutil/frame.c | 124 ++ libavutil/frame.h | 13 + 2 files changed, 137 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index de4ad1f94d..864c66371f 100644 --- a/libavutil/frame.c +++ b/libavutil/

[FFmpeg-devel] [PATCH 3/3 v2] avcodec/h264_picture: use ff_thread_replace_frame()

2022-08-03 Thread James Almer
Signed-off-by: James Almer --- libavcodec/h264_picture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index 2661ff4698..dcaf0fdb0a 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -154,8 +154,7

[FFmpeg-devel] [PATCH 2/3 v2] avcodec/utils: add ff_thread_replace_frame()

2022-08-03 Thread James Almer
Signed-off-by: James Almer --- libavcodec/pthread_frame.c | 30 ++ libavcodec/threadframe.h | 3 +++ libavcodec/utils.c | 21 + 3 files changed, 54 insertions(+) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index

Re: [FFmpeg-devel] [PATCH 34/39] avcodec/mpegvideoencdsp: Allow pointers to const where possible

2022-08-03 Thread Michael Niedermayer
On Wed, Aug 03, 2022 at 05:28:16PM +0200, Michael Niedermayer wrote: > On Tue, Aug 02, 2022 at 11:30:39AM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2022-07-30 19:12:39) > > > On Sat, Jul 30, 2022 at 11:55:45AM +0200, Andreas Rheinhardt wrote: > > > > Michael Niedermayer: > > > >

Re: [FFmpeg-devel] [PATCH 34/39] avcodec/mpegvideoencdsp: Allow pointers to const where possible

2022-08-03 Thread Michael Niedermayer
On Tue, Aug 02, 2022 at 11:30:39AM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2022-07-30 19:12:39) > > On Sat, Jul 30, 2022 at 11:55:45AM +0200, Andreas Rheinhardt wrote: > > > Michael Niedermayer: > > > > On Wed, Jul 27, 2022 at 12:08:09AM +0200, Andreas Rheinhardt wrote: > > > >>

[FFmpeg-devel] [PATCH 21/25] fftools/ffmpeg: move seek_to_start() to ffmpeg_demux.c

2022-08-03 Thread Anton Khirnov
Reduces the diff in the following commit. --- fftools/ffmpeg.c | 79 -- fftools/ffmpeg.h | 1 + fftools/ffmpeg_demux.c | 79 ++ 3 files changed, 80 insertions(+), 79 deletions(-) diff --git a/fftools/ffmp

[FFmpeg-devel] [PATCH 18/25] fftools/ffmpeg: handle dumping input packets in input_thread()

2022-08-03 Thread Anton Khirnov
This is a more appropriate place for this. --- fftools/ffmpeg.c | 4 fftools/ffmpeg_demux.c | 6 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 3911db1948..1393ca9c1e 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@

[FFmpeg-devel] [PATCH 16/25] fftools/ffmpeg: move the input thread into its own file

2022-08-03 Thread Anton Khirnov
It will contain more demuxing-specific code in the future. --- fftools/Makefile | 1 + fftools/ffmpeg.c | 110 - fftools/ffmpeg.h | 5 ++ fftools/ffmpeg_demux.c | 136 + 4 files changed, 142 insertions(+)

[FFmpeg-devel] [PATCH 15/25] fftools/ffmpeg: drop a write-only variable

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg.c | 1 - fftools/ffmpeg.h | 1 - 2 files changed, 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 7ba1f2a8cf..a377e776c7 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3696,7 +3696,6 @@ static void free_input_thread(int i) av_packet_free

[FFmpeg-devel] [PATCH 17/25] fftools/ffmpeg: drop the 'h' key handling

2022-08-03 Thread Anton Khirnov
This undocumented feature runtime-enables dumping input packets. I can think of no reasonable real-world use case that cannot also be accomplished in a different way. Keeping this functionality would interfere with the following commit moving it to the input thread (then setting the variable would

[FFmpeg-devel] [PATCH 22/25] fftools/ffmpeg: move -stream_loop handling to the demuxer thread

2022-08-03 Thread Anton Khirnov
-stream_loop is currently handled by destroying the demuxer thread, seeking, then recreating it anew. This is very messy and conflicts with the future goal of moving each major ffmpeg component into its own thread. Handle -stream_loop directly in the demuxer thread. Looping requires the demuxer to

[FFmpeg-devel] [PATCH 10/25] fftools/ffmpeg: deprecate specifying a sync stream with -map

2022-08-03 Thread Anton Khirnov
It has not had any effect whatsoever for over 10 years. --- doc/ffmpeg.texi | 6 ++ fftools/ffmpeg.h | 3 +-- fftools/ffmpeg_opt.c | 41 +++-- 3 files changed, 10 insertions(+), 40 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index

[FFmpeg-devel] [PATCH 07/25] fftools/ffmpeg: remove OutputStream.stream_copy

2022-08-03 Thread Anton Khirnov
There are currently three possible modes for an output stream: 1) The stream is produced by encoding output from some filtergraph. This is true when ost->enc_ctx != NULL, or equivalently when ost->encoding_needed != 0. 2) The stream is produced by copying some input stream's packets. This

[FFmpeg-devel] [PATCH 03/25] fftools/ffmpeg_opt: move adding metadata out of open_output_file()

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 125 ++- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index ccab98406e..aa240107dc 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2853,12 +2853,73 @@

[FFmpeg-devel] [PATCH 13/25] fftools/ffmpeg: store the input file index in InputFile

2022-08-03 Thread Anton Khirnov
Use it to simplify some code and fix two off-by-one errors. Similar to what was previously done for OutputFile. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 9 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 6b09846825.

[FFmpeg-devel] [PATCH 19/25] fftools/ffmpeg: report new streams from the input thread

2022-08-03 Thread Anton Khirnov
This avoids a potential race with the demuxer adding new streams. It is also more efficient, since we no longer do inter-thread transfers of packets that will be just discarded. --- fftools/ffmpeg.c | 22 -- fftools/ffmpeg_demux.c | 23 +++ 2 files cha

[FFmpeg-devel] [PATCH 11/25] doc/ffmpeg: update -map documentation

2022-08-03 Thread Anton Khirnov
Make it match reality (current text was not updated for stream specifiers), extend and clarify the text. --- doc/ffmpeg.texi | 58 + 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 20747ebb8e..4

[FFmpeg-devel] [PATCH 20/25] fftools/ffmpeg: move get_input_packet() to ffmpeg_demux.c

2022-08-03 Thread Anton Khirnov
Also rename it to use the ifile_* namespace. --- fftools/ffmpeg.c | 30 ++ fftools/ffmpeg.h | 1 + fftools/ffmpeg_demux.c | 26 ++ 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c i

[FFmpeg-devel] [PATCH 08/25] fftools/ffmpeg: remove OutputStream.encoding_needed

2022-08-03 Thread Anton Khirnov
It is unnecessary, as it is always exactly equivalent to !!ost->enc_ctx --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 1 - fftools/ffmpeg_opt.c | 8 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0a1dc5bb3b..6

[FFmpeg-devel] [PATCH 24/25] fftools/ffmpeg_demux: do not store demux packet in the context

2022-08-03 Thread Anton Khirnov
Its use is local to input_thread(). --- fftools/ffmpeg.c | 1 - fftools/ffmpeg.h | 2 -- fftools/ffmpeg_demux.c | 11 ++- fftools/ffmpeg_opt.c | 3 --- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0218f330b9..a9e

[FFmpeg-devel] [PATCH 14/25] fftools/ffmpeg: always read input in a thread

2022-08-03 Thread Anton Khirnov
This will be required by the following architecture changes. --- fftools/ffmpeg.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f12364fe0a..7ba1f2a8cf 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@

[FFmpeg-devel] [PATCH 23/25] fftools/ffmpeg_demux: factorize signalling end of demuxing

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg_demux.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index e02d2d9656..be734be581 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -18,6 +18,7 @@ #include "ffmpeg.h" +#include

[FFmpeg-devel] [PATCH 12/25] fftools/ffmpeg: drop a superfluous stack variable

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 47f9a6137f..f12364fe0a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3904,16 +3904,14 @@ static int process_input(int file_index) return ret;

[FFmpeg-devel] [PATCH 25/25] fftools/ffmpeg: move handling corrupt packets to the input thread

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg.c | 7 --- fftools/ffmpeg_demux.c | 11 +++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index a9eda3c33e..09a4d20028 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3729,13 +3729,6 @@ static int

[FFmpeg-devel] [PATCH 09/25] fftools/ffmpeg: remove OutputStream.sync_ist

2022-08-03 Thread Anton Khirnov
It is not actually used for anything. --- fftools/ffmpeg.c | 4 fftools/ffmpeg.h | 1 - fftools/ffmpeg_opt.c | 18 ++ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 6124197580..47f9a6137f 100644 --- a/fftools

[FFmpeg-devel] [PATCH 06/25] fftools/ffmpeg_opt: drop redundant decoder selection

2022-08-03 Thread Anton Khirnov
A decoder is already selected above, in choose_decoder(). --- fftools/ffmpeg_opt.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index aa240107dc..12cde4b617 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1078,9 +1078,6 @@ sta

[FFmpeg-devel] [PATCH 05/25] fftools/ffmpeg: stop accessing the decoder context unnecessarily

2022-08-03 Thread Anton Khirnov
The same information is available from AVStream.codecpar. This will allow to stop allocating a decoder unless decoding is actually performed. --- fftools/ffmpeg.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/

[FFmpeg-devel] [PATCH 04/25] fftools/ffmpeg_hw: stop logging to the decoder context

2022-08-03 Thread Anton Khirnov
Only the decoder itself should do that. Use NULL as is done by all other logging code in ffmpeg. --- fftools/ffmpeg_hw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c index 14e702bd92..8acfeaf08f 100644 --- a/fftools/ffmp

[FFmpeg-devel] [PATCH 02/25] fftools/ffmpeg_opt: move adding programs out of open_output_file()

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 135 ++- 1 file changed, 70 insertions(+), 65 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 0d5323ea73..ccab98406e 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2784,6 +2784,75 @@ s

[FFmpeg-devel] [PATCH 01/25] fftools/ffmpeg_opt: move adding attachments out of open_output_file()

2022-08-03 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 79 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index a8b064e070..0d5323ea73 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2742,6 +2742,48 @@ l

Re: [FFmpeg-devel] [PATCH] lavc/aarch64: Add neon implementation for sse16

2022-08-03 Thread Martin Storsjö
On Mon, 25 Jul 2022, Hubert Mazur wrote: Provide neon implementation for sse16 function. Performance comparison tests are shown below. - sse_0_c: 273.0 - sse_0_neon: 48.2 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur --- libavcodec/aarch64/me_cmp_

[FFmpeg-devel] [PATCH v2] mov: Compare frag times in correct time base when seeking a stream without a corresponding sidx

2022-08-03 Thread Derek Buitenhuis
Some muxers, such as GPAC, create files with only one sidx, but two streams muxed into the same fragments pointed to by this sidx. Prevously, in such a case, when we seeked in such files, we fell back to, for example, using the sidx associated with the video stream, to seek the audio stream, leavi

Re: [FFmpeg-devel] [PATCH v2 0/3] hwcontext_vaapi: dlopen libva-x11 and libva-drm

2022-08-03 Thread Emil Velikov
On Wed, 27 Jul 2022 at 20:51, Emil Velikov wrote: > > On Thu, 21 Jul 2022 at 21:47, Mark Thompson wrote: > > > > On 20/07/2022 17:41, Emil Velikov wrote: > > > On Tue, 19 Jul 2022 at 19:16, Nicolas George wrote: > > >> > > >> Emil Velikov (12022-07-19): > > >>> As you may know the libva* set of

Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec

2022-08-03 Thread PLT
-Original Message- From: ffmpeg-devel On Behalf Of James Almer Sent: Monday, August 1, 2022 4:05 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec On 8/1/2022 6:29 AM, Dawid Kozinski wrote: > diff --gi

Re: [FFmpeg-devel] [PATCH v2 0/3] avformat/flv: fix timestamps of key frame index

2022-08-03 Thread zhilizhao(赵志立)
> On Jul 29, 2022, at 12:43 PM, Zhao Zhili wrote: > > From: Zhao Zhili > > v2: > Simplify patch 2/3 as Michael's suggestion. > > Zhao Zhili (3): > avformat/flvenc: fix timestamp of key frame index > avformat/flvdec: make key frame timestamps more accurate > avformat/flvenc: fix shadowed v