Re: [FFmpeg-devel] [PATCH 05/22] avformat/matroskadec: Use int64_t size

2024-07-12 Thread Andreas Rheinhardt
Michael Niedermayer: > The length is 64bit that is passed into the functions. > Alternatively the values can be checked before cast > > Fixes: CID1604572 Overflowed return value > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavformat/matroskadec.c | 6 +++-

Re: [FFmpeg-devel] [PATCH 1/9] avcodec/dovi_rpudec: clarify semantics

2024-07-12 Thread Niklas Haas
On Mon, 24 Jun 2024 19:20:36 +0200 Niklas Haas wrote: > From: Niklas Haas > > ff_dovi_rpu_parse() and ff_dovi_rpu_generate() are a bit inconsistent in > that they expect different levels of encapsulation, due to the nature of > how this is handled in the context of different APIs. Clarify the st

[FFmpeg-devel] [PATCH] fate/lavf-container: add a test for L-HEVC remuxing

2024-07-12 Thread James Almer
Signed-off-by: James Almer --- tests/fate-run.sh | 4 ++-- tests/fate/lavf-container.mak | 28 +++- tests/ref/lavf-fate/mv_hevc.mp4 | 3 +++ 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 tests/ref/lavf-fate/mv_hevc.mp4 diff --git

Re: [FFmpeg-devel] [PATCH 05/22] avformat/matroskadec: Use int64_t size

2024-07-12 Thread Michael Niedermayer
On Fri, Jul 12, 2024 at 10:42:38AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > The length is 64bit that is passed into the functions. > > Alternatively the values can be checked before cast > > > > Fixes: CID1604572 Overflowed return value > > > > Sponsored-by: Sovereign Tech Fund

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mov: export cropping values from clap boxes

2024-07-12 Thread Michael Niedermayer
On Thu, Jul 11, 2024 at 01:31:23PM +, James Almer wrote: > ffmpeg | branch: master | James Almer | Mon Jul 8 > 20:50:18 2024 -0300| [93be6b425ebeb6cf96faf502281a4f7a1ed5138c] | committer: > James Almer > > avformat/mov: export cropping values from clap boxes > > Addresses part of ticket #

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mov: export cropping values from clap boxes

2024-07-12 Thread James Almer
On 7/12/2024 1:53 PM, Michael Niedermayer wrote: On Thu, Jul 11, 2024 at 01:31:23PM +, James Almer wrote: ffmpeg | branch: master | James Almer | Mon Jul 8 20:50:18 2024 -0300| [93be6b425ebeb6cf96faf502281a4f7a1ed5138c] | committer: James Almer avformat/mov: export cropping values from c

[FFmpeg-devel] [PATCH 01/11] avdevice/audiotoolbox: fix mixed declaration and code

2024-07-12 Thread Marvin Scholz
Fix a bunch of "mixing declarations and code is incompatible with standards before C99" warnings. --- libavdevice/audiotoolbox.m | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavdevice/audiotoolbox.m b/libavdevice/audiotoolbox.m index 7d95c34593..dd607589b4 100644

[FFmpeg-devel] [PATCH 02/11] avfilter/af_channelsplit: fix mixed declaration and code

2024-07-12 Thread Marvin Scholz
Fix a "mixing declarations and code is incompatible with standards before C99" warning. --- libavfilter/af_channelsplit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index 43b2667750..b91195a4c6 100644 --- a/li

[FFmpeg-devel] [PATCH 03/11] avdevice/avfoundation: fix mixed declarations and code

2024-07-12 Thread Marvin Scholz
Fix several "mixing declarations and code is incompatible with standards before C99" warnings. --- libavdevice/avfoundation.m | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index c5a09c6563..1

[FFmpeg-devel] [PATCH 04/11] avdevice/avfoundation: remove write-only variable

2024-07-12 Thread Marvin Scholz
The block_buffer was only ever written to but then never used in the following code, making it unnecessary. Fixes a "variable 'block_buffer' set but not used" compiler warning. --- libavdevice/avfoundation.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavdevice/avfoundation.m b/libavde

[FFmpeg-devel] [PATCH 05/11] lavfi/metal: fix mixed declaration and code

2024-07-12 Thread Marvin Scholz
Fix a "mixing declarations and code is incompatible with standards before C99" warning. --- libavfilter/metal/utils.m | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m index f365d3ceea..d5c85e619d 100644 --- a/lib

[FFmpeg-devel] [PATCH 06/11] lavfi/metal: simplify fallback

2024-07-12 Thread Marvin Scholz
Instead of using a fallback variable, just do an early return. --- libavfilter/metal/utils.m | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m index d5c85e619d..6a9e5ef7cf 100644 --- a/libavfilter/metal/utils.m +++ b/li

