Re: [FFmpeg-devel] [PATCH 07/11] doc/examples/vaapi_encode: Try to check fwrite() for failure

2024-07-01 Thread Rémi Denis-Courmont
Le 1 juillet 2024 02:12:46 GMT+03:00, Michael Niedermayer a écrit : >Fixes: CID1604548 Unused value > >Sponsored-by: Sovereign Tech Fund >Signed-off-by: Michael Niedermayer >--- > doc/examples/vaapi_encode.c | 4 > 1 file changed, 4 insertions(+) > >diff --git a/doc/examples/vaapi_encode.c

[FFmpeg-devel] [PATCH] lavc/vaapi_{decode, av1}: Fix memory leak in fail codepath

2024-07-01 Thread fei . w . wang-at-intel . com
From: Fei Wang Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c| 9 + libavcodec/vaapi_decode.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index fe0852318d..5451b6055b 100644 --- a/libavcodec/vaapi_av1.

Re: [FFmpeg-devel] [PATCH] avcodec/decode: use avcodec_get_hw_config()

2024-07-01 Thread Anton Khirnov
Quoting Kacper Michajłow (2024-06-02 03:38:18) > Fixes libavcodec/decode.c:1035:61: runtime error: member access within > null pointer of type 'const struct AVCodecHWConfigInternal'. > > This can happen when hwaccel fails to initialize and hw_configs[i] is > NULL. How? All this should be runtime-

Re: [FFmpeg-devel] [PATCH v2] avcodec/mpegvideo_enc: Add check for av_packet_new_side_data()

2024-07-01 Thread Anton Khirnov
Quoting Jiasheng Jiang (2024-06-10 16:18:11) > Add check for av_packet_new_side_data() to avoid null pointer > dereference if allocation fails. > > Fixes: bdc1220eeb ("h263enc: Add an option for outputting info about MBs as > side data") > Signed-off-by: Jiasheng Jiang > --- > Changelog: > > v1

Re: [FFmpeg-devel] [PATCH 01/11] MAINTAINERS: Add Timo Rothenpieler to server admins

2024-07-01 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-01 01:12:40) > Signed-off-by: Michael Niedermayer > --- > MAINTAINERS | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index a82fa58c69f..57f437cd40e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -

Re: [FFmpeg-devel] [PATCH 08/11] fftools/ffmpeg: Check read() for failure

2024-07-01 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-01 01:12:47) > Fixes: CID1591932 Ignoring number of bytes read > Untested, this needs a windows machine > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > fftools/ffmpeg.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletio

Re: [FFmpeg-devel] [PATCH v2 2/4] avfilter/af_volumedetect.c: Added functions for int/float and planar/packed

2024-07-01 Thread Anton Khirnov
Quoting Yigithan Yigit (2024-06-28 22:15:21) > --- > libavfilter/af_volumedetect.c | 58 +++ > 1 file changed, 58 insertions(+) > > diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c > index 327801a7f9..61c00e0248 100644 > --- a/libavfilter/

Re: [FFmpeg-devel] [PATCH v2] libswscale/x86/yuv2rgb: Add missing EMMS

2024-07-01 Thread Ramiro Polla
On Wed, Jun 26, 2024 at 8:55 PM Ramiro Polla wrote: > On Wed, Jun 26, 2024 at 8:03 PM Mario Hros wrote: > > Previous rewrite from inline assembly into nasm (commit e934194) missed the > > required EMMS instruction to bring the x87 FPU back into usable state. > > This needs to be done for 8-byte

[FFmpeg-devel] [PATCH 01/13] avcodec/h261enc: Use LUT to write motion vector differences

2024-07-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261enc.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index a901c32e42..d3d724bef6 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c

[FFmpeg-devel] [PATCH 02/13] avcodec/mpeg12dec: Move resetting last_dc to decoder

