[FFmpeg-devel] [PATCH 03/21] aarch64: hevc: Merge consecutive stores in put_hevc_\type\()_h16_8_neon

2024-03-25 Thread Martin Storsjö
This gets rid of a couple instructions, but the actual performance is almost identical on Cortex A72/A73. On Cortex A53, it is a handful of cycles faster. --- libavcodec/aarch64/hevcdsp_qpel_neon.S | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/aarc

[FFmpeg-devel] [PATCH 04/21] aarch64: hevc: Specialize put_hevc_\type\()_h*_8_neon for horizontal looping

2024-03-25 Thread Martin Storsjö
For widths of 32 pixels and more, loop first horizontally, then vertically. Previously, this function would process a 16 pixel wide slice of the block, looping vertically. After processing the whole height, it would backtrack and process the next 16 pixel wide slice. When doing 8tap filtering hor

[FFmpeg-devel] [PATCH 09/21] aarch64: hevc: Reorder epel_hv functions to prepare for templating

2024-03-25 Thread Martin Storsjö
This is a pure reordering of code without changing anything in the individual functions. --- libavcodec/aarch64/hevcdsp_epel_neon.S | 971 + 1 file changed, 497 insertions(+), 474 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S b/libavcodec/aarch64/hevcds

[FFmpeg-devel] [PATCH 10/21] aarch64: hevc: Produce epel_hv functions for both plain neon and i8mm

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_epel_hv4_8_c: 163.7 put_hevc_epel_hv4_8_neon: 52.5 put_hevc_epel_hv4_8_i8mm: 49.5 put_hevc_epel_hv6_8_c: 292.2 put_hevc_epel_hv6_8_neon: 97.7 put_hevc_epel_hv6_8_i8mm: 101.2 put_hevc_epel_hv8_8_c: 471.0 put_hevc_epel_hv8_8_neon: 106.7 put_hevc_epel_hv8_8_i8mm: 102.5 put_hev

[FFmpeg-devel] [PATCH 05/21] aarch64: hevc: Use ld1r instead of ldr+dup in hevc_qpel_uni_w_h

2024-03-25 Thread Martin Storsjö
--- libavcodec/aarch64/hevcdsp_qpel_neon.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_qpel_neon.S b/libavcodec/aarch64/hevcdsp_qpel_neon.S index 0fcded344b..062b7d4d0f 100644 --- a/libavcodec/aarch64/hevcdsp_qpel_neon.S +++ b/libavcodec/aarch6

[FFmpeg-devel] [PATCH 11/21] aarch64: hevc: Produce epel_uni_hv functions for both neon and i8mm

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_epel_uni_hv4_8_c: 163.5 put_hevc_epel_uni_hv4_8_neon: 59.7 put_hevc_epel_uni_hv4_8_i8mm: 57.5 put_hevc_epel_uni_hv6_8_c: 344.7 put_hevc_epel_uni_hv6_8_neon: 105.0 put_hevc_epel_uni_hv6_8_i8mm: 102.7 put_hevc_epel_uni_hv8_8_c: 552.2 put_hevc_epel_uni_hv8_8_neon: 111.2 put_he

[FFmpeg-devel] [PATCH 12/21] aarch64: hevc: Produce epel_uni_w_hv functions for both neon and i8mm

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_epel_uni_w_hv4_8_c: 191.2 put_hevc_epel_uni_w_hv4_8_neon: 87.7 put_hevc_epel_uni_w_hv4_8_i8mm: 83.2 put_hevc_epel_uni_w_hv6_8_c: 349.5 put_hevc_epel_uni_w_hv6_8_neon: 153.0 put_hevc_epel_uni_w_hv6_8_i8mm: 148.5 put_hevc_epel_uni_w_hv8_8_c: 581.2 put_hevc_epel_uni_w_hv8_8_ne

[FFmpeg-devel] [PATCH 06/21] aarch64: hevc: Implement a neon version of put_hevc_epel_h*_8

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_epel_h4_8_c: 64.7 put_hevc_epel_h4_8_neon: 25.0 put_hevc_epel_h4_8_i8mm: 21.2 put_hevc_epel_h6_8_c: 130.0 put_hevc_epel_h6_8_neon: 40.7 put_hevc_epel_h6_8_i8mm: 36.5 put_hevc_epel_h8_8_c: 209.0 put_hevc_epel_h8_8_neon: 45.2 put_hevc_epel_h8_8_i8mm: 41.2 put_hevc_epel_h12_8_

[FFmpeg-devel] [PATCH 07/21] aarch64: hevc: Implement a neon version of hevc_epel_uni_w_h*_8

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_epel_uni_w_h4_8_c: 97.2 put_hevc_epel_uni_w_h4_8_neon: 41.2 put_hevc_epel_uni_w_h4_8_i8mm: 35.2 put_hevc_epel_uni_w_h6_8_c: 203.7 put_hevc_epel_uni_w_h6_8_neon: 84.7 put_hevc_epel_uni_w_h6_8_i8mm: 74.7 put_hevc_epel_uni_w_h8_8_c: 345.7 put_hevc_epel_uni_w_h8_8_neon: 94.0 pu

[FFmpeg-devel] [PATCH 08/21] aarch64: hevc: Split the epel_*_hv functions into two parts

