[FFmpeg-devel] [PATCH] avcodec/hw_base_encode: fix NULL dereference if no frames before end-of-stream

2025-07-19 Thread James Hutchinson via ffmpeg-devel
If hw_base_encode_send_frame() is called with frame == NULL before any input frames are submitted, ctx->pic_end is NULL and dereferencing it causes a crash. This can occur in hardware encoding pipelines that flush before receiving any input frames. Fix by checking ctx->pic_end before accessing its

Re: [FFmpeg-devel] [FFmpeg-cvslog] fate/lavf-container: add test for APV in MP4

2025-07-19 Thread Martin Storsjö
On Fri, 18 Jul 2025, James Almer wrote: ffmpeg | branch: master | James Almer | Tue Jul 15 19:00:21 2025 -0300| [3cd5672bfeb796342d24228a78f2e733c0a40e7d] | committer: James Almer fate/lavf-container: add test for APV in MP4 Signed-off-by: James Almer http://git.videolan.org/gitweb.cgi/ff

Re: [FFmpeg-devel] [PATCH] avcodec/motion_est: don't add offsets to NULL pointers

2025-07-19 Thread Kacper Michajlow
On Sat, 19 Jul 2025 at 02:27, James Almer wrote: > On 7/18/2025 8:01 PM, Michael Niedermayer wrote: > > On Tue, Jul 15, 2025 at 10:33:10AM -0300, James Almer wrote: > >> Fixes: libavcodec/motion_est.c:94:31: runtime error: applying zero > offset to null pointer > >> Signed-off-by: James Almer >

[FFmpeg-devel] [PATCH] avfilter: add inverse tone mapping

2025-07-19 Thread Sarthak Indurkhya via ffmpeg-devel
Hello FFmpeg developers, This patch introduces a new video filter called inversetonemap for FFmpeg. The filter performs SDR to HDR conversion by mapping SDR BT.709 video to HDR BT.2020 PQ, using local adaptation and inverse tone mapping. The goal is to provide a simple, flexible tool for upconver

Re: [FFmpeg-devel] [PATCH 0/2] Fix Nikon HEIF decoding error

2025-07-19 Thread James Almer
On 7/19/2025 3:09 AM, compn wrote: On Fri, 18 Jul 2025 10:58:18 -0700, Eric Joyner wrote: On 7/17/2025 8:54 AM, compn wrote: do we have a nikon heif/ hif file sample for our samples repository? http://samples.ffmpeg.org we like to keep some files around for testing , to make sure we dont brea

Re: [FFmpeg-devel] [FFmpeg-cvslog] fate/lavf-container: add test for APV in MP4

2025-07-19 Thread James Almer
On 7/19/2025 5:00 AM, Martin Storsjö wrote: On Fri, 18 Jul 2025, James Almer wrote: ffmpeg | branch: master | James Almer | Tue Jul 15 19:00:21 2025 -0300| [3cd5672bfeb796342d24228a78f2e733c0a40e7d] | committer: James Almer fate/lavf-container: add test for APV in MP4 Signed-off-by: James

[FFmpeg-devel] [PATCH] libavfilter: Whisper audio filter

2025-07-19 Thread Vittorio Palmisano
It adds a new audio filter for running audio transcriptions with the whisper model. Documentation and examples are included into the patch. Signed-off-by: Vittorio Palmisano --- configure| 5 + doc/filters.texi | 107 + libavfilter/Makefile | 2 + libavfi

Re: [FFmpeg-devel] [PATCH] Whisper audio filter