[FFmpeg-devel] [PATCH 07/11] avfilter/vf_coreimage: fix mixed declaration and code

2024-07-12 Thread Marvin Scholz
Fix several "mixing declarations and code is incompatible with standards before C99" warnings. --- libavfilter/vf_coreimage.m | 60 ++ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index 4

[FFmpeg-devel] [PATCH 08/11] avfilter/vf_coreimage: simplify list_filters code

2024-07-12 Thread Marvin Scholz
Use fast-enumeration and get rid of unnecessary intermediate variables. --- libavfilter/vf_coreimage.m | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index bfc17764b5..38355414bd 100644 --- a/libavfilter/vf_

[FFmpeg-devel] [PATCH 09/11] avfilter/vf_coreimage: silence AVFrame deprecation warnings

2024-07-12 Thread Marvin Scholz
Deprecation warning need to be disabled here as we set deprecated fields. --- libavfilter/vf_coreimage.m | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index 38355414bd..45b16cc48a 100644 --- a/libavfilter/vf_core

[FFmpeg-devel] [PATCH 10/11] avfilter/yadif_common: remove unused variable

2024-07-12 Thread Marvin Scholz
--- libavfilter/vf_yadif_videotoolbox.m | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m index c47d3edfb8..eb7026395e 100644 --- a/libavfilter/vf_yadif_videotoolbox.m +++ b/libavfilter/vf_yadif_videotoolbox.m @@ -172,7 +1

[FFmpeg-devel] [PATCH 11/11] avfilter/yadif_common: fix mixed declaration and code

2024-07-12 Thread Marvin Scholz
Fix a "mixing declarations and code is incompatible with standards before C99" warning. --- libavfilter/vf_yadif_videotoolbox.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m index eb7026395e..5cc7585

[FFmpeg-devel] [PATCH 1/3] avutil/avassert: Add av_assert_unreachable()

