[FFmpeg-devel] [PATCH v2] Use AVBufferPool in MOV

2024-12-02 Thread Arnaud MASSERANN
Most demuxers allocate a new buffer for each packet. For MOV, this can be problematic, because of some high-bitrate codecs like ProRes/HAPQ/NotchLC. Use pools of buffer instead. For some test media, demuxing goes from 20ms/frame to 11ms/frame, close to the perf of ReadFile (10ms/frame), making it

Re: [FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-12-02 Thread Zhao Zhili
> On Nov 27, 2024, at 20:35, Zhao Zhili wrote: > > Ping. Ping again. > >> On Nov 20, 2024, at 20:44, Zhao Zhili wrote: >> >> From: Zhao Zhili >> >> v2: >> 1. Remove unused include >> 2. Remove words on intrinsics vs handwritten assembly in wasm context. >> >> Zhao Zhili (3): >> configur

Re: [FFmpeg-devel] [PATCH 08/10] swscale/swscale_unscaled: Fix odd height with nv24_to_yuv420p_chroma()

2024-12-02 Thread Ramiro Polla
Hi Michael, On Mon, Dec 2, 2024 at 1:33 AM Michael Niedermayer wrote: > On Sat, Sep 28, 2024 at 02:01:33AM +0200, Michael Niedermayer wrote: > > On Wed, Sep 25, 2024 at 03:16:30PM +0200, Ramiro Polla wrote: > > > On Tue, Sep 24, 2024 at 3:35 PM Michael Niedermayer > > > wrote: > > > > On Mon, Se

Re: [FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-12-02 Thread Zhao Zhili
> On Dec 2, 2024, at 20:11, Hendrik Leppkes wrote: > > On Mon, Dec 2, 2024 at 11:28 AM Zhao Zhili > wrote: >> >> >>> On Dec 2, 2024, at 00:53, James Almer wrote: >>> >>> On 11/30/2024 6:13 AM, Zhao Zhili wrote: From: Zhao Zhili MSVC messed up standard C features, again. ---

Re: [FFmpeg-devel] Check MSE bound in FATE

2024-12-02 Thread Michael Niedermayer
Hi On Sun, Dec 01, 2024 at 10:17:15PM -0800, Pierre-Anthony Lemieux wrote: > Hi all, > > Osamu and I are looking at adding FATE tests that checks that the MSE > of a decode image compared to a reference image does not exceed a > conformance threshold (see [1]). > > Is there a precedent for addin

Re: [FFmpeg-devel] [PATCH] avcodec/vvc decode: ALF filtering without CC-ALF

2024-12-02 Thread Frank Plowman
On 02/12/2024 14:27, Chris Warrington via ffmpeg-devel wrote: > When a stream has ALF filtering enabled but not CC-ALF, the CC-ALF set > indexes alf->ctb_cc_idc are being read uninitialized during ALF filtering. > > This change initializes alf->ctb_cc_idc whenever ALF is enabled. > > Ref. https:

Re: [FFmpeg-devel] [RFC] infrastructure documentation

2024-12-02 Thread Michael Niedermayer
Hi On Mon, Dec 02, 2024 at 09:12:55AM -1000, compn wrote: > On Mon, 2 Dec 2024 19:44:43 +0100, Michael Niedermayer wrote: > > > Hi > > > > On Sat, Nov 30, 2024 at 11:08:29PM +0100, Michael Niedermayer wrote: > > > On Sat, Nov 30, 2024 at 10:58:03PM +0100, martin schitter wrote: > > > > ffmpeg-

Re: [FFmpeg-devel] [PATCH] avformat: add AV1 RTP depacketizer and packetizer

2024-12-02 Thread Chris Hodges
Hi, On 11/25/24 18:47, Tristan Matthews via ffmpeg-devel wrote: One nit I'd add is that since the RTP AV1 spec is still in draft (according to https://aomediacodec.github.io/av1-rtp-spec/) this feature should probably be marked experimental as is done for VP9 in RTP, see: https://git.ffmpeg.o

Re: [FFmpeg-devel] [PATCH 08/10] swscale/swscale_unscaled: Fix odd height with nv24_to_yuv420p_chroma()

2024-12-02 Thread Michael Niedermayer
Hi Ramiro On Mon, Dec 02, 2024 at 02:45:34PM +0100, Ramiro Polla wrote: > Hi Michael, > > On Mon, Dec 2, 2024 at 1:33 AM Michael Niedermayer > wrote: > > On Sat, Sep 28, 2024 at 02:01:33AM +0200, Michael Niedermayer wrote: > > > On Wed, Sep 25, 2024 at 03:16:30PM +0200, Ramiro Polla wrote: > > >

Re: [FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-12-02 Thread Zhao Zhili
> On Dec 2, 2024, at 00:53, James Almer wrote: > > On 11/30/2024 6:13 AM, Zhao Zhili wrote: >> From: Zhao Zhili >> MSVC messed up standard C features, again. >> --- >> libavutil/mem_internal.h | 4 >> 1 file changed, 4 insertions(+) >> diff --git a/libavutil/mem_internal.h b/libavutil/mem

[FFmpeg-devel] [PATCH] swscale/graph: fix memleak of cascaded graphs

2024-12-02 Thread Niklas Haas
From: Niklas Haas Just free them directly and discard the parent context. --- libswscale/graph.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index ee9d9847a9..fbad1fe8c3 100644 --- a/libswscale/graph.c +++ b/libswscale/

Re: [FFmpeg-devel] [PATCH v2 3/3] avcodec/cuvid: introduce a ringbuffer to reattach additional data

2024-12-02 Thread Clément Péron
On Sat, 30 Nov 2024 at 12:28, Clément Péron wrote: > > On Fri, 29 Nov 2024 at 23:44, Timo Rothenpieler wrote: > > > > On 29.11.2024 21:46, Clément Péron wrote: > > > On Fri, 29 Nov 2024 at 20:06, Timo Rothenpieler > > > wrote: > > >> > > >> On 01.11.2024 18:21, Clément Péron wrote: > > >>> From

[FFmpeg-devel] [PATCH 1/5] avutil: add hwcontext_amf.

2024-12-02 Thread Dmitrii Ovchinnikov
Adds hwcontext_amf, enabling a shared AMF context for encoders, decoders, and AMF-based filters, without copy to the host memory. Code also was tested in HandBrake. Benefits: - Optimizations for direct video memory access from CPU - Significant performance boost in full AMF pipelines with filt

[FFmpeg-devel] [PATCH 3/5] avfilter/scale_amf: Add AMF VPP & super resolution filters

2024-12-02 Thread Dmitrii Ovchinnikov
From: Evgeny Pavlov This commit adds two AMF filters: vpp_amf & sr_amf. Both filters are using AMF hardware acceleration. vpp_amf supports simple scaling algorithms & color conversion. sr_amf supports advanced scaling algorithms such as FSR & can be used for upscaling only. --- configure

[FFmpeg-devel] [PATCH 5/5] avcodec/amfenc: redesign to use hwcontext_amf.

2024-12-02 Thread Dmitrii Ovchinnikov
Co-authored-by: Evgeny Pavlov v3: cleanup code --- libavcodec/amfenc.c | 875 +-- libavcodec/amfenc.h | 34 +- libavcodec/amfenc_av1.c | 8 +- libavcodec/amfenc_h264.c | 6 +- libavcodec/amfenc_hevc.c | 6 +- 5 files changed, 306 insertions(+)

[FFmpeg-devel] [PATCH 2/5] avcodec: add amfdec.

2024-12-02 Thread Dmitrii Ovchinnikov
From: Evgeny Pavlov Added AMF based h264, hevc, av1 decoders. Co-authored-by: Dmitrii Ovchinnikov v2: added encoder reinitialisation v3: use AMF_SURFACE_UNKNOWN to int decoder(ctx->output_format before) --- configure | 3 + libavcodec/Makefile| 7 +- libavcodec/allcodecs.c

[FFmpeg-devel] [PATCH 4/5] doc/filters: Add documentation for AMF filters

2024-12-02 Thread Dmitrii Ovchinnikov
From: Evgeny Pavlov Signed-off-by: Evgeny Pavlov --- doc/filters.texi | 238 +++ 1 file changed, 238 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 428986a1e9..7d75ebfa3e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -

Re: [FFmpeg-devel] [PATCH v2] avformat/mov: use dvdclut for YUV to RGB conversion of DVD subtitle palettes

2024-12-02 Thread Michael Niedermayer
Hi Marth64 On Sun, Dec 01, 2024 at 01:56:35PM -0600, Marth64 wrote: > Any opinions on v3? v3 did build fine when i tested a few days ago IIRC thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just

Re: [FFmpeg-devel] [PATCH v2 3/3] avcodec/cuvid: introduce a ringbuffer to reattach additional data

2024-12-02 Thread Timo Rothenpieler
On 02/12/2024 12:03, Clément Péron wrote: Hi Timo, I try to look deeper into this and compare it with others codec. And I'm not 100% sure why only cuviddec, dav1d and xevd set this flag "FF_CODEC_CAP_SETS_FRAME_PROPS" I would expect also nvdec to set this, as by design the hardware could buffer

Re: [FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-12-02 Thread Hendrik Leppkes
On Mon, Dec 2, 2024 at 11:28 AM Zhao Zhili wrote: > > > > On Dec 2, 2024, at 00:53, James Almer wrote: > > > > On 11/30/2024 6:13 AM, Zhao Zhili wrote: > >> From: Zhao Zhili > >> MSVC messed up standard C features, again. > >> --- > >> libavutil/mem_internal.h | 4 > >> 1 file changed, 4 i

[FFmpeg-devel] [PATCH] swscale/utils: disable full_chr_h_input optimization for odd width

2024-12-02 Thread Niklas Haas
From: Niklas Haas The basic problem here is that the rgb*ToUV_half_* functions hard-code a bilinear downsample from src[i] + src[i+1], with no bounds check on the i+1 access. Due to the signature of the function, we cannot easily plumb the "true" width into the function body to perform a bounds

Re: [FFmpeg-devel] [PATCH] Use AVBufferPool in MOV

2024-12-02 Thread Arnaud Masserann
After some more testing suggested by compn: - Checking the timestamps of the packets (both dts and pts) -> the patch doesn't change them - Checking mp4->mkv conversion: before/after produces the same binary file, except for some padding bytes in the header - Checking a MOV with many streams: teste

Re: [FFmpeg-devel] [RFC] infrastructure documentation

2024-12-02 Thread Michael Niedermayer
Hi On Sat, Nov 30, 2024 at 11:08:29PM +0100, Michael Niedermayer wrote: > On Sat, Nov 30, 2024 at 10:58:03PM +0100, martin schitter wrote: > > > > > > On 30.11.24 21:41, Michael Niedermayer wrote: > > > What name should the repository have ? > > > ffmpeg-infra > > > ffmpeg-private > > > > > > (

Re: [FFmpeg-devel] [RFC] infrastructure documentation

2024-12-02 Thread Leo Izen
On 12/2/24 1:44 PM, Michael Niedermayer wrote: Hi repository created: g...@git.ffmpeg.org:ffmpeg-internals TC + root + people providing the infrastructure should have access. (everyone listed needs to have access so they can update their entries or delete themselves) (root needs to have access

Re: [FFmpeg-devel] [RFC] infrastructure documentation

2024-12-02 Thread compn
On Mon, 2 Dec 2024 19:44:43 +0100, Michael Niedermayer wrote: > Hi > > On Sat, Nov 30, 2024 at 11:08:29PM +0100, Michael Niedermayer wrote: > > On Sat, Nov 30, 2024 at 10:58:03PM +0100, martin schitter wrote: > > > ffmpeg-internals may sound nicer > > > > ok, sounds good to me. > > ill wait

[FFmpeg-devel] [PATCH] avcodec/vvc decode: ALF filtering without CC-ALF

2024-12-02 Thread Chris Warrington via ffmpeg-devel
When a stream has ALF filtering enabled but not CC-ALF, the CC-ALF set indexes alf->ctb_cc_idc are being read uninitialized during ALF filtering. This change initializes alf->ctb_cc_idc whenever ALF is enabled. Ref. https://trac.ffmpeg.org/ticket/11325 --- libavcodec/vvc/ctu.c | 2 +- 1 file c

Re: [FFmpeg-devel] [PATCH] swscale/graph: fix memleak of cascaded graphs

2024-12-02 Thread James Almer
On 12/2/2024 7:29 AM, Niklas Haas wrote: From: Niklas Haas Just free them directly and discard the parent context. --- libswscale/graph.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index ee9d9847a9..fbad1fe8c3 1006

Re: [FFmpeg-devel] [PATCH v2 00/11] fix broken CC detection and ffprobe fields (cover letter)

2024-12-02 Thread Marton Balint
On Sun, 1 Dec 2024, James Almer wrote: On 11/28/2024 5:02 PM, Marton Balint wrote: On Wed, 27 Nov 2024, Marth64 wrote: As it stands today, ffprobe has two stream-level fields (closed_captions and film_grain) that do not work. Their value is always 0 because ffprobe cannot access the

Re: [FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-12-02 Thread Michael Niedermayer
Hi On Mon, Dec 02, 2024 at 09:12:06PM +0800, Zhao Zhili wrote: > > > On Nov 27, 2024, at 20:35, Zhao Zhili wrote: > > > > Ping. > > Ping again. This is cool thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not j

Re: [FFmpeg-devel] [PATCH] swscale/utils: disable full_chr_h_input optimization for odd width

2024-12-02 Thread Michael Niedermayer
Hi Niklas On Mon, Dec 02, 2024 at 01:14:09PM +0100, Niklas Haas wrote: > From: Niklas Haas > > The basic problem here is that the rgb*ToUV_half_* functions hard-code a > bilinear downsample from src[i] + src[i+1], with no bounds check on the i+1 > access. > > Due to the signature of the functio

Re: [FFmpeg-devel] [PATCH v4 1/8] checkasm/sw_range_convert: test negative input values

2024-12-02 Thread Michael Niedermayer
Hi Ramiro On Sun, Dec 01, 2024 at 07:20:03PM +0100, Ramiro Polla wrote: > --- > tests/checkasm/sw_range_convert.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/tests/checkasm/sw_range_convert.c > b/tests/checkasm/sw_range_convert.c > index bf14209987..ba576ff08c 10064

Re: [FFmpeg-devel] [PATCH v4 2/8] swscale/range_convert: saturate output instead of limiting input

2024-12-02 Thread Michael Niedermayer
On Sun, Dec 01, 2024 at 07:20:04PM +0100, Ramiro Polla wrote: > For bit depths <= 14, the result is saturated to 15 bits. > For bit depths > 14, the result is saturated to 19 bits. > > x86_64: > chrRangeFromJpeg8_1920_c:2126.5 2127.4 (1.00x) > chrRangeFromJpeg16_1920_c: 2331.4 2325.2 (

Re: [FFmpeg-devel] [PATCH] lavc/libx265: flag as experimental

2024-12-02 Thread Kirithika Kalirathnam
Hi Vittorio, The commits in this PR were picked and pushed to the master branch of x265.(b647da9 ,b153007

Re: [FFmpeg-devel] [PATCH] avcodec/vvc decode: ALF filtering without CC-ALF

2024-12-02 Thread Nuo Mi
Hi Chris and Frank, Thank you for the patch and review. On Mon, Dec 2, 2024 at 10:27 PM Chris Warrington via ffmpeg-devel < ffmpeg-devel@ffmpeg.org> wrote: > When a stream has ALF filtering enabled but not CC-ALF, the CC-ALF set > indexes alf->ctb_cc_idc are being read uninitialized during ALF fi

Re: [FFmpeg-devel] [PATCH v4 4/8] swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats

2024-12-02 Thread Michael Niedermayer
Hi On Sun, Dec 01, 2024 at 07:20:06PM +0100, Ramiro Polla wrote: > There is an issue with the constants used in YUV to YUV range conversion, > where the upper bound is not respected when converting to mpeg range. > > With this commit, the constants are calculated at runtime, depending on > the bi