2024-03-25 Thread Martin Storsjö
The first horizontal filter can use either i8mm or plain neon versions, while the second part is a pure neon implementation. --- libavcodec/aarch64/hevcdsp_epel_neon.S | 100 + 1 file changed, 100 insertions(+) diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S b/libavco

[FFmpeg-devel] [PATCH 14/21] aarch64: hevc: Implement a neon version of hevc_qpel_uni_w_h*_8

2024-03-25 Thread Martin Storsjö
AWS Graviton 3: put_hevc_qpel_uni_w_h4_8_c: 159.0 put_hevc_qpel_uni_w_h4_8_neon: 64.2 put_hevc_qpel_uni_w_h4_8_i8mm: 40.0 put_hevc_qpel_uni_w_h6_8_c: 344.7 put_hevc_qpel_uni_w_h6_8_neon: 114.5 put_hevc_qpel_uni_w_h6_8_i8mm: 82.0 put_hevc_qpel_uni_w_h8_8_c: 596.2 put_hevc_qpel_uni_w_h8_8_neon: 132.2

[FFmpeg-devel] [PATCH 13/21] aarch64: hevc: Produce epel_bi_hv functions for both neon and i8mm

2024-03-25 Thread Martin Storsjö
In addition to just templating, this contains one change to ff_hevc_put_hevc_epel_bi_hv32_8, by setting the w6 register which ff_hevc_put_hevc_epel_h32_8_neon requires. AWS Graviton 3: put_hevc_epel_bi_hv4_8_c: 176.5 put_hevc_epel_bi_hv4_8_neon: 62.0 put_hevc_epel_bi_hv4_8_i8mm: 58.0 put_hevc_epel

[FFmpeg-devel] [PATCH 15/21] aarch64: hevc: Split the qpel_*_hv functions into two parts

2024-03-25 Thread Martin Storsjö
--- libavcodec/aarch64/hevcdsp_qpel_neon.S | 94 +++--- 1 file changed, 86 insertions(+), 8 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_qpel_neon.S b/libavcodec/aarch64/hevcdsp_qpel_neon.S index fba063186c..c04e8dbea8 100644 --- a/libavcodec/aarch64/hevcdsp_qpel_neon

[FFmpeg-devel] [PATCH] intreadwrite: Indicate potential aliasing in AV_RN/AV_WN for Clang/MSVC mode

2023-08-02 Thread Martin Storsjö
While MSVC proper doesn't have a way to signal potential aliasing corresponding to __attribute__((may_alias)) (which is what av_alias expands to, if supported), Clang does support it. When building with Clang in MSVC mode, __GNUC__ isn't defined but _MSC_VER is, so Clang uses the MSVC implementati

[FFmpeg-devel] [PATCH] tests: Correctly distinguish between SAMPLES and TARGET_SAMPLES for hls_fmp4_ac3.m3u8

2023-08-02 Thread Martin Storsjö
This fixes the test when running in a cross test setup where the samples are located at a different path between build host and temote test target. --- tests/fate/hlsenc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/hlsenc.mak b/tests/fate/hlsenc.mak index 7df7

[FFmpeg-devel] [PATCH] w32pthreads: Fix function signature mismatches for CreateThread

2023-08-02 Thread Martin Storsjö
In WinRT mode, we use CreateThread instead of _beginthreadex. CreateThread takes a LPTHREAD_START_ROUTINE function pointer, which has got the signature DWORD WINAPI ThreadProc(LPVOID). _beginthreadex takes a function with the signature unsigned __stdcall func(void *). DWORD is defined as an unsig

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-04 Thread Martin Storsjö
On Thu, 27 Jul 2023, Rémi Denis-Courmont wrote: Hi, The use of RET vs BR also has microarchitectural side effects. AFAIU, RET should always be paired with an earlier BL/BLR to avoid interfering with branch prediction. So depending on the circumstances, either one of these should be addresse

[FFmpeg-devel] [PATCH v2] intreadwrite: Indicate potential aliasing in AV_RN/AV_WN for Clang/MSVC mode

2023-08-04 Thread Martin Storsjö
Use the GCC specific codepath for Clang in MSVC mode too. This matches the condition used in a number of other places. MSVC doesn't have a way to signal potential aliasing, while GCC (and Clang) can use __attribute__((may_alias)) for this purpose. When building with Clang in MSVC mode, __GNUC__ i

Re: [FFmpeg-devel] [PATCH] tests: Correctly distinguish between SAMPLES and TARGET_SAMPLES for hls_fmp4_ac3.m3u8

2023-08-04 Thread Martin Storsjö
On Wed, 2 Aug 2023, Martin Storsjö wrote: This fixes the test when running in a cross test setup where the samples are located at a different path between build host and temote test target. --- tests/fate/hlsenc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate

Re: [FFmpeg-devel] [PATCH] w32pthreads: Fix function signature mismatches for CreateThread

2023-08-04 Thread Martin Storsjö
On Wed, 2 Aug 2023, Martin Storsjö wrote: In WinRT mode, we use CreateThread instead of _beginthreadex. CreateThread takes a LPTHREAD_START_ROUTINE function pointer, which has got the signature DWORD WINAPI ThreadProc(LPVOID). _beginthreadex takes a function with the signature unsigned