2024-07-12 Thread Marvin Scholz
--- libavutil/avassert.h | 12 1 file changed, 12 insertions(+) diff --git a/libavutil/avassert.h b/libavutil/avassert.h index 1895fb7551..cdab912fe4 100644 --- a/libavutil/avassert.h +++ b/libavutil/avassert.h @@ -75,4 +75,16 @@ */ void av_assert0_fpu(void); +/** + * Assert thi

[FFmpeg-devel] [PATCH 2/3] avfilter/af_afftdn: use av_assert_unreachable

2024-07-12 Thread Marvin Scholz
Fixes a compiler warning about mag possibly being uninitialised. --- libavfilter/af_afftdn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c index a2e6ca6107..f26b620cfb 100644 --- a/libavfilter/af_afftdn.c +++ b/libavfilter/af_

[FFmpeg-devel] [PATCH 3/3] avcodec/pcm-dvdenc: use av_assert_unreachable

2024-07-12 Thread Marvin Scholz
Fixes a compiler warning about quant possibly being uninitialised. --- libavcodec/pcm-dvdenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c index 71e9b6915a..f553d8076a 100644 --- a/libavcodec/pcm-dvdenc.c +++ b/libavcodec/pc

[FFmpeg-devel] [PATCH] ffbuild: add METALCC and METALLIB to BRIEF

2024-07-12 Thread Marvin Scholz
--- ffbuild/common.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffbuild/common.mak b/ffbuild/common.mak index 87a3ffd2b0..023adb8567 100644 --- a/ffbuild/common.mak +++ b/ffbuild/common.mak @@ -18,7 +18,7 @@ BIN2C = $(BIN2CEXE) ifndef V Q = @ ECHO = printf "$(1

[FFmpeg-devel] [PATCH 1/2] avcodec/pngdec: avoid erroring with sBIT on indexed-color images

2024-07-12 Thread Leo Izen
Indexed color images use three colors for sBIT, but the function ff_png_get_nb_channels returns 1 in this case. We should avoid erroring out on valid files in this scenario. Signed-off-by: Leo Izen Reported-by: Ramiro Polla --- libavcodec/pngdec.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[FFmpeg-devel] [PATCH 2/2] avcodec/png: more informative error message for invalid sBIT size

2024-07-12 Thread Leo Izen
If the sBIT chunk size is invalid, we should print a more informative error message rather than return an error and print nothing. Signed-off-by: Leo Izen --- libavcodec/pngdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c ind

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself as d3d12va_encode maintainer

2024-07-12 Thread Michael Niedermayer
On Tue, Jul 09, 2024 at 02:41:20PM +0200, Michael Niedermayer wrote: > On Mon, Jul 08, 2024 at 03:16:28PM +, Tong Wu wrote: > > Ping. As the author of d3d12va_encode, I would like to get the access in > > order maintain the code and add more new features. > > will apply Before adding your ke

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mov: export cropping values from clap boxes

2024-07-12 Thread Michael Niedermayer
On Fri, Jul 12, 2024 at 01:57:43PM -0300, James Almer wrote: > On 7/12/2024 1:53 PM, Michael Niedermayer wrote: > > On Thu, Jul 11, 2024 at 01:31:23PM +, James Almer wrote: > > > ffmpeg | branch: master | James Almer | Mon Jul 8 > > > 20:50:18 2024 -0300| [93be6b425ebeb6cf96faf502281a4f7a1ed

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/png: more informative error message for invalid sBIT size

2024-07-12 Thread Paul B Mahol
You are deeply confused. Checking with != for overread bytes is wrong. ___ 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 wit

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-12 Thread Pierre-Anthony Lemieux
On Thu, Jul 11, 2024 at 10:28 PM Tomas Härdin wrote: > > > +if (s->in_tile_headers == 1 && s->isHT && (!s- > > >Ccap15_b11)) > > +av_log(s->avctx, AV_LOG_WARNING, "COD marker is > > found in HOMOGENEOUS HT set\n"); > > How bad is this and the other markers being present

Re: [FFmpeg-devel] [PATCH 1/6] avfilter/vf_tiltandshift: Free dst on error

2024-07-12 Thread Michael Niedermayer
On Fri, Jul 12, 2024 at 12:19:29AM +0200, Vittorio Giovara wrote: > On Thu, Jul 11, 2024 at 12:50 AM Michael Niedermayer > wrote: > > > Fixes: CID1559901 Resource leak > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavfilter/vf_tiltandshift.c | 4

Re: [FFmpeg-devel] [PATCH v2] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-12 Thread Michael Niedermayer
On Wed, Jul 10, 2024 at 12:52:39PM -0300, James Almer wrote: > On 7/10/2024 12:49 PM, Michael Niedermayer wrote: > > width and height > 32bit is not supported and its easier to check in a > > central place > > > > Signed-off-by: Michael Niedermayer > > --- > > libavutil/imgutils.c | 2 +- > >

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mov: export cropping values from clap boxes

2024-07-12 Thread James Almer
On 7/12/2024 4:34 PM, Michael Niedermayer wrote: On Fri, Jul 12, 2024 at 01:57:43PM -0300, James Almer wrote: On 7/12/2024 1:53 PM, Michael Niedermayer wrote: On Thu, Jul 11, 2024 at 01:31:23PM +, James Almer wrote: ffmpeg | branch: master | James Almer | Mon Jul 8 20:50:18 2024 -0300|

[FFmpeg-devel] [PATCH v2] avfilter/af_surround: Check output format

2024-07-12 Thread Michael Niedermayer
Fixes: CID1516994 Out-of-bounds access Fixes: CID1516996 Out-of-bounds access Fixes: CID1516999 Out-of-bounds access Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_surround.c | 25 + 1 file changed, 25 insertions(+) diff --git a/l

Re: [FFmpeg-devel] [PATCH 2/6] avcodec/vaapi_h264: Do not store our error code in VASliceParameterBufferH264

2024-07-12 Thread Michael Niedermayer
On Tue, Jul 09, 2024 at 06:11:54AM +, Xiang, Haihao wrote: > On So, 2024-07-07 at 20:47 +0200, Michael Niedermayer wrote: > > I am not sure this is possible (thus this requires review) > > > > Fixes: CID1604570 Overflowed constant > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: M

Re: [FFmpeg-devel] [PATCH 01/15] avcodec/xsubdec: Check parse_timecode()

2024-07-12 Thread Michael Niedermayer
On Fri, Jul 05, 2024 at 02:21:42AM +0200, Michael Niedermayer wrote: > Fixes: CID1604490 Overflowed constant > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/xsubdec.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) will apply pat

Re: [FFmpeg-devel] [PATCH] avcodec/osq: avoid signed overflow in downsample path

2024-07-12 Thread Michael Niedermayer
On Fri, Jun 21, 2024 at 09:35:48PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 865309950 * 256 cannot be represented in type > 'int' > Fixes: > 69191/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6310214413385728 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 1/2] configure: permit POWER9 cpu flags

2024-07-12 Thread Sean McGovern
Hi, On Wed, Jul 3, 2024, 21:24 Sean McGovern wrote: > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index b28221f258..bbda7a02cb 100755 > --- a/configure > +++ b/configure > @@ -5493,7 +5493,7 @@ elif enabled ppc; then >

Re: [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode()

2024-07-12 Thread Michael Niedermayer
On Sun, May 19, 2024 at 04:49:08AM +0200, Michael Niedermayer wrote: > This simplification assumes that the code is correct > > Fixes: CID1560036 Logically dead code > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/vvc/ctu.c | 6 ++ > 1 file chan

Re: [FFmpeg-devel] [PATCH 17/17] avdevice/dshow_filter: Use wcscpy_s()

2024-07-12 Thread Michael Niedermayer
On Mon, May 27, 2024 at 01:52:29AM +0200, Michael Niedermayer wrote: > Fixes: CID1591929 Copy into fixed size buffer > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavdevice/dshow_filter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply

Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_avgblur_opencl: Use AV_VIDEO_MAX_PLANES

2024-07-12 Thread Michael Niedermayer
On Thu, Jun 13, 2024 at 12:22:09AM +0200, Michael Niedermayer wrote: > Fixes: CID1437470 Out-of-bounds read (out of bounds read would only occur > with a pixel format of more than 4 planes) > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavfilter/vf_avgblur

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/tiff: Check value on positive signed targets

2024-07-12 Thread Michael Niedermayer
On Sun, Jul 07, 2024 at 08:47:24PM +0200, Michael Niedermayer wrote: > Fixes: CID1604593 Overflowed constant > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/tiff.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) will ap

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_drm: Check ioctl in drm_map_frame() for failure

2024-07-12 Thread Michael Niedermayer
On Mon, May 20, 2024 at 03:36:55PM +0200, Michael Niedermayer wrote: > On Mon, May 20, 2024 at 11:33:41AM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > Fixes: CID1583742 Unchecked return value > > > > > > Sponsored-by: Sovereign Tech Fund > > > Signed-off-by: Michael Niedermayer

Re: [FFmpeg-devel] [WIP] False positives on Coverity

2024-07-12 Thread Michael Niedermayer
On Fri, Jul 12, 2024 at 01:55:42AM +0200, Michael Niedermayer wrote: [...] > Only 7 outstanding remain from prior may. and 19 total. So 99% of issues down to 3 outstanding prior may and 8 overall [...] > 1604599 Overflowed constant; intentional > 1604530 Infinite loop ; "intentional" > 700368 Ex

Re: [FFmpeg-devel] [PATCH 1/3] avutil/avassert: Add av_assert_unreachable()

2024-07-12 Thread Andreas Rheinhardt
Marvin Scholz: > --- > libavutil/avassert.h | 12 > 1 file changed, 12 insertions(+) > > diff --git a/libavutil/avassert.h b/libavutil/avassert.h > index 1895fb7551..cdab912fe4 100644 > --- a/libavutil/avassert.h > +++ b/libavutil/avassert.h > @@ -75,4 +75,16 @@ > */ > void av_ass

