[FFmpeg-devel] [PATCH] libavfilter/vf_dnn_detect: bbox index may bigger than bbox number

2023-07-16 Thread wenbin . chen-at-intel . com
From: Wenbin Chen Fix a bug that queried bbox index may bigger than bbox's total number. Signed-off-by: Wenbin Chen --- libavfilter/vf_dnn_detect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c index

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 16. heinäkuuta 2023, 23.32.21 EEST Lynne a écrit : > Introducing additional overhead in the form of a dereference is a point > where instability can creep in. Can you guarantee that a context will > always remain in L1D cache, L1D is not involved here. In version 2, the pointers

[FFmpeg-devel] [PATCH 7/7] avradio/sdr: workaround inverted gain parameter on sdrplay

2023-07-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavradio/sdr.h| 1 + libavradio/sdrdemux.c | 1 + libavradio/sdrinradio.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/libavradio/sdr.h b/libavradio/sdr.h index 395b056531..27ec1db4f3 100644 --- a/libavradio/sdr.h +++

[FFmpeg-devel] [PATCH 6/7] avradio/sdr: Support setting gain value manually and automatic

2023-07-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavradio/sdr.h| 23 +- libavradio/sdrdemux.c | 53 - libavradio/sdrinradio.c | 41 +-- 3 files changed, 113 insertions(+), 4 deletions(-) diff --git

[FFmpeg-devel] [PATCH 5/7] avradio/sdrdemux: adjust bandwidth to 200khz for FM probing

2023-07-16 Thread Michael Niedermayer
This improves the local noise floor value Signed-off-by: Michael Niedermayer --- libavradio/sdrdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c index a4c590acf2..a0b80785ef 100644 --- a/libavradio/sdrdemux.c +++

[FFmpeg-devel] [PATCH 4/7] avradio/sdrdemux: Use a local noise floor in FM Probing

2023-07-16 Thread Michael Niedermayer
The global one caused problems when the spectrum is not flat Signed-off-by: Michael Niedermayer --- libavradio/sdrdemux.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c index

[FFmpeg-devel] [PATCH 3/7] avradio/sdrinradio: Print all tunable elements

2023-07-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavradio/sdrinradio.c | 4 1 file changed, 4 insertions(+) diff --git a/libavradio/sdrinradio.c b/libavradio/sdrinradio.c index f078d27e7b..3956c18375 100644 --- a/libavradio/sdrinradio.c +++ b/libavradio/sdrinradio.c @@ -184,6 +184,10 @@ static int

[FFmpeg-devel] [PATCH 2/7] avradio/sdr: compensate for RTLSDR frequency limitations

2023-07-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavradio/sdr.h| 2 +- libavradio/sdrdemux.c | 9 - libavradio/sdrinradio.c | 10 -- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/libavradio/sdr.h b/libavradio/sdr.h index ac6b7dffe0..dc20415457 100644 ---

[FFmpeg-devel] [PATCH 1/7] avradio/sdrdemux: icarrier just needs phase 2 block size

2023-07-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavradio/sdrdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c index 5a6a9b8894..a545e7cb4c 100644 --- a/libavradio/sdrdemux.c +++ b/libavradio/sdrdemux.c @@ -1543,7 +1543,7 @@ int

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Replace parameter sets generically

2023-07-16 Thread Andreas Rheinhardt
James Almer: > On 7/16/2023 6:18 PM, Andreas Rheinhardt wrote: >> This avoids having a function for each type of parameter set >> for each of the modules. >> >> Signed-off-by: Andreas Rheinhardt >> --- >>   libavcodec/cbs_h2645.c | 134 ++--- >>   1 file

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Replace parameter sets generically

2023-07-16 Thread James Almer
On 7/16/2023 6:18 PM, Andreas Rheinhardt wrote: This avoids having a function for each type of parameter set for each of the modules. Signed-off-by: Andreas Rheinhardt --- libavcodec/cbs_h2645.c | 134 ++--- 1 file changed, 72 insertions(+), 62

[FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Replace parameter sets generically

2023-07-16 Thread Andreas Rheinhardt
This avoids having a function for each type of parameter set for each of the modules. Signed-off-by: Andreas Rheinhardt --- libavcodec/cbs_h2645.c | 134 ++--- 1 file changed, 72 insertions(+), 62 deletions(-) diff --git a/libavcodec/cbs_h2645.c

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-16 Thread Lynne
Jul 15, 2023, 22:13 by r...@remlab.net: > Le lauantaina 15. heinäkuuta 2023, 20.43.26 EEST Lynne a écrit : > >> Jul 15, 2023, 10:26 by r...@remlab.net: >> > Le lauantaina 15. heinäkuuta 2023, 11.05.51 EEST Lynne a écrit : >> >> Jul 14, 2023, 20:29 by r...@remlab.net: >> >> > This makes all calls

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: clip constants used with shift instructions within inline assembly

2023-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 16. heinäkuuta 2023, 19.00.35 EEST Andreas Rheinhardt a écrit : > > @@ -113,19 +121,31 @@ __asm__ volatile(\ > > > > // avoid +32 for shift optimization (gcc should do that ...) > > #define NEG_SSR32 NEG_SSR32 > > static inline int32_t NEG_SSR32( int32_t a, int8_t s){ > > > >

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: clip constants used with shift instructions within inline assembly

2023-07-16 Thread James Almer
On 7/16/2023 1:00 PM, Andreas Rheinhardt wrote: James Almer: From: Rémi Denis-Courmont Fixes assembling with binutil as >= 2.41 Signed-off-by: James Almer --- libavcodec/x86/mathops.h | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: clip constants used with shift instructions within inline assembly

2023-07-16 Thread Andreas Rheinhardt
James Almer: > From: Rémi Denis-Courmont > > Fixes assembling with binutil as >= 2.41 > > Signed-off-by: James Almer > --- > libavcodec/x86/mathops.h | 26 +++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/x86/mathops.h

[FFmpeg-devel] [PATCH] avcodec/x86/mathops: clip constants used with shift instructions within inline assembly

2023-07-16 Thread James Almer
From: Rémi Denis-Courmont Fixes assembling with binutil as >= 2.41 Signed-off-by: James Almer --- libavcodec/x86/mathops.h | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h index

[FFmpeg-devel] [PATCH 2/2] lavc/bswapdsp: purge RISC-V V bswap32

2023-07-16 Thread Rémi Denis-Courmont
This cannot beat the Zbb implementation, and it is unlikely that a real meaningful CPU design would support V and not Zbb. The best loop rewrite that I could come up with (4 shifts, 2 ands, 3 ors) is still ~40% slower than Zbb. A proper faster vector implementation should be feasible with the

[FFmpeg-devel] [PATCH 1/2] lavc/bswapdsp: rewrite RISC-V V bswap16

2023-07-16 Thread Rémi Denis-Courmont
This favours bit-wise logic over slow strided stores. --- libavcodec/riscv/bswapdsp_rvv.S | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/libavcodec/riscv/bswapdsp_rvv.S b/libavcodec/riscv/bswapdsp_rvv.S index ef2999c1be..8b585ec5c9 100644 ---

[FFmpeg-devel] [PATCH 5/5] avcodec/msrleenc: Constify pointers for frame->data

2023-07-16 Thread Andreas Rheinhardt
Encoders (usually) have no business modifying frame->data (which need not be writable), so they should use the appropriate pointers. Signed-off-by: Andreas Rheinhardt --- libavcodec/msrleenc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/msrleenc.c

[FFmpeg-devel] [PATCH 4/4] avcodec/msrleenc: Check frame allocations/references

2023-07-16 Thread Andreas Rheinhardt
Also allocate the AVFrame during init and use av_frame_replace() to replace it later. Signed-off-by: Andreas Rheinhardt --- libavcodec/msrleenc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/msrleenc.c b/libavcodec/msrleenc.c index

[FFmpeg-devel] [PATCH 3/4] avcodec/msrleenc: Remove useless private class

2023-07-16 Thread Andreas Rheinhardt
A private class for an encoder without options is useless. Signed-off-by: Andreas Rheinhardt --- libavcodec/msrleenc.c | 8 1 file changed, 8 deletions(-) diff --git a/libavcodec/msrleenc.c b/libavcodec/msrleenc.c index 264d57e178..d5931f42fe 100644 --- a/libavcodec/msrleenc.c +++

[FFmpeg-devel] [PATCH 2/4] avcodec/msrleenc: Check allocation

2023-07-16 Thread Andreas Rheinhardt
Fixes Coverity issue #1538297. Signed-off-by: Andreas Rheinhardt --- libavcodec/msrleenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/msrleenc.c b/libavcodec/msrleenc.c index e48d11a0f7..264d57e178 100644 --- a/libavcodec/msrleenc.c +++ b/libavcodec/msrleenc.c @@ -250,6

[FFmpeg-devel] [PATCH 1/4] avcodec/msrleenc: Replace stray \r by \n

2023-07-16 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/msrleenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/msrleenc.c b/libavcodec/msrleenc.c index b73aa5e384..e48d11a0f7 100644 --- a/libavcodec/msrleenc.c +++ b/libavcodec/msrleenc.c @@ -234,7 +234,8 @@ static

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/evc_ps: Fix size of tile_(row|column) arrays

2023-07-16 Thread James Almer
On 7/16/2023 11:22 AM, Andreas Rheinhardt wrote: Prevents out-of-bound writes when parsing tile row heights. Fixes Coverity issue #1538300. Signed-off-by: Andreas Rheinhardt --- libavcodec/evc_ps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/evc_ps.h

[FFmpeg-devel] [PATCH 1/3] avcodec/evc_ps: Fix size of tile_(row|column) arrays

2023-07-16 Thread Andreas Rheinhardt
Prevents out-of-bound writes when parsing tile row heights. Fixes Coverity issue #1538300. Signed-off-by: Andreas Rheinhardt --- libavcodec/evc_ps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/evc_ps.h b/libavcodec/evc_ps.h index 0bbec1f138..336953b176

Re: [FFmpeg-devel] [PATCH 1/2] lavc/aacpsdsp: rework RISC-V add_squares

2023-07-16 Thread Rémi Denis-Courmont
Le lauantaina 15. heinäkuuta 2023, 23.57.04 EEST Rémi Denis-Courmont a écrit : > Segmented loads are kinda slow, so this advantageously uses a > unit-strided load and narrowing shifts instead. > > Before: > ps_add_squares_rvv_f32: 30352.2 > > After: > ps_add_squares_rvv_f32: 11973.7 > --- >

[FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_enc: Reindentate after the last commit

2023-07-16 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_enc.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 2c7e29af24..8b750de4e5 100644 --- a/fftools/ffmpeg_enc.c +++

[FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_enc: Remove always-true checks

2023-07-16 Thread Andreas Rheinhardt
frame is always != NULL for audio and video here (this is checked by an assert and the frame is already dereferenced before it reaches this code here). Fixes Coverity issue #1538858. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_enc.c | 4 1 file changed, 4 deletions(-) diff --git

[FFmpeg-devel] [PATCH] swscale/x86/rgb2rgb: fix a Wlto-type-mismatch warning

2023-07-16 Thread psykose
From: psykose fixes a warning when building with --enable-lto: libswscale/x86/swscale.c:323:1: warning: type of 'ff_nv12ToUV_avx' does not match original declaration [-Wlto-type-mismatch] 323 | INPUT_FUNCS(avx); | ^ libswscale/x86/rgb2rgb_template.c:1821:6: note: type mismatch in

[FFmpeg-devel] [PATCH] lavu: add/use flag for RISC-V Zba extension

2023-07-16 Thread Rémi Denis-Courmont
The code was blindly assuming that Zbb or V implied Zba. While the earlier is practically always true, the later broke some QEMU setups, as V was introduced earlier than Zba. --- libavcodec/riscv/aacpsdsp_init.c | 11 ++--- libavcodec/riscv/alacdsp_init.c | 2 +-

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: use constrained immediate operands

2023-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 16. heinäkuuta 2023, 14.55.43 EEST James Almer a écrit : > On 7/16/2023 6:23 AM, Rémi Denis-Courmont wrote: > > Le sunnuntaina 16. heinäkuuta 2023, 2.58.32 EEST James Almer a écrit : > >> Should fix assembling with binutil as >= 2.41 > >> > >> Signed-off-by: James Almer > >> --- >

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: use constrained immediate operands

2023-07-16 Thread James Almer
On 7/16/2023 6:23 AM, Rémi Denis-Courmont wrote: Le sunnuntaina 16. heinäkuuta 2023, 2.58.32 EEST James Almer a écrit : Should fix assembling with binutil as >= 2.41 Signed-off-by: James Almer --- This is IMO a big breakage. binutil's as has until now clipped these values on its own, and

[FFmpeg-devel] [PATCH] checkasm: test Zbb before V

2023-07-16 Thread Rémi Denis-Courmont
Without this, Zbb functions get shadowed by V functions on devices supporting both extensions, and never tested. --- tests/checkasm/checkasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 53cf6c48bb..c6dec0de7a

Re: [FFmpeg-devel] git email hook

2023-07-16 Thread Nicolas George
Michael Niedermayer (12023-07-15): > COMBINED_REFCHANGE_REVISION_SUBJECT_TEMPLATE = ( > '%(emailprefix)s%(refname_type)s %(short_refname)s updated: %(oneline)s' > ) Setting this to: '%(emailprefix)s %(oneline)s (%(refname_type)s %(short_refname))' would yield: [ffmpeg-radio]

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: use constrained immediate operands

2023-07-16 Thread Nicolas George
James Almer (12023-07-15): > Should fix assembling with binutil as >= 2.41 > > Signed-off-by: James Almer > --- > This is IMO a big breakage. binutil's as has until now clipped these values on > its own, and never required the compiler to do it. I confirm it fixes the build failures on

Re: [FFmpeg-devel] [PATCH] avcodec/x86/mathops: use constrained immediate operands

2023-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 16. heinäkuuta 2023, 2.58.32 EEST James Almer a écrit : > Should fix assembling with binutil as >= 2.41 > > Signed-off-by: James Almer > --- > This is IMO a big breakage. binutil's as has until now clipped these values > on its own, and never required the compiler to do it. TBH,

[FFmpeg-devel] [PATCH 2/3] avfilter: add scale_vt for videotoolbox pix_fmt

2023-07-16 Thread Zhao Zhili
From: Zhao Zhili For example, ./ffmpeg -hwaccel videotoolbox \ -hwaccel_output_format videotoolbox_vld \ -i ios-265.mov \ -c:v hevc_videotoolbox \ -profile:v main \ -b:v 3M \ -vf

[FFmpeg-devel] [PATCH 1/3] avcodec/videotoolboxenc: use color parameters conversion from avutil

2023-07-16 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/videotoolboxenc.c | 137 --- 1 file changed, 13 insertions(+), 124 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 6114351392..8e493c4f7a 100644 --- a/libavcodec/videotoolboxenc.c +++

[FFmpeg-devel] [PATCH 3/3] avfilter: add transpose_vt for videotoolbox pix_fmt

2023-07-16 Thread Zhao Zhili
From: Zhao Zhili --- Changelog | 1 + configure | 2 + doc/filters.texi | 48 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h | 2 +- libavfilter/vf_transpose_vt.c |

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_mux_init: fix an array declaration

2023-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 16. heinäkuuta 2023, 11.29.34 EEST Anton Khirnov a écrit : > map_func is supposed to be an array of const pointer to function > returning int, not an array of pointer to function returning const int. > > Reported-By: Martin Storsjö > --- > fftools/ffmpeg_mux_init.c | 2 +- > 1

[FFmpeg-devel] [PATCH] fftools/ffmpeg_mux_init: fix an array declaration

2023-07-16 Thread Anton Khirnov
map_func is supposed to be an array of const pointer to function returning int, not an array of pointer to function returning const int. Reported-By: Martin Storsjö --- fftools/ffmpeg_mux_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux_init.c

Re: [FFmpeg-devel] [PATCH v2 01/14] vvcdec: add thread executor

2023-07-16 Thread Nuo Mi
On Sat, Jul 15, 2023 at 6:38 AM Michael Niedermayer wrote: > On Fri, Jul 07, 2023 at 10:05:27PM +0800, Nuo Mi wrote: > > The executor design pattern was inroduced by java > > < > https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/concurrent/Executor.html > > > > it also

Re: [FFmpeg-devel] [PATCH v2 01/14] vvcdec: add thread executor

2023-07-16 Thread Nuo Mi
On Mon, Jul 10, 2023 at 3:41 PM Nuo Mi wrote: > > > On Sun, Jul 9, 2023 at 5:52 AM Michael Niedermayer > wrote: > >> On Fri, Jul 07, 2023 at 10:05:27PM +0800, Nuo Mi wrote: >> > The executor design pattern was inroduced by java >> > < >>

[FFmpeg-devel] [PATCH v2 2/2] avformat/mov: add support for 'amve' ambient viewing environment box. As defined in ISOBMFF (ISO/IEC 14496-12) document.

2023-07-16 Thread Damiano Galassi
--- libavformat/dump.c | 15 +++ libavformat/isom.h | 3 +++ libavformat/mov.c| 36 libavformat/movenc.c | 22 ++ 4 files changed, 76 insertions(+) diff --git a/libavformat/dump.c b/libavformat/dump.c index

[FFmpeg-devel] [PATCH v2 1/2] avcodec: add ambient viewing environment packet side data.

2023-07-16 Thread Damiano Galassi
--- fftools/ffprobe.c | 3 +++ libavcodec/avpacket.c | 1 + libavcodec/decode.c | 1 + libavcodec/packet.h | 7 +++ 4 files changed, 12 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 1ff76ce809..9f17567897 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c