[FFmpeg-devel] [PATCH 1/2] lavc/vaapi_decode: Make it possible to send multiple slice params buffers

2024-04-28 Thread David Rosca
--- libavcodec/vaapi_av1.c| 2 +- libavcodec/vaapi_decode.c | 3 ++- libavcodec/vaapi_decode.h | 1 + libavcodec/vaapi_h264.c | 2 +- libavcodec/vaapi_hevc.c | 4 ++-- libavcodec/vaapi_mjpeg.c | 2 +- libavcodec/vaapi_mpeg2.c | 2 +- libavcodec/vaapi_mpeg4.c | 2 +- libavcodec/vaapi_vc1

[FFmpeg-devel] [PATCH 2/2] lavc/vaapi_av1: Avoid sending the same slice buffer multiple times

2024-04-28 Thread David Rosca
When there are multiple tiles in one slice buffer, use multiple slice params to avoid sending the same slice buffer multiple times and thus increasing the bitstream size the driver will need to upload to hw. --- libavcodec/vaapi_av1.c | 37 +++-- 1 file changed, 23

[FFmpeg-devel] [PATCH 1/9] lavu/hwcontext_qsv: update AVQSVFramesContext to support dynamic frame pool

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Add AVQSVFramesContext.info and update the description. Signed-off-by: Haihao Xiang --- doc/APIchanges| 3 +++ libavutil/hwcontext_qsv.c | 4 ++-- libavutil/hwcontext_qsv.h | 28 +--- libavutil/version.h | 4 ++-- 4 files changed,

[FFmpeg-devel] [PATCH 2/9] lavu/hwcontext_qsv: create dynamic frame pool if required

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang When AVHWFramesContext.initial_pool_size is 0, a dynamic frame pool is required. We may support this under certain conditions, e.g. oneVPL 2.9+ support dynamic frame allocation, we needn't provide a fixed frame pool in the mfxFrameAllocator.Alloc callback. Signed-off-by: Haiha

[FFmpeg-devel] [PATCH 3/9] lavu/hwcontext_qsv: add support for dynamic frame pool in qsv_frames_derive_to

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Make it work with the source which has a dynamic frame pool. Signed-off-by: Haihao Xiang --- libavutil/hwcontext_qsv.c | 61 ++- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext

[FFmpeg-devel] [PATCH 4/9] lavu/hwcontext_qsv: add support for dynamic frame pool in qsv_map_to

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Make it work with the source which has a dynamic frame pool. Signed-off-by: Haihao Xiang --- libavutil/hwcontext_qsv.c | 131 +- 1 file changed, 129 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontex

[FFmpeg-devel] [PATCH 5/9] lavc/qsv: fix the mfx allocator to support dynamic frame pool

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang When the external allocator is used for dynamic frame allocation, only video memory is supported, the SDK doesn't lock/unlock the memory block via Lock()/Unlock() calls. Signed-off-by: Haihao Xiang --- libavcodec/qsv.c | 68 +++- 1

[FFmpeg-devel] [PATCH 6/9] lavc/qsvenc: use the right info for encoding

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavcodec/qsvenc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 018d193495..ca1a88e49f 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -744,8 +744,

[FFmpeg-devel] [PATCH 9/9] lavfi/qsvvpp: require a dynamic frame pool for output if possible

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 52 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 6814d8add8..f3897823db 100644 --- a/libavfilter/qsvvpp.c +

