[FFmpeg-devel] [PATCH] libavfilter/vf_stack.c: check input height for avoiding crashed

2023-07-23 Thread hung kuishing
In the case of vertical layout, if the chroma height is ceil rounded when shifted to the right, the total height of the chroma input will be greater than the output height, and a crash occurs. So make sure that the luma height can be shifted to the right to get an integer chroma height

[FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: silence the warning

2023-07-23 Thread Xiang, Haihao
From: Haihao Xiang libavutil/hwcontext_qsv.c: In function ‘qsv_map_to’: libavutil/hwcontext_qsv.c:1905:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Haihao Xiang --- libavutil/hwcontext_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH] use bits_per_coded_sample if bits_per_raw_sample equal to 0 in pcmc tag, fix bug #10433

2023-07-23 Thread hung kuishing
Signed-off-by: clarkh --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index f1cc80b1b3..d08c056438 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1237,7 +1237,7 @@ static int

[FFmpeg-devel] [PATCH] add prores bitstream demuxer and muxer

2023-07-23 Thread hung kuishing
--- libavcodec/Makefile| 1 + libavcodec/parsers.c | 1 + libavcodec/prores_parser.c | 91 ++ libavformat/Makefile | 2 + libavformat/allformats.c | 2 + libavformat/proresdec.c| 62 ++ libavformat/rawenc.c

[FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix duration in pass-through mode

2023-07-23 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 334a86551b..be9bf54743 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -582,6

[FFmpeg-devel] [PATCH v5 3/3] tests/fate/flvenc: add av1 in enhanced flv test case

2023-07-23 Thread Steven Liu
Signed-off-by: Steven Liu --- tests/fate/flvenc.mak | 4 ++ tests/ref/fate/enhanced-flv-av1 | 70 + 2 files changed, 74 insertions(+) create mode 100644 tests/ref/fate/enhanced-flv-av1 diff --git a/tests/fate/flvenc.mak b/tests/fate/flvenc.mak index

[FFmpeg-devel] [PATCH v5 2/3] tests/fate/flvenc: add vp9 in enhanced flv test case

2023-07-23 Thread Steven Liu
Signed-off-by: Steven Liu --- tests/fate/flvenc.mak | 4 tests/ref/fate/enhanced-flv-vp9 | 16 2 files changed, 20 insertions(+) create mode 100644 tests/ref/fate/enhanced-flv-vp9 diff --git a/tests/fate/flvenc.mak b/tests/fate/flvenc.mak index

[FFmpeg-devel] [PATCH v5 1/3] tests/fate/flvenc: add hevc in enhanced flv test case

2023-07-23 Thread Steven Liu
Signed-off-by: Steven Liu --- tests/fate/flvenc.mak| 7 +- tests/ref/fate/enhanced-flv-hevc | 256 +++ 2 files changed, 262 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/enhanced-flv-hevc diff --git a/tests/fate/flvenc.mak

Re: [FFmpeg-devel] [PATCH v5 3/4] avformat/jpegxl: remove jpegxl_probe, instead call avcodec/jpegxl_parse

2023-07-23 Thread Leo Izen
On 7/23/23 06:08, Andreas Rheinhardt wrote: Leo Izen: This prevents code duplication in the source form by calling the parse code that was moved to avcodec last commit. The code will be duplicated in binary form for shared builds (it's not that large), but for source How large is it?

Re: [FFmpeg-devel] [PATCH v5 2/4] avcodec/jpegxl_parser: add JPEG XL parser

2023-07-23 Thread Leo Izen
On 7/23/23 06:55, Andreas Rheinhardt wrote: Leo Izen: Add a parser to libavcodec for AV_CODEC_ID_JPEGXL. It doesn't find the end of the stream in order to packetize the codec, but it does look at the headers to set preliminary information like dimensions and pixel format. Note that much of

Re: [FFmpeg-devel] [PATCH] lavu: add AVVideoHint API

2023-07-23 Thread Stefano Sabatini
On date Tuesday 2023-07-18 00:19:40 +0200, Stefano Sabatini wrote: > On date Monday 2023-07-10 12:51:25 +, Carotti, Elias wrote: > > On Mon, 2023-07-10 at 08:13 +, Carotti, Elias wrote: > > > > > > > > AVVideoHint is a bad name for something like this. > > > Could you borrow some wording

Re: [FFmpeg-devel] [PATCH 5/6] fftools: avradio support

2023-07-23 Thread Michael Niedermayer
On Sun, Jul 23, 2023 at 04:01:16PM -0300, James Almer wrote: > On 7/23/2023 3:49 PM, Tomas Härdin wrote: > > sön 2023-07-23 klockan 17:23 +0200 skrev Michael Niedermayer: > > > On Sat, Jul 22, 2023 at 11:39:11PM +0200, Lynne wrote: > > > > Jul 22, 2023, 21:30 by mich...@niedermayer.cc: > > > > >

Re: [FFmpeg-devel] [PATCH 3/5] avformat/imf_cpl: xmlNodeListGetString() can return NULL

2023-07-23 Thread Michael Niedermayer
On Sun, Jul 23, 2023 at 12:55:46PM -0700, Pierre-Anthony Lemieux wrote: > Would this patch be an opportunity to set `cpl->content_title_utf8` to > an empty string at fill_content_title() at libavformat/imf_cpl.c if > xmlNodeListGetString() returns NULL? It could be done as a separate > patch

[FFmpeg-devel] [PATCH] avcodec/decode: consistently set channel info when parsing param change side data

2023-07-23 Thread James Almer
avctx->ch_layout was being left unchanged. Signed-off-by: James Almer --- libavcodec/decode.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index f0e6acc03e..53c90cddb7 100644 --- a/libavcodec/decode.c +++

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread James Almer
On 7/23/2023 4:40 PM, Paul B Mahol wrote: On Sun, Jul 23, 2023 at 9:26 PM Nicolas George wrote: James Almer (12023-07-23): What about when FF_FILTER_FLAG_HWFRAME_AWARE filters are present in the graph? hw_frames_ctx from AVFilterLink can't be accessed from outside lavfi. Is vf_hwdownload

Re: [FFmpeg-devel] [PATCH 3/5] avformat/imf_cpl: xmlNodeListGetString() can return NULL

2023-07-23 Thread Pierre-Anthony Lemieux
Would this patch be an opportunity to set `cpl->content_title_utf8` to an empty string at fill_content_title() at libavformat/imf_cpl.c if xmlNodeListGetString() returns NULL? It could be done as a separate patch alternatively. LGTM otherwise. On Sun, Jul 23, 2023 at 11:03 AM Michael

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Paul B Mahol
On Sun, Jul 23, 2023 at 9:36 PM Nicolas George wrote: > Paul B Mahol (12023-07-23): > > - missing audio support > > You realize that direct rendering is order of magnitude more useful for > video frames than for audio, right? > That does not make patch more complete. > > > - missing full

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Paul B Mahol
On Sun, Jul 23, 2023 at 9:36 PM Nicolas George wrote: > Paul B Mahol (12023-07-23): > > - missing audio support > > You realize that direct rendering is order of magnitude more useful for > video frames than for audio, right? > > > - missing full internal buffers allocation replacement support >

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Nicolas George
Paul B Mahol (12023-07-23): > - missing audio support You realize that direct rendering is order of magnitude more useful for video frames than for audio, right? > - missing full internal buffers allocation replacement support Nonsense. > - missing/untested hardware acceleration support

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Paul B Mahol
On Sun, Jul 23, 2023 at 9:26 PM Nicolas George wrote: > James Almer (12023-07-23): > > What about when FF_FILTER_FLAG_HWFRAME_AWARE filters are present in the > > graph? hw_frames_ctx from AVFilterLink can't be accessed from outside > lavfi. > > Is vf_hwdownload meant to be added to the graph

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Nicolas George
James Almer (12023-07-23): > What about when FF_FILTER_FLAG_HWFRAME_AWARE filters are present in the > graph? hw_frames_ctx from AVFilterLink can't be accessed from outside lavfi. > Is vf_hwdownload meant to be added to the graph before buffersink? I do not know how hardware acceleration works at

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread James Almer
On 7/23/2023 4:06 PM, Nicolas George wrote: James Almer (12023-07-23): Does the AVBuffersinkAllocVideoFrameFunc function have access to the AVFilterLink ff_default_get_video_buffer() gets? I assume it'd be needed to get values like pixel format. If so, it should be documented how, but maybe

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Nicolas George
James Almer (12023-07-23): > Does the AVBuffersinkAllocVideoFrameFunc function have access to the > AVFilterLink ff_default_get_video_buffer() gets? I assume it'd be needed to > get values like pixel format. If so, it should be documented how, but maybe > it's easier to just pass link here instead

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread John Cox
Hi >On 7/22/2023 2:03 PM, John Cox wrote: >> Add a callback to enable user allocation of video frames on the final >> stage of a filter chain. >> >> Signed-off-by: John Cox >> --- >> libavfilter/buffersink.c | 21 + >> libavfilter/buffersink.h | 27

Re: [FFmpeg-devel] [PATCH 5/6] fftools: avradio support

2023-07-23 Thread James Almer
On 7/23/2023 3:49 PM, Tomas Härdin wrote: sön 2023-07-23 klockan 17:23 +0200 skrev Michael Niedermayer: On Sat, Jul 22, 2023 at 11:39:11PM +0200, Lynne wrote: Jul 22, 2023, 21:30 by mich...@niedermayer.cc: This avoids keeping diffs to fftools in the libavradio repository No to this entire

Re: [FFmpeg-devel] [PATCH 5/6] fftools: avradio support

2023-07-23 Thread Tomas Härdin
sön 2023-07-23 klockan 17:23 +0200 skrev Michael Niedermayer: > On Sat, Jul 22, 2023 at 11:39:11PM +0200, Lynne wrote: > > Jul 22, 2023, 21:30 by mich...@niedermayer.cc: > > > > > This avoids keeping diffs to fftools in the libavradio repository No to this entire patchset. > > > --- > > >  

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/h266_metadata_bsf: Check if there are CodedBitstreamFragment units

2023-07-23 Thread Michael Niedermayer
On Sun, Jul 23, 2023 at 03:07:32PM -0300, James Almer wrote: > On 7/23/2023 3:03 PM, Michael Niedermayer wrote: > > Fixes: NULL pointer dereference > > Fixes: > > 60269/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_METADATA_fuzzer-5215449416335360 > > > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/h266_metadata_bsf: Check if there are CodedBitstreamFragment units

2023-07-23 Thread James Almer
On 7/23/2023 3:03 PM, Michael Niedermayer wrote: Fixes: NULL pointer dereference Fixes: 60269/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_METADATA_fuzzer-5215449416335360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

Re: [FFmpeg-devel] [PATCH 5/6] avcodec/vmixdec: Fix several integer anomalies

2023-07-23 Thread Michael Niedermayer
On Sun, Jun 18, 2023 at 11:50:20PM +0200, Michael Niedermayer wrote: > Fixes: vmixdec.c:132:34: runtime error: signed integer overflow: -2147483648 > * 1856 cannot be represented in type 'int' > Fixes: vmixdec.c:119:20: runtime error: signed integer overflow: -1256 + > -2147483648 cannot be

[FFmpeg-devel] [PATCH 5/5] avcodec/h266_metadata_bsf: Check if there are CodedBitstreamFragment units

2023-07-23 Thread Michael Niedermayer
Fixes: NULL pointer dereference Fixes: 60269/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_METADATA_fuzzer-5215449416335360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/h266_metadata_bsf.c

[FFmpeg-devel] [PATCH 4/5] avcodec/hevcdec: Fix undefined memcpy()

2023-07-23 Thread Michael Niedermayer
There is likely a better way to fix this, this is mainly to show the problem Fixes: MC within same frame resulting in overlapping memcpy() Fixes: 60189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4992746590175232 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 3/5] avformat/imf_cpl: xmlNodeListGetString() can return NULL

2023-07-23 Thread Michael Niedermayer
Fixes: NULL pointer dereference Fixes: 60166/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5998301577871360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/imf_cpl.c | 8 ++-- 1

[FFmpeg-devel] [PATCH 2/5] avcodec/mpeg4videodec: consider lowres in dest_pcm[]

2023-07-23 Thread Michael Niedermayer
Fixes: out of array access Fixes: 5/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5767982157266944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4videodec.c | 2 +-

[FFmpeg-devel] [PATCH 1/5] avcodec/vmixdec: Check for end of input in decode_dcac()

2023-07-23 Thread Michael Niedermayer
Fixes: Timeout Fixes: 59952/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMIX_fuzzer-6718213736759296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vmixdec.c | 4 1 file changed,

Re: [FFmpeg-devel] [PATCH 1/5] avutil/tx_template: extend to 2M

2023-07-23 Thread Tomas Härdin
lör 2023-07-22 klockan 17:40 +0200 skrev Michael Niedermayer: > On Sat, Jun 17, 2023 at 12:20:44AM +0200, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > >  libavutil/tx_template.c | 12 > >  1 file changed, 12 insertions(+) > > will apply patches 1-4 >

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread James Almer
On 7/22/2023 2:03 PM, John Cox wrote: Add a callback to enable user allocation of video frames on the final stage of a filter chain. Signed-off-by: John Cox --- libavfilter/buffersink.c | 21 + libavfilter/buffersink.h | 27 +++

[FFmpeg-devel] [PATCH] avutil/tx_template: Fix some integer overflows in DECL_FFT5

2023-07-23 Thread Michael Niedermayer
Fixes: signed integer overflow: -1364719223 + -1468954671 cannot be represented in type 'int' Fixes: 58303/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6501115717091328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

Re: [FFmpeg-devel] [PATCH 5/6] fftools: avradio support

2023-07-23 Thread Michael Niedermayer
On Sat, Jul 22, 2023 at 11:39:11PM +0200, Lynne wrote: > Jul 22, 2023, 21:30 by mich...@niedermayer.cc: > > > This avoids keeping diffs to fftools in the libavradio repository > > --- > > fftools/ffmpeg.c | 7 + > > fftools/ffplay.c | 6 > > fftools/ffprobe.c| 6 > >

[FFmpeg-devel] [PATCH v2 08/13] avcodec/decode: check for global side data in AVCodecContext side data

2023-07-23 Thread James Almer
Signed-off-by: James Almer --- libavcodec/decode.c | 56 + libavcodec/decode.h | 2 +- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index f0e6acc03e..a7ce1927bf 100644 ---

[FFmpeg-devel] [PATCH v2 07/13] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data

2023-07-23 Thread James Almer
Signed-off-by: James Almer --- libavcodec/hevcdec.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index fcf19b4eb6..4807ffcbb3 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3403,8 +3403,15 @@

Re: [FFmpeg-devel] [PATCH 07/13] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data

2023-07-23 Thread James Almer
On 7/23/2023 9:17 AM, Andreas Rheinhardt wrote: James Almer: On 7/23/2023 5:40 AM, Andreas Rheinhardt wrote: James Almer: Signed-off-by: James Almer ---   libavcodec/hevcdec.c | 12 +++-   1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c

Re: [FFmpeg-devel] [PATCH 07/13] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data

2023-07-23 Thread Andreas Rheinhardt
James Almer: > On 7/23/2023 5:40 AM, Andreas Rheinhardt wrote: >> James Almer: >>> Signed-off-by: James Almer >>> --- >>>   libavcodec/hevcdec.c | 12 +++- >>>   1 file changed, 11 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c >>> index

Re: [FFmpeg-devel] [PATCH 1/5] fftools/ffmpeg_mux_init: Fix leak on error

2023-07-23 Thread Anton Khirnov
Patchset looks good. Thanks, -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libaformat: fix incorrect handling of incomplete AVBPrint.

2023-07-23 Thread Reimar . Doeffinger
From: Reimar Döffinger Change some internal APIs a bit to make it harder to make such mistakes. In particular, have the read chunk functions return an error when the result is incomplete. This might be less flexible, but since there has been no use-case for that so far, avoiding coding mistakes

Re: [FFmpeg-devel] [PATCH 07/13] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data

2023-07-23 Thread James Almer
On 7/23/2023 5:40 AM, Andreas Rheinhardt wrote: James Almer: Signed-off-by: James Almer --- libavcodec/hevcdec.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index fcf19b4eb6..0d659e4c55 100644 ---

Re: [FFmpeg-devel] [PATCH v5 2/4] avcodec/jpegxl_parser: add JPEG XL parser

2023-07-23 Thread Andreas Rheinhardt
Leo Izen: > Add a parser to libavcodec for AV_CODEC_ID_JPEGXL. It doesn't find the > end of the stream in order to packetize the codec, but it does look at > the headers to set preliminary information like dimensions and pixel > format. > > Note that much of this code is duplicated from

Re: [FFmpeg-devel] [PATCH v5 3/4] avformat/jpegxl: remove jpegxl_probe, instead call avcodec/jpegxl_parse

2023-07-23 Thread Andreas Rheinhardt
Leo Izen: > This prevents code duplication in the source form by calling the parse > code that was moved to avcodec last commit. The code will be duplicated > in binary form for shared builds (it's not that large), but for source How large is it? > code it will only exist in one location now. >

Re: [FFmpeg-devel] [PATCH 07/13] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data

2023-07-23 Thread Andreas Rheinhardt
James Almer: > Signed-off-by: James Almer > --- > libavcodec/hevcdec.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c > index fcf19b4eb6..0d659e4c55 100644 > --- a/libavcodec/hevcdec.c > +++

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread Andreas Rheinhardt
John Cox: > On Sat, 22 Jul 2023 21:14:24 +0200, you wrote: > >> John Cox: >>> Add a callback to enable user allocation of video frames on the final >>> stage of a filter chain. >>> >>> Signed-off-by: John Cox >>> --- >>> libavfilter/buffersink.c | 21 + >>>

Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback

2023-07-23 Thread John Cox
On Sat, 22 Jul 2023 21:14:24 +0200, you wrote: >John Cox: >> Add a callback to enable user allocation of video frames on the final >> stage of a filter chain. >> >> Signed-off-by: John Cox >> --- >> libavfilter/buffersink.c | 21 + >> libavfilter/buffersink.h | 27

Re: [FFmpeg-devel] [RESEND PATCH] avcodec/v4l2_context: always log POLLERR when buffers are uninitialized

2023-07-23 Thread Marton Balint
On Fri, 21 Jul 2023, Richard Acayan wrote: Will this patch be applied or receive any comments? I have been waiting more than 2 weeks since the original submission (https://ffmpeg.org/pipermail/ffmpeg-devel/2023-July/311580.html) and have not received a response since. I am trying to get mpv