Re: [FFmpeg-devel] [PATCH] os_support, network: Fix build failure on Windows with BZIP2

2023-08-04 Thread Martin Storsjö
On Thu, 27 Jul 2023, L. E. Segovia wrote: Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h (included transitively from windows.h). See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --

Re: [FFmpeg-devel] [PATCH] os_support, network: Fix build failure on Windows with BZIP2

2023-08-04 Thread Martin Storsjö
On Fri, 4 Aug 2023, Martin Storsjö wrote: On Thu, 27 Jul 2023, L. E. Segovia wrote: Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h (included transitively from windows.h). See: https

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-08 Thread Martin Storsjö
On Tue, 8 Aug 2023, Casey Smalley wrote: This patch changes the return instruction in the tr_32x4 macro from br to ret. Using ret properly hints that the branch is a function return. On devices that support BTI a landing pad is required when branching with br, or the instruction can be replace

Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time

2023-08-14 Thread Martin Storsjö
On Sat, 5 Aug 2023, L. E. Segovia wrote: Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --- compat/atomics/win32/std

Re: [FFmpeg-devel] [PATCH v4 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time

2023-08-14 Thread Martin Storsjö
On Mon, 14 Aug 2023, L. E. Segovia wrote: Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577 Reviewed-by: Martin Storsjö Signed-off-by: L. E

Re: [FFmpeg-devel] [PATCH v4 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time

2023-08-19 Thread Martin Storsjö
On Sat, 19 Aug 2023, Gyan Doshi wrote: ddc1cd5cdd breaks the checks for ole32 and thus prevents detection of DXVA2. @ https://github.com/FFmpeg/FFmpeg/commit/ddc1cd5cdd2570bf3d6ab807ee0ecfacdf09431d Thanks for noticing this, and sorry for the breakage. It seems like this is fixable by adju

[FFmpeg-devel] [PATCH] configure: Include objbase.h when checking for CoTaskMemFree

2023-08-19 Thread Martin Storsjö
commit caused ole32 to no longer get detected, which caused dxva2 to no longer be enabled. This gets fixed by this patch. Signed-off-by: Martin Storsjö --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ff6a5c3600..04bb9fe9dd 100755

[FFmpeg-devel] [PATCH] fate/matroska: Stop using unicode in command line paramters

2023-08-21 Thread Martin Storsjö
The fate-run.sh shell script exports LC_ALL=C before invoking the test executables; this is probably done for consistency. When executing Windows binaries with Wine, it normally handles UTF-8 command line parameters just fine - but with LC_ALL set to C, it treats them as plain ASCII. As the unico

Re: [FFmpeg-devel] [PATCH] configure: Include objbase.h when checking for CoTaskMemFree

2023-08-21 Thread Martin Storsjö
On Sun, 20 Aug 2023, Gyan Doshi wrote: On 2023-08-20 02:42 am, Martin Storsjö wrote: ddc1cd5cdd2570bf3d6ab807ee0ecfacdf09431d defined WIN32_LEAN_AND_MEAN globally, which makes for much fewer transitive includes from windows.h. With that define, CoTaskMemFree no longer gets implicitly

Re: [FFmpeg-devel] [PATCH] fate/matroska: Stop using unicode in command line paramters

2023-08-22 Thread Martin Storsjö
On Mon, 21 Aug 2023, Martin Storsjö wrote: The fate-run.sh shell script exports LC_ALL=C before invoking the test executables; this is probably done for consistency. When executing Windows binaries with Wine, it normally handles UTF-8 command line parameters just fine - but with LC_ALL set to

Re: [FFmpeg-devel] [PATCH v1] avformat/rtmpproto: support fourCcList property in enhanced rtmp

2023-08-23 Thread Martin Storsjö
On Wed, 23 Aug 2023, Jean-Baptiste Kempf wrote: Hello, On Mon, 21 Aug 2023, at 03:35, Steven Liu wrote: Jean-Baptiste Kempf 于2023年8月20日周日 16:29写道: Hello, Hi On Sun, 20 Aug 2023, at 06:10, Steven Liu wrote: > As the enhanced rtmp Extending NetConnection connect Command section > said, the

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/rtmpproto: support enhanced rtmp

2023-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2023, Steven Liu wrote: Add option named rtmp_enhanced_codec, it would support hvc1,av01,vp09 now, the fourcc is using Array of strings. Signed-off-by: Steven Liu --- doc/protocols.texi | 6 ++ libavformat/rtmpproto.c | 35 +++ 2 files cha

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/rtmpproto: support enhanced rtmp

2023-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2023, Steven Liu wrote: > +list_len = (fourcc_str_len + 1) / 5; > +// write the fourCcList field name > +ff_amf_write_field_name(&p, "fourCcList"); > + > +// write the fourcc array length > +ff_amf_write_array_start(&p, list_len); > + > +

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/rtmpproto: support enhanced rtmp

2023-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2023, Steven Liu wrote: Martin Storsjö 于2023年8月25日周五 17:38写道: On Fri, 25 Aug 2023, Steven Liu wrote: >> > +list_len = (fourcc_str_len + 1) / 5; >> > +// write the fourCcList field name >> > +ff_amf_write

Re: [FFmpeg-devel] [PATCH] avformat/matroskaenc: Fix writing of markers

2023-08-28 Thread Martin Storsjö
On Mon, 28 Aug 2023, Steinar H. Gunderson wrote: When the marker writing code was merged from libav to FFmpeg in dc62016c, it failed to take into account that the meaning of cluster_pos had changed in bda5b662; in particular, the special value for “I'm not currently working on a cluster” had cha

Re: [FFmpeg-devel] [PATCH] avformat/matroskaenc: Fix writing of markers

2023-08-29 Thread Martin Storsjö
On Mon, 28 Aug 2023, Martin Storsjö wrote: On Mon, 28 Aug 2023, Steinar H. Gunderson wrote: When the marker writing code was merged from libav to FFmpeg in dc62016c, it failed to take into account that the meaning of cluster_pos had changed in bda5b662; in particular, the special value for

Re: [FFmpeg-devel] [PATCH] avformat/internal: Don't auto-include os_support.h

2023-08-31 Thread Martin Storsjö
On Thu, 31 Aug 2023, Andreas Rheinhardt wrote: It includes various Windows-specific headers when compiling for Windows and these sometimes cause issues: E.g. winbase.h defines IGNORE, which clashes with a macro used in the Matroska muxer (since 884653ee5be03ed38db957c14fad51b300611c8c) and demux

Re: [FFmpeg-devel] [PATCH 1/4] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_v

2023-09-12 Thread Martin Storsjö
Hi, Sorry for not tending to your patches sooner. Unfortunately, this patchset is impossible to apply - there seems to be garbled whitespace in the patch which would require me to manually apply all the changes. Can you try sending the patches again in a way that doesn't corrupt whitespace?

Re: [FFmpeg-devel] [PATCH 1/4] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_v

2023-09-16 Thread Martin Storsjö
On Thu, 14 Sep 2023, Logan.Lyu wrote: Hi Martin, You can try the attached patchset. If that doesn't work, My code branch address is https://github.com/myais2023/FFmpeg/tree/hevc-aarch64 Thanks for the patches. Functionally, they seem to work, and the issues i saw in the code are relatively

Re: [FFmpeg-devel] [PATCH v2 1/3] avformat/avformat: Deprecate AVFMT_ALLOW_FLUSH

2023-09-26 Thread Martin Storsjö
On Tue, 26 Sep 2023, Anton Khirnov wrote: Quoting Andreas Rheinhardt (2023-09-26 01:54:30) It is of no value to the user, because every muxer can always be flushed with a NULL packet. As its documentation shows ("If not set, the muxer will not receive a NULL packet in the write_packet function"

Re: [FFmpeg-devel] [PATCH 1/4] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_v

2023-09-26 Thread Martin Storsjö
corrected, please let me know. 在 2023/9/17 5:46, Martin Storsjö 写道: On Thu, 14 Sep 2023, Logan.Lyu wrote: Hi Martin, You can try the attached patchset. If that doesn't work, My code branch address is https://github.com/myais2023/FFmpeg/tree/hevc-aarch64 Thanks for the patches. Functi

[FFmpeg-devel] [PATCH] libavcodec/aarch64/hevc: Require consistent use of trailing semicolon

2023-09-26 Thread Martin Storsjö
--- Some patches had inconsistent semicolons when invoking these macros. By omitting the trailing semicolon in the macro, it requires the callers to use it consistently. --- libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcod

Re: [FFmpeg-devel] [PATCH v2 1/3] avformat/avformat: Deprecate AVFMT_ALLOW_FLUSH

2023-09-27 Thread Martin Storsjö
On Tue, 26 Sep 2023, Andreas Rheinhardt wrote: Martin Storsjö: On Tue, 26 Sep 2023, Anton Khirnov wrote: Quoting Andreas Rheinhardt (2023-09-26 01:54:30) It is of no value to the user, because every muxer can always be flushed with a NULL packet. As its documentation shows ("If not set

Re: [FFmpeg-devel] [PATCH] Revert "lavu/timer: remove gratuitous volatile"

2023-09-27 Thread Martin Storsjö
On Wed, 27 Sep 2023, Rémi Denis-Courmont wrote: It does not make much sense to me, but GCC somehow optimises the inline assembler way even when the output are very obviously used. This reverts commit 09731fbfc3a914ec4f6ffad60aa9062db6a8f6aa. --- libavutil/riscv/timer.h | 4 ++-- 1 file changed,

[FFmpeg-devel] [PATCH] tools: Don't include the direct library names when linking

2023-09-28 Thread Martin Storsjö
When linking the main tools, the object files to link are set up via the variable OBJS-, but for the tools, we've only used the target's list of dependencies. In most cases, this has been fine, but it has caused specifying the libraries to link in a duplicate fashion; the linking command has looke

Re: [FFmpeg-devel] [PATCH] tools: Don't include the direct library names when linking

2023-10-02 Thread Martin Storsjö
On Thu, 28 Sep 2023, Martin Storsjö wrote: When linking the main tools, the object files to link are set up via the variable OBJS-, but for the tools, we've only used the target's list of dependencies. In most cases, this has been fine, but it has caused specifying the libraries to

Re: [FFmpeg-devel] [aarch64] yuv2planeX - unroll outer loop by 4 to increase performance by 6.3%

2020-09-14 Thread Martin Storsjö
Hi, On Tue, 18 Aug 2020, Sebastian Pop wrote: Unrolling by 4 the outer loop in yuv2planeX reduces the number of cache accesses by 7.5%. The values loaded for the filter are used in the 4 unrolled iterations and avoids reloading 3 times the same values. The performance was measured on an Arm64 N

Re: [FFmpeg-devel] [PATCH 1/5] avformat/movenc: split MPEG-4 bit rate value calculation

2020-09-21 Thread Martin Storsjö
On Sun, 20 Sep 2020, Jan Ekström wrote: This can now be re-utilized in other places. --- libavformat/movenc.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 12471c7d68..1962f2 1006

Re: [FFmpeg-devel] [PATCH 2/5] avformat/movenc: utilize the maximum bit rate in ISML writing

2020-09-21 Thread Martin Storsjö
On Sun, 20 Sep 2020, Jan Ekström wrote: This way we have a single location in movenc which utilizes the CPB properties. --- libavformat/movenc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) Looks ok // Martin ___ ffmpeg-devel mailin

Re: [FFmpeg-devel] [PATCH 3/5] avformat/movenc: implement writing of the btrt box

2020-09-21 Thread Martin Storsjö
On Sun, 20 Sep 2020, Jan Ekström wrote: This is utilized by various media ingests to figure out the bit rate of the content you are pushing towards it, so write it by default for video, audio and subtitle tracks. It is only mentioned for timed metadata sample descriptions in QTFF, so limit it on

Re: [FFmpeg-devel] [PATCH 4/5] avformat/movenc: use more fall-back values for average bit rate fields

2020-09-21 Thread Martin Storsjö
On Sun, 20 Sep 2020, Jan Ekström wrote: If the average bit rate cannot be calculated, such as in the case of streamed fragmented mp4, utilize various available parameters in priority order. Tests are updated where the esds or btrt or ISML manifest boxes' output changes. --- libavformat/movenc.c

Re: [FFmpeg-devel] [PATCH 5/5] avformat/movenc: simplify ISML manifest bit rate setting

2020-09-21 Thread Martin Storsjö
On Sun, 20 Sep 2020, Jan Ekström wrote: The newly calculated average bit rate value is pretty much what is being done here. --- libavformat/movenc.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) Ok // Martin ___ ffmpeg-devel ma

Re: [FFmpeg-devel] [PATCH v2 3/5] avformat/movenc: implement writing of the btrt box

2020-09-22 Thread Martin Storsjö
On Mon, 21 Sep 2020, Jan Ekström wrote: This is utilized by various media ingests to figure out the bit rate of the content you are pushing towards it, so write it by default for video, audio and subtitle tracks. It is only mentioned for timed metadata sample descriptions in QTFF, so limit it on

[FFmpeg-devel] [GASPP PATCH] Handle a trailing flags field for .rodata, like '.section .rodata, "r"'

2020-09-22 Thread Martin Storsjö
--- gas-preprocessor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index e51849b..bc36300 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1204,7 +1204,7 @@ sub handle_serialized_line { $line =~ s/\.arm/ARM/x

[FFmpeg-devel] [GASPP PATCH 1/2] Handle line continuations within gas-preprocessor

2020-09-22 Thread Martin Storsjö
If preprocessing with cl.exe, the preprocessor doesn't take care of concatenating continued lines. --- gas-preprocessor.pl | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 126ee50..e9baeba 100755 --- a/gas-prep

[FFmpeg-devel] [GASPP PATCH 2/2] Use cl for preprocessing when using armasm

2020-09-23 Thread Martin Storsjö
When invoking gas-preprocessor to preprocess only to get the dependency list, we still need to use cpp, as cl doesn't support the -M options. This allows using gas-preprocessor in an environment with only MSVC available, no GCC/Clang providing a cpp.exe, allowing building e.g. dav1d with MSVC targ

Re: [FFmpeg-devel] [GASPP PATCH 2/2] Use cl for preprocessing when using armasm

2020-09-25 Thread Martin Storsjö
On Wed, 23 Sep 2020, Martin Storsjö wrote: When invoking gas-preprocessor to preprocess only to get the dependency list, we still need to use cpp, as cl doesn't support the -M options. This allows using gas-preprocessor in an environment with only MSVC available, no GCC/Clang provid

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-09-30 Thread Martin Storsjö
Hi, On Sun, 27 Sep 2020, Zhao Zhili wrote: Fix #8840. Steps to reproduce: 1. sender: ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sdp 2. receiver: ./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i rtsp://localhost:12345/live.sdp -c copy test.mp4 --- v3

[FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-09-30 Thread Martin Storsjö
In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF and should be closed by the receiver as well). In this case, parse_rtsp_message won't try to parse

Re: [FFmpeg-devel] [PATCH v3 2/2] avformat/rtsp: fix parse_rtsp_message

2020-09-30 Thread Martin Storsjö
On Sun, 27 Sep 2020, Zhao Zhili wrote: 1. Remove the assumption that the message method is TEARDOWN. 2. Don't ignore the error code of ff_rtsp_parse_streaming_commands. --- libavformat/rtsp.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-09-30 Thread Martin Storsjö
On Wed, 30 Sep 2020, Zhao Zhili wrote: Hi Martin, On 9/30/20 5:41 PM, Martin Storsjö wrote: In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-10-01 Thread Martin Storsjö
Hi, On Thu, 1 Oct 2020, Andriy Gelman wrote: On Wed, 30. Sep 12:41, Martin Storsjö wrote: Hi, On Sun, 27 Sep 2020, Zhao Zhili wrote: > Fix #8840. > > Steps to reproduce: > 1. sender: > ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sd

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Fix stack overflow when remuxing timecode tracks

2020-10-01 Thread Martin Storsjö
On Wed, 30 Sep 2020, Andreas Rheinhardt wrote: There are two possible kinds of timecode tracks (with tag "tmcd") in the mov muxer: Tracks created internally by the muxer and timecode tracks sent by the user. If any of the latter exists, the former are deactivated. The former all belong to anothe

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-10-01 Thread Martin Storsjö
On Thu, 1 Oct 2020, Andriy Gelman wrote: On Thu, 01. Oct 22:00, Zhao Zhili wrote: On 10/1/20 4:15 AM, Martin Storsjö wrote: > On Wed, 30 Sep 2020, Zhao Zhili wrote: > > > Hi Martin, > > > > On 9/30/20 5:41 PM, Martin Storsjö wrote: > > > In listen mode wi

Re: [FFmpeg-devel] [PATCH v2] avformat/movenc: handle tracks w/o AVStreams in calculate_mpeg4_bit_rates

2020-10-02 Thread Martin Storsjö
On Mon, 28 Sep 2020, Jan Ekström wrote: The generated text streams for chapters lack an AVStream since they are but an internal concept within movenc. Fixes #8190 --- libavformat/movenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/

Re: [FFmpeg-devel] [PATCH 1/6] avformat/rtpdec: update the previous with new seq

2020-10-14 Thread Martin Storsjö
On Wed, 14 Oct 2020, lance.lmw...@gmail.com wrote: From: Limin Wang If the rtp input is discontinued, we'll drop all the new received packets now, It's better to update the previous seq with the new seq so that the following packets will not be dropped always. Signed-off-by: Limin Wang --- l

[FFmpeg-devel] [PATCH] tls: Hook up the url_get_short_seek function in the TLS backends

2020-10-29 Thread Martin Storsjö
This makes sure that small seeks forward on https don't end up doing new requests. --- libavformat/tls_gnutls.c | 7 +++ libavformat/tls_libtls.c | 7 +++ libavformat/tls_mbedtls.c | 7 +++ libavformat/tls_openssl.c | 7 +++ libavformat/tls_schanne

Re: [FFmpeg-devel] [PATCH] tls: Hook up the url_get_short_seek function in the TLS backends

2020-10-29 Thread Martin Storsjö
On Thu, 29 Oct 2020, Andreas Rheinhardt wrote: Martin Storsjö: This makes sure that small seeks forward on https don't end up doing new requests. --- libavformat/tls_gnutls.c | 7 +++ libavformat/tls_libtls.c | 7 +++ libavformat/tls_mbedtls.c

[FFmpeg-devel] [PATCH 2/3] tls: Hook up the url_get_short_seek function in the TLS backends

2020-10-30 Thread Martin Storsjö
This makes sure that small seeks forward on https don't end up doing new requests. --- libavformat/tls.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavformat/tls.h b/libavformat/tls.h index 4f3315427d..d33af80454 100644 --- a/libavformat/tls.h +++ b/libavformat/tls.h @@ -56,10 +5

[FFmpeg-devel] [PATCH 1/3] tls: Share code for common protocol functions and fields

2020-10-30 Thread Martin Storsjö
--- libavformat/tls.h | 13 + libavformat/tls_gnutls.c | 11 ++- libavformat/tls_libtls.c | 11 ++- libavformat/tls_mbedtls.c | 11 ++- libavformat/tls_openssl.c | 11 ++- libavformat/tls_schannel.c

[FFmpeg-devel] [PATCH 3/3] aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB

2020-10-30 Thread Martin Storsjö
The previous threshold, 4 KB, maybe was reasonable when it was set (in 2010), but in today's settings and with typical network speeds and data sizes, it's pretty small. 32 KB probably is a more reasonable default now, regardless of input. --- libavformat/aviobuf.c | 2 +- 1 file changed, 1 inserti

Re: [FFmpeg-devel] [PATCH 3/3] aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB

2020-10-30 Thread Martin Storsjö
On Fri, 30 Oct 2020, Martin Storsjö wrote: The previous threshold, 4 KB, maybe was reasonable when it was set (in 2010), but in today's settings and with typical network speeds and data sizes, it's pretty small. 32 KB probably is a more reasonable default now, regardles

Re: [FFmpeg-devel] [PATCH] tls: Hook up the url_get_short_seek function in the TLS backends

2020-11-04 Thread Martin Storsjö
On Thu, 29 Oct 2020, Andreas Rheinhardt wrote: Martin Storsjö: This makes sure that small seeks forward on https don't end up doing new requests. --- libavformat/tls_gnutls.c | 7 +++ libavformat/tls_libtls.c | 7 +++ libavformat/tls_mbedtls.c

Re: [FFmpeg-devel] [PATCH 2/6] avformat/rtspdec: use SDP_MAX_SIZE for sdp array

2020-11-04 Thread Martin Storsjö
On Wed, 4 Nov 2020, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtspdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index ef084a8..3abf34b 100644 --- a/libavformat/rtspdec.c +++

[FFmpeg-devel] [PATCH] aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB

2020-11-05 Thread Martin Storsjö
The previous threshold, 4 KB, maybe was reasonable when it was set (in 2010), but in today's settings and with typical network speeds and data sizes, it's pretty small. 32 KB probably is a more reasonable default now, regardless of input. This changes the test references for two seek tests. When

Re: [FFmpeg-devel] [PATCH] aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB

2020-11-10 Thread Martin Storsjö
On Thu, 5 Nov 2020, Martin Storsjö wrote: The previous threshold, 4 KB, maybe was reasonable when it was set (in 2010), but in today's settings and with typical network speeds and data sizes, it's pretty small. 32 KB probably is a more reasonable default now, regardless of input. Th

[FFmpeg-devel] [PATCH] fate: Convert the musepack8 test to an oneoff test

2020-11-11 Thread Martin Storsjö
This fixes tests if built for x86 with x87 FPU. --- This requires someone to upload a reference file. --- tests/fate/mpc.mak | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fate/mpc.mak b/tests/fate/mpc.mak index bb1c03d250..cde6e55177 100644 --- a/tests/fate/mpc.mak +

Re: [FFmpeg-devel] [PATCH] configure: fix the bigendian test

2020-11-11 Thread Martin Storsjö
On Wed, 11 Nov 2020, David Michael wrote: There are two issues: The unused global integer does not make it into the compiled object file, so declare it static to correct this. Umm, what? That sounds entirely counterintuitive to me. If the global integer is non-static, it could be referred to

Re: [FFmpeg-devel] [PATCH] fate: Convert the musepack8 test to an oneoff test

2020-11-11 Thread Martin Storsjö
On Thu, 12 Nov 2020, Andreas Rheinhardt wrote: Martin Storsjö: This fixes tests if built for x86 with x87 FPU. --- This requires someone to upload a reference file. --- tests/fate/mpc.mak | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fate/mpc.mak b/tests/fate

[FFmpeg-devel] [PATCH] http: Check for AVERROR_EOF in the check for premature end

2020-11-12 Thread Martin Storsjö
When the check was added (in 3668701f9600, in 2015), some IO functions returned 0 on EOF (in particular, the TCP protocol did, but the TLS protocol returned AVERROR_EOF). Since 0e1f771d2200d in 2017, the TCP protocol also returns AVERROR_EOF instead of 0, making the check for premature end never ha

[FFmpeg-devel] [PATCH] http: Return AVERROR_EOF instead of 0 in some EOF conditions

2020-11-12 Thread Martin Storsjö
IO functions are expected to return AVERROR_EOF instead of 0 nowadays. This is also expected by other higher level layers within the http protocol itself (e.g. the reconnect mechanism). --- libavformat/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/http.

Re: [FFmpeg-devel] [PATCH] http: Check for AVERROR_EOF in the check for premature end

2020-11-17 Thread Martin Storsjö
On Fri, 13 Nov 2020, Martin Storsjö wrote: When the check was added (in 3668701f9600, in 2015), some IO functions returned 0 on EOF (in particular, the TCP protocol did, but the TLS protocol returned AVERROR_EOF). Since 0e1f771d2200d in 2017, the TCP protocol also returns AVERROR_EOF instead of

Re: [FFmpeg-devel] [PATCH] fate: Convert the musepack8 test to an oneoff test

2020-11-17 Thread Martin Storsjö
On Thu, 12 Nov 2020, Martin Storsjö wrote: On Thu, 12 Nov 2020, Andreas Rheinhardt wrote: Martin Storsjö: This fixes tests if built for x86 with x87 FPU. --- This requires someone to upload a reference file. --- tests/fate/mpc.mak | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

Re: [FFmpeg-devel] [PATCH] http: Check for AVERROR_EOF in the check for premature end

2020-11-20 Thread Martin Storsjö
On Fri, 20 Nov 2020, Jan Ekström wrote: On Fri, Nov 13, 2020 at 12:17 AM Martin Storsjö wrote: When the check was added (in 3668701f9600, in 2015), some IO functions returned 0 on EOF (in particular, the TCP protocol did, but the TLS protocol returned AVERROR_EOF). Since 0e1f771d2200d in

Re: [FFmpeg-devel] [PATCH] http: Return AVERROR_EOF instead of 0 in some EOF conditions

2020-11-20 Thread Martin Storsjö
On Fri, 20 Nov 2020, Jan Ekström wrote: On Fri, Nov 13, 2020 at 12:32 AM Martin Storsjö wrote: IO functions are expected to return AVERROR_EOF instead of 0 nowadays. This is also expected by other higher level layers within the http protocol itself (e.g. the reconnect mechanism

Re: [FFmpeg-devel] [PATCH v3 1/6] avformat/rtspdec: add network init to listen mode

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman As per the docs network initialization is required before ff_url_join(). Furthermore, because the ff_network_init() was skipped, this makes one additional call to ff_network_close() if the stream exits without errors. The was forgo

Re: [FFmpeg-devel] [PATCH v3 2/6] avformat/rtspdec: fix mem leaks in listen mode if init fails

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman Signed-off-by: Andriy Gelman --- libavformat/rtspdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 1ff84cdd56..5a383b5a19 100644 --- a/libavformat/rtspdec

Re: [FFmpeg-devel] [PATCH v3 3/6] avformat/rtspdec: fix mem leaks in connect mode if init fails

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman Fixes #6334 Signed-off-by: Andriy Gelman --- libavformat/rtspdec.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 5a383b5a19..7c617837ca 100644

Re: [FFmpeg-devel] [PATCH v3 4/6] avformat/rtspdec: cosmetics

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman Make error check style consistent with rest of function. --- libavformat/rtspdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 7c617837ca..b9fbc45190 100

Re: [FFmpeg-devel] [PATCH v3 5/6] avformat/rtsp: set return variable in error path

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman In this error path ret still stores the number of bytes read in ffurl_read(). Signed-off-by: Andriy Gelman --- libavformat/rtsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e9f

Re: [FFmpeg-devel] [PATCH v3 6/6] avformat/rtsp: don't forget to call ff_network_close() on error

2020-11-20 Thread Martin Storsjö
On Mon, 12 Oct 2020, Andriy Gelman wrote: From: Andriy Gelman In sdp_read_header() some ff_network_close() calls were missed. Also in rtp_read_header() update comment to explain why a single call to ff_network_close() is enough to cover all cases even if sdp_read_header() returns an error. S

[FFmpeg-devel] [PATCH] arm: Skip certain inline assembly functions if built without optimizations

2022-08-26 Thread Martin Storsjö
These inline assembly functions rely on being inlined into the caller, so that the parameter "int p" can be a known assembly time constant, instead of a variable parameter. __OPTIMIZE__ is a built-in define which is set by both GCC and Clang (the two main compilers supporting our inline assembly)

[FFmpeg-devel] [PATCH v2] arm: Check the build time constants in av_clip_*intp2

2022-08-26 Thread Martin Storsjö
This fixes building for arm targets with optimizations disabled. --- libavutil/arm/intmath.h | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index 5311a7d52b..f19b21e98d 100644 --- a/libavutil/arm/intma

[FFmpeg-devel] [PATCH v4] libavcodec: Set hidden visibility on global symbols accessed from AArch64 assembly

2022-08-27 Thread Martin Storsjö
ymbols that are accessed from AArch64 assembly as hidden, so that they are resolved fully at link time even without the version script and -Wl,-Bsymbolic. Signed-off-by: Martin Storsjö --- v4: Moved the attribute definition to a new, standalone header (which only depends on libavut

Re: [FFmpeg-devel] [PATCH v4] libavcodec: Set hidden visibility on global symbols accessed from AArch64 assembly

2022-09-02 Thread Martin Storsjö
On Sat, 27 Aug 2022, Martin Storsjö wrote: The AArch64 assembly accesses those symbols directly, without indirection via e.g. the GOT on ELF. In order for this not to require text relocations, those symbols need to be resolved fully at link time, i.e. those symbols can't be interpo

Re: [FFmpeg-devel] [PATCH v2] arm: Check the build time constants in av_clip_*intp2

2022-09-02 Thread Martin Storsjö
On Fri, 26 Aug 2022, Martin Storsjö wrote: This fixes building for arm targets with optimizations disabled. --- libavutil/arm/intmath.h | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index 5311a7d52b

Re: [FFmpeg-devel] [PATCH 2/2] arm: rv40dsp: Change stride parameters to ptrdiff_t

2022-09-02 Thread Martin Storsjö
On Tue, 9 Aug 2022, Martin Storsjö wrote: These were missed when h264_chroma_mc_func was changed in e4a94d8b36c48d95a7d412c40d7b558422ff659c. Signed-off-by: Martin Storsjö --- libavcodec/arm/rv40dsp_init_arm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) OK'd by Andre

Re: [FFmpeg-devel] [PATCH 5/5] lavc/aarch64: Provide neon implementation of nsse16

2022-09-02 Thread Martin Storsjö
On Mon, 22 Aug 2022, Hubert Mazur wrote: Add vectorized implementation of nsse16 function. Performance comparison tests are shown below. - nsse_0_c: 707.0 - nsse_0_neon: 120.0 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur --- libavcodec/aarch64/me

Re: [FFmpeg-devel] [PATCH 1/5] lavc/aarch64: Add neon implementation for vsad16

2022-09-02 Thread Martin Storsjö
On Mon, 22 Aug 2022, Hubert Mazur wrote: Provide optimized implementation of vsad16 function for arm64. Performance comparison tests are shown below. - vsad_0_c: 285.0 - vsad_0_neon: 42.5 Benchmarks and tests are run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur --- libav

Re: [FFmpeg-devel] [PATCH] avcodec/mathops: Set hidden visibility where advantageous

2022-09-03 Thread Martin Storsjö
On Sat, 3 Sep 2022, Andreas Rheinhardt wrote: It is advantageous for ff_crop_tab, as the base pointer used to access this table is not the first element of it. But the real base pointer is still at a constant offset from the code/the GOT and can therefore be accessed relative to the instruction

<    2   3   4   5   6   7   8   9   10   11   >