[FFmpeg-devel] [PATCH 7/9] lavc/qsvdec: require a dynamic frame pool if possible

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang This allows a downstream element stores more frames from qsv decoders and fixes error in get_buffer(). $ ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 -vf reverse -f null - [vist#0:0/h264 @ 0x562248f12c50] Decoding error: Cannot allocate memory [h264_qsv @ 0x562

[FFmpeg-devel] [PATCH 8/9] lavfi/qsvvpp: use the right mfxFrameInfo when dynamic frame pool is used

2024-04-28 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 8c92fec0c1..6814d8add8 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -308,7 +308,7 @@ s

[FFmpeg-devel] [PATCH] avcodec/aacenc: don't redundantly re-compute max sfb

2024-04-28 Thread Yotam Ofek
Remove an unneeded inner loop in adjust_frame_information that had no effect, the loop body can be run only once and will compute the same max sfb. --- libavcodec/aacenc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 7f

Re: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN

2024-04-28 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Zhao > Zhili > Sent: Sunday, April 28, 2024 12:42 AM > To: ffmpeg-devel@ffmpeg.org > Cc: Zhao Zhili > Subject: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN > > From: Zhao Zhili > > During the refactor progress, I have found some

Re: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN

2024-04-28 Thread Zhao Zhili
> On Apr 28, 2024, at 18:34, Guo, Yejun > wrote: > >> -Original Message- >> From: ffmpeg-devel > > On Behalf Of Zhao >> Zhili >> Sent: Sunday, April 28, 2024 12:42 AM >> To: ffmpeg-devel@ffmpeg.org >> Cc: Zhao Zhi

Re: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN

2024-04-28 Thread Paul B Mahol
Extremely low quality filters, both in source code quality and performance/security and output quality should be queued for removal. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, vi

Re: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN

2024-04-28 Thread Zhao Zhili
> On Apr 28, 2024, at 18:58, Paul B Mahol wrote: > > Extremely low quality filters, both in source code quality and > performance/security and output quality should be queued for removal. I don’t think there is any replacement for the function provided by dnn_detect, which is very important for

Re: [FFmpeg-devel] [PATCH] avcodec/aacenc: don't redundantly re-compute max sfb

2024-04-28 Thread Lynne
Apr 28, 2024, 11:37 by yotam.o...@gmail.com: > Remove an unneeded inner loop in adjust_frame_information that > had no effect, the loop body can be run only once and will compute > the same max sfb. > --- > libavcodec/aacenc.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > di

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles

2024-04-28 Thread Mark Thompson
On 24/04/2024 14:45, Xiang, Haihao wrote: > On Ma, 2024-04-22 at 22:23 +0100, Mark Thompson wrote: >> Rather than turning the constraint flags into a single profile and then >> searching for that profile (and failing if it doesn't match any profile >> exactly), instead search all supported profiles

Re: [FFmpeg-devel] [PATCH v3 1/4] lavu: Remove libva 1.x support

2024-04-28 Thread Mark Thompson
On 24/04/2024 15:06, Xiang, Haihao wrote: > On Ma, 2024-04-22 at 22:41 +0100, Mark Thompson wrote: >> libva 2.0 was released in 2017 and the 2.x versions are included in all >> supported distributions nowadays. >> --- >> Rebased. >> >> I think we can also drop the other quirks?  They are for the pr

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vc1dsp: R-V V mspel_pixels

2024-04-28 Thread Rémi Denis-Courmont
Le sunnuntaina 7. huhtikuuta 2024, 8.38.54 EEST flow gg a écrit : > ping I have been away for a while, and catching up takes time, sorry. -- レミ・デニ-クールモン http://www.remlab.net/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mai

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index

2024-04-28 Thread Rémi Denis-Courmont
Le torstaina 11. huhtikuuta 2024, 10.50.01 EEST Lynne a écrit : > Is there a reason why we can't switch to IPv4 addresses mapped > in IPv6 and just use the IPv6 API everywhere? IPv6-mapped IPv4 addresses are pretty much deprecated, if supported anymore. Some people consider them insecure. But eve

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index

2024-04-28 Thread Lynne
Apr 28, 2024, 20:15 by r...@remlab.net: > Le torstaina 11. huhtikuuta 2024, 10.50.01 EEST Lynne a écrit : > >> Is there a reason why we can't switch to IPv4 addresses mapped >> in IPv6 and just use the IPv6 API everywhere? >> > > IPv6-mapped IPv4 addresses are pretty much deprecated, if supported

[FFmpeg-devel] [PATCH 1/5] tools/opt_common: Check for malloc failure

2024-04-28 Thread Michael Niedermayer
Fixes: CID1539100 Negative loop bound Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- fftools/opt_common.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 947a226d8d1..9d2d5184a08 100644

[FFmpeg-devel] [PATCH 2/5] avcodec/aaccoder: assert that escape case len is not causing issues

2024-04-28 Thread Michael Niedermayer
Inspired by CID1465483 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/aaccoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 4ce54ca8867..6e5817e237b 100644 --- a/lib

[FFmpeg-devel] [PATCH 3/5] avcodec/ac3_parser: Check init_get_bits8() for failure

2024-04-28 Thread Michael Niedermayer
Fixes: CID1420393 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/ac3_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 4152fd4e018..4e0ba734818 100644

[FFmpeg-devel] [PATCH 4/5] avcodec/amrwbdec: assert mode to be valid in decode_fixed_vector()

2024-04-28 Thread Michael Niedermayer
Inspired-by: CID1473499 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/amrwbdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 9d75b972fa7..21a730b835d 100644 --- a/li

[FFmpeg-devel] [PATCH 5/5] avcodec/atrac9dec: Check init_get_bits8() for failure

2024-04-28 Thread Michael Niedermayer
Fixes: CID1439569 Unchecked return value Fixes: CID1439578 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/atrac9dec.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/aaccoder: assert that escape case len is not causing issues

2024-04-28 Thread Lynne
Apr 28, 2024, 23:31 by mich...@niedermayer.cc: > Inspired by CID1465483 Unintentional integer overflow > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/aaccoder.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/aaccoder.c b/libav

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/atrac9dec: Check init_get_bits8() for failure

2024-04-28 Thread Lynne
Apr 28, 2024, 23:31 by mich...@niedermayer.cc: > Fixes: CID1439569 Unchecked return value > Fixes: CID1439578 Unchecked return value > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/atrac9dec.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deleti

Re: [FFmpeg-devel] [PATCH] doc/Doxfyile: Refactor for maintainability

2024-04-28 Thread Michael Niedermayer
Hi On Sun, Apr 28, 2024 at 11:10:22AM +0100, Andrew Sayers wrote: [...] > Ping ? > > Michael, this is in response to your request[0]. I've queued up some more > patches that depend on this and would help attract and retain developers (e.g. > warning when you're looking at old documentation). Wh

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/aaccoder: assert that escape case len is not causing issues

2024-04-28 Thread Michael Niedermayer
On Sun, Apr 28, 2024 at 11:41:20PM +0200, Lynne wrote: > Apr 28, 2024, 23:31 by mich...@niedermayer.cc: > > > Inspired by CID1465483 Unintentional integer overflow > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/aaccoder.c | 2 ++ > > 1 fil

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/aaccoder: assert that escape case len is not causing issues

2024-04-28 Thread Lynne
Apr 28, 2024, 23:57 by mich...@niedermayer.cc: > On Sun, Apr 28, 2024 at 11:41:20PM +0200, Lynne wrote: > >> Apr 28, 2024, 23:31 by mich...@niedermayer.cc: >> >> > Inspired by CID1465483 Unintentional integer overflow >> > >> > Sponsored-by: Sovereign Tech Fund >> > Signed-off-by: Michael Niederma

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index

2024-04-28 Thread Brad Smith
On 2024-04-28 2:15 p.m., Rémi Denis-Courmont wrote: Le torstaina 11. huhtikuuta 2024, 10.50.01 EEST Lynne a écrit : Is there a reason why we can't switch to IPv4 addresses mapped in IPv6 and just use the IPv6 API everywhere? IPv6-mapped IPv4 addresses are pretty much deprecated, if supported an

[FFmpeg-devel] [PATCH 01/14] avcodec/get_buffer: Remove redundant check

2024-04-28 Thread Andreas Rheinhardt
It is unnecessary to check for whether the number of planes of an already existing audio pool coincides with the number of planes to use for the frame: If the common format of both is planar, then the number of planes coincides with the number of channels for which there is already a check*; if not

[FFmpeg-devel] [PATCH 02/14] avcodec/mpegpicture: Store linesize in ScratchpadContext

2024-04-28 Thread Andreas Rheinhardt
The mpegvideo-based codecs currently require the linesize to be constant (except when the frame dimensions change); one reason for this is that certain scratch buffers whose size depend on linesize are only allocated once and are presumed to be correctly sized if the pointers are != NULL. This com

[FFmpeg-devel] [PATCH 03/14] avcodec/mpegvideo_dec: Sync linesize and uvlinesize between threads

2024-04-28 Thread Andreas Rheinhardt
linesize and uvlinesize are supposed to be the common linesize of all the Y/UV-planes of all the currently cached pictures. ff_mpeg_update_thread_context() syncs the pictures, yet it did not sync linesize and uvlinesize. This mostly works, because ff_alloc_picture() only accepts new pictures if the

[FFmpeg-devel] [PATCH 04/14] avcodec/mpegvideo_dec: Factor allocating dummy frames out

2024-04-28 Thread Andreas Rheinhardt
This will allow to reuse it to allocate dummy frames for the second field (which can be a P-field even if the first field was an intra field). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 85 +++--- libavcodec/mpegvideodec.h | 4 ++ 2 files

[FFmpeg-devel] [PATCH 05/14] avcodec/mpegpicture: Mark dummy frames as such

2024-04-28 Thread Andreas Rheinhardt
This will allow to avoid outputting them. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegpicture.c | 2 ++ libavcodec/mpegpicture.h | 1 + libavcodec/mpegvideo_dec.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c index aa882cf

[FFmpeg-devel] [PATCH 07/14] avcodec/mpegvideo_motion: Remove dead checks for existence of reference

2024-04-28 Thread Andreas Rheinhardt
These references now always exist due to dummy frames. Also remove the corresponding checks in the lowres code in mpegvideo_dec.c. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c| 12 libavcodec/mpegvideo_motion.c | 12 2 files changed, 8 insertions

[FFmpeg-devel] [PATCH 08/14] avcodec/mpegvideo_motion: Optimize check away

2024-04-28 Thread Andreas Rheinhardt
Only MPEG-2 can have field motion vectors with coded fields. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_motion.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index 01c8d82e98..5b72196395 10

[FFmpeg-devel] [PATCH 09/14] avcodec/mpegvideo_motion: Optimize check away

2024-04-28 Thread Andreas Rheinhardt
When !CONFIG_SMALL, we create separate functions for FMT_MPEG1 (i.e. for MPEG-1/2); given that there are only three possibilities for out_format (FMT_MPEG1, FMT_H263 and FMT_H261 -- MJPEG and SpeedHQ are both intra-only and do not have motion vectors at all, ergo they don't call this function), one

[FFmpeg-devel] [PATCH 10/14] avcodec/mpegvideo_motion: Avoid constant function argument

2024-04-28 Thread Andreas Rheinhardt
Always 8. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_motion.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index ccda20c0f1..56bdce59c0 100644 --- a/libavcodec/mpegvideo_motion.c +++

[FFmpeg-devel] [PATCH 11/14] avcodec/msmpeg4enc: Only calculate coded_cbp when used

2024-04-28 Thread Andreas Rheinhardt
With this patch, msmpeg4v1 and msmpeg4v2 no longer use MpegEncContext.coded_block. Signed-off-by: Andreas Rheinhardt --- libavcodec/msmpeg4enc.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c ind

[FFmpeg-devel] [PATCH 06/14] avcodec/mpeg12dec: Allocate dummy frames for non-I fields

2024-04-28 Thread Andreas Rheinhardt
MPEG-2 allows to pair an intra field (as first field) together with a P-field. In this case a conformant bitstream has to satisfy certain restrictions in order to ensure that only the I field is used for prediction. See section 7.6.3.5 of the MPEG-2 specifications. We do not check these restrictio

[FFmpeg-devel] [PATCH 12/14] avcodec/mpegvideo: Only allocate coded_block when needed

2024-04-28 Thread Andreas Rheinhardt
It is only needed for msmpeg4v3, wmv1, wmv2 and VC-1. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 130ccb4c97..74be22346d 100644 --- a/libavcodec/

[FFmpeg-devel] [PATCH 14/14] avcodec/mpegvideo: Only allocate cbp_table, pred_dir_table when needed

2024-04-28 Thread Andreas Rheinhardt
Namely for the MPEG-4 decoder. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index ca6e637920..2ef69a5224 100644 --- a/libavcodec/mpegvideo.c +++ b/lib

[FFmpeg-devel] [PATCH 13/14] avcodec/mpegvideo: Don't reset coded_block unnecessarily

2024-04-28 Thread Andreas Rheinhardt
coded_block is only used for I-frames, so it is unnecessary to reset it in ff_clean_intra_table_entries() (which cleans certain tables for a non-intra MB). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/liba

Re: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN

2024-04-28 Thread Chen, Wenbin
> > On Apr 28, 2024, at 18:58, Paul B Mahol wrote: > > > > Extremely low quality filters, both in source code quality and > > performance/security and output quality should be queued for removal. These filters cannot be removed because there are users using them. What are your suggestions to impr

Re: [FFmpeg-devel] [RFC] 5 year plan & Inovation

2024-04-28 Thread Davy Durham
On 4/19/24 09:50, Niklas Haas wrote: So, rather than all of the above, what I think we should do is contract somebody to set up, manage, host and maintain a GitLab instance for us. This would probably be the single most cost effective boost to both community growth and innovation I can think of,

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/atrac9dec: Check init_get_bits8() for failure

2024-04-28 Thread Paul B Mahol
On Sun, Apr 28, 2024 at 11:31 PM Michael Niedermayer wrote: > Fixes: CID1439569 Unchecked return value > Fixes: CID1439578 Unchecked return value > > Sponsored-by: Sovereign Tech Fund > And they paid you for this low effort work! Applause! > Signed-off-by: Michael Niedermayer > --- > libav