Re: [FFmpeg-devel] [PATCH 10/11] avfilter/yadif_common: remove unused variable

2024-07-12 Thread Andreas Rheinhardt
Marvin Scholz: > --- > libavfilter/vf_yadif_videotoolbox.m | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavfilter/vf_yadif_videotoolbox.m > b/libavfilter/vf_yadif_videotoolbox.m > index c47d3edfb8..eb7026395e 100644 > --- a/libavfilter/vf_yadif_videotoolbox.m > +++ b/libavfilter/vf_

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself as d3d12va_encode maintainer

2024-07-12 Thread Tong Wu
Michael Niedermayer: >Subject: Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself as >d3d12va_encode maintainer > >On Tue, Jul 09, 2024 at 02:41:20PM +0200, Michael Niedermayer wrote: >> On Mon, Jul 08, 2024 at 03:16:28PM +, Tong Wu wrote: >> > Ping. As the author of d3d12va_encode, I would l

Re: [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode()

2024-07-12 Thread Nuo Mi
On Sun, May 19, 2024 at 10:49 AM Michael Niedermayer wrote: > This simplification assumes that the code is correct > > Fixes: CID1560036 Logically dead code > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/vvc/ctu.c | 6 ++ > 1 file changed, 2 in

Re: [FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: add a new mechanism to expose used queue families

2024-07-12 Thread Lynne via ffmpeg-devel
On 10/07/2024 10:18, Anton Khirnov wrote: Quoting Lynne via ffmpeg-devel (2024-07-10 01:56:57) On 09/07/2024 08:57, Anton Khirnov wrote: Quoting Lynne via ffmpeg-devel (2024-07-09 03:07:12) @@ -151,6 +162,17 @@ typedef struct AVVulkanDeviceContext { * Similar to lock_queue(), unlocks a