2025-07-19 Thread Vittorio Palmisano
Hi, I've applied the suggested changes and changed the commit message to fix the patchwork warning. Let's continue the discussion under the new thread (https://ffmpeg.org/pipermail/ffmpeg-devel/2025-July/346850.html). On Sat, Jul 19, 2025 at 2:16 AM Michael Niedermayer wrote: > > Hi Vittorio > >

[FFmpeg-devel] [PATCH 0/1] Fix option parsing in ffpreset files

2025-07-19 Thread Andreas Hartmann
I recently hit an issue when trying to use 'ffpreset' files and I think it's a bug. I'm working on a set of options for transcoding videos for personal use. The CLI has become pretty long by now so I wanted to factor these options out into a ffpreset files along with comments that explain what the

[FFmpeg-devel] [PATCH 1/1] ffmpeg_opt: Parse regular options in `ffpreset` files

2025-07-19 Thread Andreas Hartmann
instead of only AV-specific options. The previous code assumed that any option not defining the codec in an `ffpreset` file is an AVOption. This for example prevented the use of options defined in `OptionDef[]`, like `-pix_fmt`, as part of preset files, requiring users to type these out every time.

[FFmpeg-devel] [PATCH v2] avcodec/h264chroma_template: Replace variable by constant in chroma mc

2025-07-19 Thread Michael Niedermayer
The chroma MC is implemented in 3 cases, the first takes care of the case where the 4 bilinear coefficients are non zero the next takes care of the case where 2 are non zero and the last considers the case where 3 coefficients are 0. The last case implies that the remaining coefficient is 64 This

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/cfhd: Check idwt_buf size before allocation

2025-07-19 Thread Michael Niedermayer
On Wed, Jul 16, 2025 at 02:52:04AM +0200, Michael Niedermayer wrote: > Fixes: OOM > Fixes: > 428760799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_DEC_fuzzer-5685176435015680 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Si

[FFmpeg-devel] [PATCH] libavfilter/vf_scale_npp: fix yuva420p -> yuv420p conversion

2025-07-19 Thread Jorge Estrada
When converting from yuva420p to yuv420p the resize loop would try to access an output plane that did not exist. Added a check for the output planes existence. Example cmd: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i example.mp4 -vf scale_npp=format=yuva420p,scale_npp=format=yuv420p -c:v

Re: [FFmpeg-devel] [PATCH 2/5] avformat/concatdec: Clip duration in one more case in get_best_effort_duration()

2025-07-19 Thread Michael Niedermayer
On Sun, Jul 13, 2025 at 03:10:27AM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 4 - -922337203685477 cannot be > represented in type 'long' > Fixes: > 427262541/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4831506940100608 > > Found-by: continuous fuzzin

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame

2025-07-19 Thread Michael Niedermayer
On Mon, Jul 14, 2025 at 08:52:30PM +0200, Michael Niedermayer wrote: > On Sun, Jul 13, 2025 at 07:34:50PM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > Fixes: out of array read in the chroma plane > > > Fixes: > > > 428034092/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG

Re: [FFmpeg-devel] [PATCH] libavfilter: Whisper audio filter

2025-07-19 Thread Michael Niedermayer
On Sat, Jul 19, 2025 at 02:55:26PM +0200, Vittorio Palmisano wrote: > It adds a new audio filter for running audio transcriptions with the whisper > model. > Documentation and examples are included into the patch. > > Signed-off-by: Vittorio Palmisano > --- > configure| 5 + >

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame

2025-07-19 Thread compn
On Sun, 20 Jul 2025 01:00:41 +0200, Michael Niedermayer wrote: > On Mon, Jul 14, 2025 at 08:52:30PM +0200, Michael Niedermayer wrote: > > On Sun, Jul 13, 2025 at 07:34:50PM +0200, Andreas Rheinhardt wrote: > > > Michael Niedermayer: > > > > Fixes: out of array read in the chroma plane > > > >

[FFmpeg-devel] [PATCH] libtheoraenc: Add encoding speed level option

2025-07-19 Thread bernat . arlandis
From: Bernat Arlandis --- libavcodec/libtheoraenc.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index eb94458639..de2b913634 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -37,6

Re: [FFmpeg-devel] [PATCH] libtheoraenc: Set encoding speed level from compression_level

2025-07-19 Thread Bernat Arlandis
El 18/7/25 a las 23:45, Michael Niedermayer escribió: Hi Bernat On Tue, Jul 15, 2025 at 07:42:16PM +0200, bernat.arlan...@gmail.com wrote: From: Bernat Arlandis --- libavcodec/libtheoraenc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/libtheoraenc.c b/libavcodec

[FFmpeg-devel] [PATCH v3 2/2] lavc/vvc: Add max parameter to kth_order_egk_decode

2025-07-19 Thread Frank Plowman
Prior to this patch, kth_order_egk_decode could read arbitrarily large values which then overflowed and caused various issues. Patch fixes this by making kth_order_egk_decode falliable, requiring the caller to specify an upper bound and returning an error if the read value would exceed that bound.

[FFmpeg-devel] [PATCH v3 1/2] lavc/vvc: Don't discard palette_subblock_data return code

2025-07-19 Thread Frank Plowman
Signed-off-by: Frank Plowman --- libavcodec/vvc/ctu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index cf7edccb8b..35c18e78f6 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -2118,9 +2118,12 @@ static int

Re: [FFmpeg-devel] [PATCH 0/2] Fix Nikon HEIF decoding error

2025-07-19 Thread Michael Niedermayer
On Fri, Jul 18, 2025 at 08:09:34PM -1000, compn wrote: > On Fri, 18 Jul 2025 10:58:18 -0700, Eric Joyner wrote: > > > On 7/17/2025 8:54 AM, compn wrote: > > > do we have a nikon heif/ hif file sample for our samples > > > repository? http://samples.ffmpeg.org > > > > > > we like to keep some files

Re: [FFmpeg-devel] [PATCH] avfilter: add inverse tone mapping

2025-07-19 Thread Kacper Michajlow
On Sat, 19 Jul 2025 at 16:13, Sarthak Indurkhya via ffmpeg-devel < ffmpeg-devel@ffmpeg.org> wrote: > Hello FFmpeg developers, > This patch introduces a new video filter called inversetonemap for FFmpeg. > The filter performs SDR to HDR conversion by mapping SDR BT.709 video to > HDR BT.2020 PQ, us