2024-07-01 Thread Andreas Rheinhardt
Only the MPEG-1/2, MSMPEG4V1, MPEG-4 and RV.10 decoders use last_dc at all. Of these, RV.10 only uses it for intra frames; it does not need these predictors reset in ff_mpv_reconstruct_mb(). MSMPEG4V1 has h263_pred set, so that last_dc is already not reset in ff_mpv_reconstruct_mb() (instead it is

[FFmpeg-devel] [PATCH 03/13] avcodec/mpeg12enc: Move resetting last_dc to encoder

2024-07-01 Thread Andreas Rheinhardt
The MPEG-1/2 encoders are the only non-intra-only mpegvideo encoders that want last_dc reset when encoding non-intra macroblocks. Therefore move resetting it to mpeg12enc.c. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12enc.c | 2 ++ libavcodec/mpv_reconstruct_mb_templ

[FFmpeg-devel] [PATCH 04/13] avcodec/h263dec: Clean intra tables in decoder, not ff_mpv_reconstruct_mb

2024-07-01 Thread Andreas Rheinhardt
This is a more appropriate place than a function designed to reconstruct a macroblock. It furthermore limits these checks to the codecs that actually need it (and removes it from e.g. RV10 and RV20 -- the latter actually uses these buffers, but only for intra-frames, so they don't need to be cleane

[FFmpeg-devel] [PATCH 05/13] avcodec/mpegvideo_enc: Don't reset intra buffers in mpv_reconstruct_mb()

2024-07-01 Thread Andreas Rheinhardt
It is not part of reconstructing the macroblock. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 11 --- libavcodec/mpv_reconstruct_mb_template.c | 9 - 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/

[FFmpeg-devel] [PATCH 06/13] avcodec/mpv_reconstruct_mb_template: Merge template into its users

2024-07-01 Thread Andreas Rheinhardt
A large part of this template is decoder-only. This makes the complexity of the IS_ENCODER-checks not worth it. So simply merge the template into both its users. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 218 +- libavcodec/mpegvideo_enc.c

[FFmpeg-devel] [PATCH 07/13] avcodec/mpegvideo_{dec, enc}: Reindent after the previous commit

2024-07-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Could be squashed into the preceding commit. libavcodec/mpegvideo_dec.c | 318 ++--- libavcodec/mpegvideo_enc.c | 70 2 files changed, 193 insertions(+), 195 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/li

[FFmpeg-devel] [PATCH 08/13] avcodec/mpegvideo_enc: Don't set qscale_table value prematurely

2024-07-01 Thread Andreas Rheinhardt
When there are multiple candidates for macroblock type, the encoder tries them all. In order to do so, it copies the keeps several sets of states containing the variables that get modified when encoding the macroblock and in the end uses the best of these. Yet one variable was set, but not include

[FFmpeg-devel] [PATCH 10/13] avcodec/motion_est: Avoid branches for put(_no_rnd) selection

2024-07-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/motion_est.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 554fc9780e..b9576e61bf 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_

[FFmpeg-devel] [PATCH 09/13] avcodec/mpegvideo_enc: Add AV_CODEC_CAP_DR1

2024-07-01 Thread Andreas Rheinhardt
The mpegvideo-based encoders do one uncommon thing with the packet's data given by ff_alloc_packet(): They potentially reallocate it. But this only affects the internal buffer and is not user-facing at all, so one can nevertheless use the AV_CODEC_CAP_DR1 for them. Signed-off-by: Andreas Rheinhard

[FFmpeg-devel] [PATCH 11/13] avcodec/mpegvideo_dec: Use picture-dimensions in ff_print_debug_info()

2024-07-01 Thread Andreas Rheinhardt
It will allow to avoid the special case for VC-1 field pictures. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 78fa10c11d..5d8e9a36ec 100644 --- a/

[FFmpeg-devel] [PATCH 12/13] avcodec/vc1dec: Reenable debug-info output for field pictures

2024-07-01 Thread Andreas Rheinhardt
Effectively reverts c59b5e3d1e0121ea23b5b326529f5bdca44cf982. This is possible now that ff_print_debug_info2() uses the MPVPicture dimensions. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1dec.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/vc1dec.c b

[FFmpeg-devel] [PATCH 13/13] avcodec/h261dec: Remove dead check

2024-07-01 Thread Andreas Rheinhardt
H.261 does not have non-reference frames. Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index cabca33c8d..50ac53167d 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/mpeg_er: Don't set block_index unnecessarily

2024-07-01 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Jun 20, 2024 at 05:01:08PM +, Andreas Rheinhardt wrote: >> ffmpeg | branch: master | Andreas Rheinhardt >> | Wed Jun 12 08:37:53 2024 +0200| >> [65d5ccb808ec93de46a2458ea8cc082ce4460f34] | committer: Andreas Rheinhardt >> >> avcodec/mpeg_er: Don't set block_ind

Re: [FFmpeg-devel] [PATCH 02/11] avcodec/vvc/dec: Check ff_init_cabac_decoder() for failure

2024-07-01 Thread Nuo Mi
On Mon, Jul 1, 2024 at 7:13 AM Michael Niedermayer wrote: > Fixes: signed integer overflow: 1107820800 + 1107820800 cannot be > represented in type 'int' > Fixes: left shift of 1091059712 by 6 places cannot be represented in type > 'int' > Fixes: > 69910/clusterfuzz-testcase-minimized-ffmpeg_AV_C

Re: [FFmpeg-devel] [PATCH 06/13] avcodec/mpv_reconstruct_mb_template: Merge template into its users

2024-07-01 Thread Rémi Denis-Courmont
Le 1 juillet 2024 15:16:03 GMT+03:00, Andreas Rheinhardt a écrit : >A large part of this template is decoder-only. This makes >the complexity of the IS_ENCODER-checks not worth it. >So simply merge the template into both its users. > >Signed-off-by: Andreas Rheinhardt >--- > libavcodec/mpegvid

Re: [FFmpeg-devel] [PATCH] avutil/executor: Fix missing check before using mutex

2024-07-01 Thread Nuo Mi
On Sun, Jun 30, 2024 at 6:45 PM Zhao Zhili wrote: > From: Zhao Zhili > > --- > The code can be simplified by always creating mutex/cond. I'm not sure > it worth the overhead. Please note !HAVE_THREADS don't have the same > problem since it has mock implementation of ff_mutex_lock/unlock. > Hi Zh

Re: [FFmpeg-devel] [PATCH 2/2] lavc/h264dsp: R-V V 8-bit luma loop filter

2024-07-01 Thread flow gg
The loop filter horizontal in vp8 also has this issue .. Rémi Denis-Courmont 于2024年6月30日周日 17:04写道: > T-Head C908 (cycles): > h264_h_loop_filter_luma_8bpp_c: 297.5 > h264_h_loop_filter_luma_8bpp_rvv_i32: 374.7 > h264_v_loop_filter_luma_8bpp_c: 862.7 > h264_v_loop_filter_luma_8bpp_rvv

[FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Michael Niedermayer
Hi all coverity seems to have started to do a new thing. Namely if theres a return statement it assumes it can independant of everything occurr an example would be av_rescale() which on overflow returns INT64_MIN also with the right flags av_rescale() will pass INT64_MIN and INT64_MAX through fr

[FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-01 Thread uk7b
From: sunyuechi C908 X60 avg_8_2x2_c:1.21.0 avg_8_2x2_rvv_i32 :1.01.0 avg_8_2x4_c:2.02.0 avg_8_2x4_rvv_i

Re: [FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-01 Thread flow gg
> I am not sure what is_w means or serves here. If you need special cases, this > feels a bit out of place for this macro. It is a special case added to merge the vset of avg and w_avg, how about giving it a default value so that it doesn't affect the use of other functions? > I am not sure if I

Re: [FFmpeg-devel] [PATCH] avutil/executor: Fix missing check before using mutex

2024-07-01 Thread Zhao Zhili
> On Jul 1, 2024, at 21:14, Nuo Mi wrote: > > On Sun, Jun 30, 2024 at 6:45 PM Zhao Zhili wrote: > >> From: Zhao Zhili >> >> --- >> The code can be simplified by always creating mutex/cond. I'm not sure >> it worth the overhead. Please note !HAVE_THREADS don't have the same >> problem since

Re: [FFmpeg-devel] [PATCH 01/11] MAINTAINERS: Add Timo Rothenpieler to server admins

2024-07-01 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 01:07:12PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2024-07-01 01:12:40) > > Signed-off-by: Michael Niedermayer > > --- > > MAINTAINERS | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index

Re: [FFmpeg-devel] [PATCH] avutil/executor: Fix missing check before using mutex

2024-07-01 Thread Nuo Mi
On Mon, Jul 1, 2024 at 10:00 PM Zhao Zhili wrote: > > > > On Jul 1, 2024, at 21:14, Nuo Mi wrote: > > > > On Sun, Jun 30, 2024 at 6:45 PM Zhao Zhili > wrote: > > > >> From: Zhao Zhili > >> > >> --- > >> The code can be simplified by always creating mutex/cond. I'm not sure > >> it worth the ov

Re: [FFmpeg-devel] [PATCH] avdevice/v4l2: add limited support for multiplanar API

2024-07-01 Thread Anton Khirnov
Quoting Ramiro Polla (2024-06-28 13:47:13) > On Thu, Jun 27, 2024 at 6:06 PM Anton Khirnov wrote: > > Quoting Ramiro Polla (2024-06-27 16:13:24) > > > Is anyone fundamentally opposed to this approach to implement limited > > > support for multiplanar API? I figure it could still be useful even > >

Re: [FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-01 Thread Rémi Denis-Courmont
Le maanantaina 1. heinäkuuta 2024, 16.40.29 EEST flow gg a écrit : > > I am not sure what is_w means or serves here. If you need special cases, > > this feels a bit out of place for this macro. > > It is a special case added to merge the vset of avg and w_avg, how about > giving it a default value

Re: [FFmpeg-devel] [PATCH 1/2] lavc/vc1dsp: fuse multiply-adds in R-V V inv_trans_4

2024-07-01 Thread Rémi Denis-Courmont
T-Head C908 (cycles):before after vc1dsp.vc1_inv_trans_4x4_rvv_i32: 128.0 120.0 vc1dsp.vc1_inv_trans_4x8_rvv_i32: 244.0 240.0 vc1dsp.vc1_inv_trans_8x4_rvv_i32: 239.2 235.2 -- レミ・デニ-クールモン http://www.remlab.net/ ___ ffmpeg-devel mai

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vc1dsp: fuse multiply-adds in R-V V inv_trans_8

2024-07-01 Thread Rémi Denis-Courmont
T-Head C908 (cycles) before after vc1dsp.vc1_inv_trans_4x8_rvv_i32: 240.0 228.0 vc1dsp.vc1_inv_trans_8x4_rvv_i32: 235.2 224.2 vc1dsp.vc1_inv_trans_8x8_rvv_i32: 340.7 327.2 -- Rémi Denis-Courmont http://www.remlab.net/ ___ ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'

2024-07-01 Thread Anton Khirnov
Quoting Tomas Härdin (2024-04-16 16:12:13) > tis 2024-04-16 klockan 09:52 -0300 skrev James Almer: > > On Tue, Apr 16, 2024 at 9:38 AM Anton Khirnov > > wrote: > > > > > Quoting Tomas Härdin (2024-04-12 11:40:47) > > > > This idea could be extended to other fields not presently > > > > considered

Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'

2024-07-01 Thread Tomas Härdin
mån 2024-07-01 klockan 16:51 +0200 skrev Anton Khirnov: > Quoting Tomas Härdin (2024-04-16 16:12:13) > > tis 2024-04-16 klockan 09:52 -0300 skrev James Almer: > > > On Tue, Apr 16, 2024 at 9:38 AM Anton Khirnov > > > wrote: > > > > > > > Quoting Tomas Härdin (2024-04-12 11:40:47) > > > > > This i

[FFmpeg-devel] [PATCH 2/2] lavc/h264dsp: R-V V 8-bit MBAFF loop filter

2024-07-01 Thread Rémi Denis-Courmont
Performance is (unfortunately) the same as with non-MBAFF, since the hardware under test does not short-circuit vector tail calculations. (IMO, a generic solution or work-around should be agreed on, rather than bespoke approaches all over the place.) --- libavcodec/riscv/h264dsp_init.c | 4

[FFmpeg-devel] [PATCHv2 1/2] lavc/h264dsp: R-V V 8-bit luma loop filter

2024-07-01 Thread Rémi Denis-Courmont
T-Head C908 (cycles): h264_h_loop_filter_luma_8bpp_c: 297.5 h264_h_loop_filter_luma_8bpp_rvv_i32: 369.2 h264_v_loop_filter_luma_8bpp_c: 862.7 h264_v_loop_filter_luma_8bpp_rvv_i32: 199.7 Performance in the horizontal scenario seems worse than scalar. x86 SSE2 and AVX optimisations are s

Re: [FFmpeg-devel] [PATCH, v2] avformat/mov: get heif image rotation from irot box

2024-07-01 Thread James Almer
On 5/27/2024 12:22 PM, Hacene Bouaroua wrote: parse irot box to get the transformative heif item rotation angle. Signed-off-by: Hacene Bouaroua --- libavformat/avformat.h | 5 + libavformat/isom.h | 1 + libavformat/mov.c | 25 + 3 files changed, 31 i

[FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-01 Thread uk7b
From: sunyuechi C908 X60 avg_8_2x2_c:1.21.0 avg_8_2x2_rvv_i32 :1.01.0 avg_8_2x4_c:2.02.0 avg_8_2x4_rvv_i

Re: [FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-01 Thread flow gg
I reviewed it again, the purpose of is_w is to limit lmul to a maximum of 1/4 of vlen, to prevent vector register shortage, which can also be considered as vset limiting lmul. I renamed it to quarter_len_limit. t0 is changed to t1. 于2024年7月2日周二 00:07写道: > From: sunyuechi > >

Re: [FFmpeg-devel] [FFmpeg-cvslog] checkasm: add tests for yuv2rgb

2024-07-01 Thread Ramiro Polla
On Fri, Jun 28, 2024 at 2:50 PM Ramiro Polla wrote: > > ffmpeg | branch: master | Ramiro Polla | Sun Jun 16 > 22:40:13 2024 +0200| [1fb77347c8d96f4feff8f9328b40e6ee71191ac1] | committer: > Ramiro Polla > > checkasm: add tests for yuv2rgb > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=co

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Fix segfault with intra-only

2024-07-01 Thread Josh Allmann
On Thu, 20 Jun 2024 at 17:39, Josh Allmann wrote: > > In intra-only mode, frameIntervalP is 0, which means the frame > data array is smaller than the number of surfaces. This causes a > crash when closing the encoder. > > Fix this by making sure the frame data array is at least as big as > the num

[FFmpeg-devel] [RFC] [PATCH 1/4] lavc/h264_loopfilter: expose tc0_table (for checkasm)

2024-07-01 Thread Rémi Denis-Courmont
--- libavcodec/h264_loopfilter.c | 50 ++-- libavcodec/h264dsp.h | 2 ++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index c164a289b7..9481882dd0 100644 --- a/libavcodec/h264_l

[FFmpeg-devel] [PATCH 2/4] lavc/h264_loopfilter: align TC and bS tables

2024-07-01 Thread Rémi Denis-Courmont
--- libavcodec/h264_loopfilter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index 9481882dd0..96f572c1d2 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -66,7 +66,7 @@ static

[FFmpeg-devel] [PATCH 3/4] WIP: lavc/h264dsp: take over looking up TC values

2024-07-01 Thread Rémi Denis-Courmont
This moves the look-up of TC values from bS from the generic C loop filter code to the DSP functions. This (potentially) eliminates a round-trip to the stack for the looked-up values. This is work-in-progress. 8 functions need to be updated and this only updates one of them. Also updating the plat

[FFmpeg-devel] [PATCH 4/4] lavc/h264dsp: update R-V V intra luma loop filter

2024-07-01 Thread Rémi Denis-Courmont
Note that the performance reported by checkasm is slightly worse. This is expected since the assembler is now doing more work. --- libavcodec/riscv/h264dsp_init.c | 3 ++- libavcodec/riscv/h264dsp_rvv.S | 6 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/riscv/h2

Re: [FFmpeg-devel] [PATCH] avdevice/v4l2: add limited support for multiplanar API

2024-07-01 Thread Ramiro Polla
On Fri, Jun 28, 2024 at 2:54 PM Ramiro Polla wrote: > I'll apply this after the weekend if there are no objections. I realized this patch would have caused a regression on buffers with corrupted data or an unexpected size. New patch attached. Alexander, Stephen, since you worked on this before,

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Fix segfault with intra-only

2024-07-01 Thread Timo Rothenpieler
On 01.07.2024 18:52, Josh Allmann wrote: On Thu, 20 Jun 2024 at 17:39, Josh Allmann wrote: In intra-only mode, frameIntervalP is 0, which means the frame data array is smaller than the number of surfaces. This causes a crash when closing the encoder. Fix this by making sure the frame data arr

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Fix segfault with intra-only

2024-07-01 Thread Dennis Mungai
On Mon, 1 Jul 2024 at 21:01, Timo Rothenpieler wrote: > On 01.07.2024 18:52, Josh Allmann wrote: > > On Thu, 20 Jun 2024 at 17:39, Josh Allmann > wrote: > >> > >> In intra-only mode, frameIntervalP is 0, which means the frame > >> data array is smaller than the number of surfaces. This causes a

Re: [FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 03:39:23PM +0200, Michael Niedermayer wrote: > Hi all > > coverity seems to have started to do a new thing. Namely if theres a > return statement it assumes it can independant of everything occurr > > an example would be av_rescale() which on overflow returns INT64_MIN >

Re: [FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Timo Rothenpieler
On 01.07.2024 15:39, Michael Niedermayer wrote: Hi all coverity seems to have started to do a new thing. Namely if theres a return statement it assumes it can independant of everything occurr an example would be av_rescale() which on overflow returns INT64_MIN also with the right flags av_resc

[FFmpeg-devel] [PATCH] avcodec/mjpegdec: remove unused parameter from ff_mjpeg_decode_frame_from_buf

2024-07-01 Thread James Almer
Signed-off-by: James Almer --- libavcodec/mjpegdec.c | 4 ++-- libavcodec/mjpegdec.h | 2 +- libavcodec/sp5xdec.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7daec649bc..ace25af90e 100644 --- a/libavcodec/mjpegdec.c +

[FFmpeg-devel] [PATCH 1/4] lavc/h263dsp: add DCT dequantisation functions

2024-07-01 Thread Rémi Denis-Courmont
Note that optimised implementations of these functions will be taken into actual use only if MpegEncContext.dct_unquantize_h263_{inter,intra} are *not* overloaded by existing optimisations. --- libavcodec/h263dsp.c | 25 + libavcodec/h263dsp.h | 4 2 files changed, 29

[FFmpeg-devel] [PATCH 2/4] lavc/mpegvideo: use H263DSP dequant function

2024-07-01 Thread Rémi Denis-Courmont
--- configure | 4 ++-- libavcodec/mpegvideo.c | 40 +--- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/configure b/configure index fed4c44cd1..42b9a72d5a 100755 --- a/configure +++ b/configure @@ -2954,8 +2954,8 @@ ftr_decoder_s

[FFmpeg-devel] [PATCH 3/4] checkasm/h263dsp: test dct_unquantize_{intra, inter}

2024-07-01 Thread Rémi Denis-Courmont
--- tests/checkasm/h263dsp.c | 57 +++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/tests/checkasm/h263dsp.c b/tests/checkasm/h263dsp.c index 2d0957a90b..26020211dc 100644 --- a/tests/checkasm/h263dsp.c +++ b/tests/checkasm/h263dsp.c @@ -18,13

[FFmpeg-devel] [PATCH 4/4] lavc/h263dsp: R-V V dct_unquantize_{intra, inter}

2024-07-01 Thread Rémi Denis-Courmont
T-Head C908: h263dsp.dct_unquantize_inter_c: 3.7 h263dsp.dct_unquantize_inter_rvv_i32: 1.7 h263dsp.dct_unquantize_intra_c: 4.0 h263dsp.dct_unquantize_intra_rvv_i32: 1.5 SpacemiT X60: h263dsp.dct_unquantize_inter_c: 3.5 h263dsp.dct_unquantize_inter_rvv_i32: 1.2 h263dsp.dct_unquant

Re: [FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 08:50:24PM +0200, Timo Rothenpieler wrote: > On 01.07.2024 15:39, Michael Niedermayer wrote: > > Hi all > > > > coverity seems to have started to do a new thing. Namely if theres a > > return statement it assumes it can independant of everything occurr > > > > an example w

Re: [FFmpeg-devel] lavfi: add perlin noise generator

2024-07-01 Thread Stefano Sabatini
On date Sunday 2024-06-16 17:37:09 +0200, Stefano Sabatini wrote: > On date Thursday 2024-06-13 16:45:48 +0100, Andrew Sayers wrote: [...] > Applied other fixes as well, thanks. > From 7d9ffbdb8e419ca01e60604038d5534a3ca8ae0e Mon Sep 17 00:00:00 2001 > From: Stefano Sabatini > Date: Mon, 27 May 2

Re: [FFmpeg-devel] [PATCH 5/5] avfilter/vf_showinfo: don't use sizeof(AVSphericalMapping)

2024-07-01 Thread Stefano Sabatini
On date Wednesday 2024-06-26 11:10:14 -0300, James Almer wrote: > It's not part of the libavutil ABI. > > Signed-off-by: James Almer > --- > libavfilter/vf_showinfo.c | 5 - > 1 file changed, 5 deletions(-) All patches look good to me, thanks. ___

Re: [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Do not EOF on WAIT events

2024-07-01 Thread Stefano Sabatini
On date Wednesday 2024-06-26 20:34:35 -0500, Marth64 wrote: > A DVDNAV_WAIT event by itself should not warrant an > EOF when navigating the program stream. Some discs > have WAIT events in the middle of a title, causing > playback to end prematurely prior to this fix. > > Signed-off-by: Marth64 >

Re: [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Fix duration logic with 1 chapter and validate chapter range

2024-07-01 Thread Stefano Sabatini
On date Wednesday 2024-06-26 22:05:46 -0500, Marth64 wrote: > Chapters and duration are calculated together in dvdvideo demuxer. > Previous chapter calculation logic treated extraction of 1 chapter > using chapter_start and chapter_end switches incorrectly, returning > the duration of the entire ti

Re: [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Fix duration logic with 1 chapter and validate chapter range

2024-07-01 Thread Stefano Sabatini
On date Monday 2024-07-01 22:49:42 +0200, Stefano Sabatini wrote: > On date Wednesday 2024-06-26 22:05:46 -0500, Marth64 wrote: > > Chapters and duration are calculated together in dvdvideo demuxer. > > Previous chapter calculation logic treated extraction of 1 chapter > > using chapter_start and c

Re: [FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 10:19:31PM +0200, Michael Niedermayer wrote: > On Mon, Jul 01, 2024 at 08:50:24PM +0200, Timo Rothenpieler wrote: > > On 01.07.2024 15:39, Michael Niedermayer wrote: > > > Hi all > > > > > > coverity seems to have started to do a new thing. Namely if theres a > > > return s

Re: [FFmpeg-devel] [RFC]] swscale modernization proposal

2024-07-01 Thread Stefano Sabatini
On date Monday 2024-06-24 16:44:33 +0200, Vittorio Giovara wrote: > On Sun, Jun 23, 2024 at 7:57 PM James Almer wrote: > > > On 6/22/2024 7:19 PM, Vittorio Giovara wrote: > > > Needless to say I support the plan of renaming the library so that it can > > > be inline with the other libraries names

Re: [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Fix duration logic with 1 chapter and validate chapter range

2024-07-01 Thread Marth64
> What is the meaning of the 0 special case? If chapter_end is 0, this means "end". So you can say, -chapter_start 5 -chapter_end 0 and demuxer will go from chapter 5 to end of title. This is also in the public docs since initial demuxer merge. Thank you!

Re: [FFmpeg-devel] [PATCH] avfilter/af_afade: fix opt_type for nb_samples/ns

2024-07-01 Thread Stefano Sabatini
On date Saturday 2024-06-22 15:20:52 +0200, Andreas Rheinhardt wrote: > Andrew Sayers: > > The actual value is an int64_t, and is accessed elsewhere as > > AV_OPT_TYPE_INT64. > > > > Accessing it as INT will likely cause bugs on some 32-bit architectures. > > Whether this works or not will depen

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Fix segfault with intra-only

2024-07-01 Thread Timo Rothenpieler
On 01.07.2024 20:05, Dennis Mungai wrote: On Mon, 1 Jul 2024 at 21:01, Timo Rothenpieler wrote: On 01.07.2024 18:52, Josh Allmann wrote: On Thu, 20 Jun 2024 at 17:39, Josh Allmann wrote: In intra-only mode, frameIntervalP is 0, which means the frame data array is smaller than the number o

Re: [FFmpeg-devel] Development process for explaining contexts (was Re: [PATCH v6 1/4] doc: Explain what "context" means)

2024-07-01 Thread Stefano Sabatini
On date Sunday 2024-06-16 19:02:51 +0100, Andrew Sayers wrote: > Meta note #1: I've replied in this thread but changed the subject line. > That's because it needs to stay focussed on solving this thread's problem, > but may be of more general interest. > > Meta note #2: Stefano, I appreciate your

Re: [FFmpeg-devel] [PATCH v3 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-07-01 Thread Stefano Sabatini
On date Sunday 2024-06-16 18:08:28 +0100, Andrew Sayers wrote: > AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM is fine by me, here's a patch. > I've added a "@deprecated" comment for the old name, but would this > need to be queued up for 8.0? Technically this is a backwards-incompatible > change to the e

Re: [FFmpeg-devel] [PATCH v3 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM

2024-07-01 Thread Stefano Sabatini
On date Sunday 2024-06-16 18:08:29 +0100, Andrew Sayers wrote: > The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - > some things can be set at runtime, others are read-only. Clarify that > this refers to options that can be set after the struct is initialized. > --- > liba

Re: [FFmpeg-devel] [PATCH 1/3] avformat/cafdec: sanity check channels and bps

2024-07-01 Thread Michael Niedermayer
On Sun, Jun 30, 2024 at 08:07:28PM -0300, James Almer wrote: > On 6/29/2024 8:37 PM, Michael Niedermayer wrote: > > On Wed, Jun 26, 2024 at 09:52:44PM -0300, James Almer wrote: > > > On 3/22/2024 8:08 PM, Michael Niedermayer wrote: > > > > Fixes: Timeout > > > > Fixes: > > > > 67044/clusterfuzz-te

[FFmpeg-devel] [PATCH v2] doc/examples/vaapi_encode: Try to check fwrite() for failure

2024-07-01 Thread Michael Niedermayer
Fixes: CID1604548 Unused value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- doc/examples/vaapi_encode.c | 4 1 file changed, 4 insertions(+) diff --git a/doc/examples/vaapi_encode.c b/doc/examples/vaapi_encode.c index d5f472f6dd8..ff3ebb1e2b8 100644 --- a/doc/ex

Re: [FFmpeg-devel] [PATCH 02/11] avcodec/vvc/dec: Check ff_init_cabac_decoder() for failure

2024-07-01 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 08:54:33PM +0800, Nuo Mi wrote: > On Mon, Jul 1, 2024 at 7:13 AM Michael Niedermayer > wrote: > > > Fixes: signed integer overflow: 1107820800 + 1107820800 cannot be > > represented in type 'int' > > Fixes: left shift of 1091059712 by 6 places cannot be represented in type

Re: [FFmpeg-devel] [PATCH 1/3] avformat/cafdec: sanity check channels and bps

2024-07-01 Thread James Almer
On 7/1/2024 8:42 PM, Michael Niedermayer wrote: On Sun, Jun 30, 2024 at 08:07:28PM -0300, James Almer wrote: On 6/29/2024 8:37 PM, Michael Niedermayer wrote: On Wed, Jun 26, 2024 at 09:52:44PM -0300, James Almer wrote: On 3/22/2024 8:08 PM, Michael Niedermayer wrote: Fixes: Timeout Fixes: 67

[FFmpeg-devel] [PATCH v3 0/5] avfilter/af_volumedetect.c: Add 32bit float audio

2024-07-01 Thread Yigithan Yigit
changes since v1: - Defined callback and assigning to filter frame according to planar/packed and float/int. - Fixed rounding same value 2 times - Subnormal values are supported - Replaced square division with ldexp Yigithan Yigit (5): avfilter/af_volumedetect.c: Move logdb function avfilter/

[FFmpeg-devel] [PATCH v3 1/5] avfilter/af_volumedetect.c: Move logdb function

2024-07-01 Thread Yigithan Yigit
--- libavfilter/af_volumedetect.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 8b001d1cf2..327801a7f9 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@

[FFmpeg-devel] [PATCH v3 2/5] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-07-01 Thread Yigithan Yigit
--- libavfilter/af_volumedetect.c | 139 ++ 1 file changed, 107 insertions(+), 32 deletions(-) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 327801a7f9..edd2d56f7a 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_vo

[FFmpeg-devel] [PATCH v3 3/5] avfilter/af_volumedetect.c: Added functions for int/float and planar/packed

2024-07-01 Thread Yigithan Yigit
--- libavfilter/af_volumedetect.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index edd2d56f7a..778f0cac6c 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -7

[FFmpeg-devel] [PATCH v3 4/5] avfilter/af_volumedetect.c: reindent after last commit

2024-07-01 Thread Yigithan Yigit
--- libavfilter/af_volumedetect.c | 62 +-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 778f0cac6c..a53212015d 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_vol

[FFmpeg-devel] [PATCH v3 5/5] Replace division with ldexp

2024-07-01 Thread Yigithan Yigit
--- libavfilter/af_volumedetect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index a53212015d..856d5a295d 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -49,7 +49,7 @@ static i

[FFmpeg-devel] [PATCH v3] avformat/dvdvideodec: Fix incorrect padding cell trim logic

2024-07-01 Thread Marth64
When -trim option is used (by default), padding cells at the beginning of the title are supposed to be ignored. The current implementation does the ignoring after we have locked on to the PGC navigation event stream, but does not set the PGC/PG state properly. This causes false positives and error

Re: [FFmpeg-devel] [PATCH v3 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM

2024-07-01 Thread Zhao Zhili
> 在 2024年7月2日,上午6:33,Stefano Sabatini 写道: > > On date Sunday 2024-06-16 18:08:29 +0100, Andrew Sayers wrote: >> The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - >> some things can be set at runtime, others are read-only. Clarify that >> this refers to options that can

[FFmpeg-devel] [PATCH] swresample/swresample: Rectify invalid function in the documentation

2024-07-01 Thread marszuo
From: Mars Zuo The function av_opt_set_channel_layout has been removed since version 7.0, and the replacement is av_opt_set_chlayout. The documentation needs to be updated accordingly. --- libswresample/swresample.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswres

Re: [FFmpeg-devel] [RFC] av_rescale() coverity

2024-07-01 Thread Vittorio Giovara
On Mon, Jul 1, 2024 at 11:00 PM Michael Niedermayer wrote: > On Mon, Jul 01, 2024 at 10:19:31PM +0200, Michael Niedermayer wrote: > > On Mon, Jul 01, 2024 at 08:50:24PM +0200, Timo Rothenpieler wrote: > > > On 01.07.2024 15:39, Michael Niedermayer wrote: > > > > Hi all > > > > > > > > coverity se

[FFmpeg-devel] [PATCH] doc/filter: fix grammar in tiltandshift filter

2024-07-01 Thread Gyan Doshi
--- doc/filters.texi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 0ff7c142b6..c9c4f7cf6b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -23546,13 +23546,13 @@ tile=3x2:nb_frames=5:padding=7:margin=2 @end itemize

[FFmpeg-devel] [PATCH] avformat/dvdvideodec: Don't add chapter markers for empty/dummy PTTs

2024-07-01 Thread Marth64
Some discs (usually same ones with padding cells), also have empty padding PTTs / chapters to accompany them. This results, for example, in an extra chapter marker that starts and ends at 0 (no duration). Don't add these empty chapter markers. Signed-off-by: Marth64 --- libavformat/dvdvideodec.

Re: [FFmpeg-devel] [PATCH v3 2/5] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-07-01 Thread Rémi Denis-Courmont
Le 2 juillet 2024 04:33:51 GMT+03:00, Yigithan Yigit a écrit : >--- > libavfilter/af_volumedetect.c | 139 ++ > 1 file changed, 107 insertions(+), 32 deletions(-) Did you try to compile this patch? > >diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_v

Re: [FFmpeg-devel] [PATCH v3 2/5] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-07-01 Thread Rémi Denis-Courmont
Le 2 juillet 2024 08:46:53 GMT+03:00, "Rémi Denis-Courmont" a écrit : > > >Le 2 juillet 2024 04:33:51 GMT+03:00, Yigithan Yigit > a écrit : >>--- >> libavfilter/af_volumedetect.c | 139 ++ >> 1 file changed, 107 insertions(+), 32 deletions(-) > >Did you try to co

Re: [FFmpeg-devel] [PATCH v3 2/5] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-07-01 Thread Rémi Denis-Courmont
Le 2 juillet 2024 04:33:51 GMT+03:00, Yigithan Yigit a écrit : >--- > libavfilter/af_volumedetect.c | 139 ++ > 1 file changed, 107 insertions(+), 32 deletions(-) > >diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c >index 327801a7f9..edd2

[FFmpeg-devel] [PATCH] avformat/dvdvideodec: Remove redundant ret initializations

2024-07-01 Thread Marth64
Remove initializing ret = 0, in areas where ret is only used to hold an error value, immediately returned, and the function would otherwise return a literal 0. Signed-off-by: Marth64 --- libavformat/dvdvideodec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/li

Re: [FFmpeg-devel] [PATCH v3] avformat/dvdvideodec: Fix incorrect padding cell trim logic

2024-07-01 Thread Marth64
Gah. Screwed this one up again. See v4. (This will be the last time). Sorry, this was a really frustrating one to fix/test. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link

[FFmpeg-devel] [PATCH v4] avformat/dvdvideodec: Fix incorrect padding cell trim logic

2024-07-01 Thread Marth64
When -trim option is used (by default), padding cells at the beginning of the title are supposed to be ignored. The current implementation does the ignoring after we have locked on to the PGC navigation event stream, but does not set the PGC/PG state properly. This causes false positives and error