[FFmpeg-devel] [PATCH 5/5] avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel

2023-08-01 Thread Andreas Rheinhardt
This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt --- I wonder whether I should make

[FFmpeg-devel] [PATCH 4/5] avcodec/decode: Extend ff_hwaccel_frame_priv_alloc()'s task

2023-08-01 Thread Andreas Rheinhardt
All usages of ff_hwaccel_frame_priv_alloc() have the same pattern: Check for whether a hwaccel is in use; check whether it needs private frame-specific data; allocate the AVBuffer and set it. This commit modifies ff_hwaccel_frame_priv_alloc() to perform this task on its own. (It also seems that t

[FFmpeg-devel] [PATCH 3/5] avcodec/hwconfig: Move HWACCEL_CAP_* to a new header

2023-08-01 Thread Andreas Rheinhardt
libavcodec/hwconfig.h currently contains HWACCEL_CAP_* flags as well as the definition of AVCodecHWConfigInternal and some macros to create them. The users of these two are nearly disjoint: The flags are used by files providing AVHWAccels whereas AVCodecHWConfigInternal is used by files providing

[FFmpeg-devel] [PATCH 2/5] avcodec/error_resilience, mpeg12dec: Remove always-true checks

2023-08-01 Thread Andreas Rheinhardt
Having a decode_slice callback is mandatory for HWAccels; the only exception to this (and the reason why these checks were added) was XvMC, but it is no more since commit be95df12bb06b183c8d2aea3b0831fdf05466cf3. Signed-off-by: Andreas Rheinhardt --- libavcodec/error_resilience.c | 4 ++-- libav

[FFmpeg-devel] [PATCH 1/5] avcodec/nvdec_(mjpeg|vp8): Constify AVHWAccels

2023-08-01 Thread Andreas Rheinhardt
The discrepancy between the actual definition and the declarations in hwaccels.h is actually UB. Signed-off-by: Andreas Rheinhardt --- Resending patches 1-3 because the last patch depends upon it. libavcodec/nvdec_mjpeg.c | 2 +- libavcodec/nvdec_vp8.c | 2 +- 2 files changed, 2 insertions(+)

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

2023-08-01 Thread Stefano Sabatini
On date Friday 2023-07-28 09:44:37 +0200, Stefano Sabatini wrote: > On date Wednesday 2023-07-26 10:52:57 +, Carotti, Elias wrote: > > On Mon, 2023-07-24 at 01:27 +0200, Stefano Sabatini wrote: > > > CAUTION: This email originated from outside of the organization. Do > > > not click links or op

Re: [FFmpeg-devel] [PATCH 46/47] fftools/ffprobe: stop calling exit_program()

2023-08-01 Thread Stefano Sabatini
On date Saturday 2023-07-15 12:46:10 +0200, Anton Khirnov wrote: > Inline the relevant part of ffprobe_cleanup() into main() and drop the > rest. > --- > fftools/ffprobe.c | 22 -- > 1 file changed, 8 insertions(+), 14 deletions(-) > > diff --git a/fftools/ffprobe.c b/fftools/

Re: [FFmpeg-devel] [PATCH 2/3] avfilter/avfilter: Make functions only used here static

2023-08-01 Thread Andreas Rheinhardt
Hendrik Leppkes: > On Tue, Aug 1, 2023 at 5:05 PM Andreas Rheinhardt > wrote: >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libavfilter/avfilter.c | 44 +++--- >> libavfilter/internal.h | 8 >> 2 files changed, 24 insertions(+), 28 deletions(-) >

Re: [FFmpeg-devel] [PATCH 45/47] fftools/ffprobe: inline opt_output_file() into its only caller

2023-08-01 Thread Stefano Sabatini
On date Saturday 2023-07-15 12:46:09 +0200, Anton Khirnov wrote: > There is no reason to keep them separate. > > Also, replace exit_program() with returning an error code. > --- > fftools/ffprobe.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/fftools/ffprobe.c

Re: [FFmpeg-devel] [PATCH 2/5] avformat/hls_sample_encryption: Always free AC3HeaderInfo on error

2023-08-01 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The code currently presumes that a return value of AVERROR(ENOMEM) > implies that ac3hdr could not be allocated, so it need not be freed. > Yet any avpriv_ac3_parse_header() might allocate more than the > AC3HeaderInfo internally (it doesn't currently), so simply free > it unc

Re: [FFmpeg-devel] [PATCH 1/5] fftools/ffprobe: Fix memleak

2023-08-01 Thread Stefano Sabatini
On date Monday 2023-07-31 13:08:37 +0200, Andreas Rheinhardt wrote: > Fixes Coverity issue #1524491. > Regression since e6126abc6997058ca49ee596b70611bbe367163e. > > Signed-off-by: Andreas Rheinhardt > --- > fftools/ffprobe.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > dif

Re: [FFmpeg-devel] [PATCH] avformat/flvdec: handle exheader fourcc correctly in metadata

2023-08-01 Thread Steven Liu
Marton Balint 于2023年7月30日周日 01:49写道: > > In metadata fourcc is carried in the AMF number, not as binary. > > Partially based on a patch by Steven Liu. > > Signed-off-by: Marton Balint > --- > libavformat/flvdec.c | 76 +--- > 1 file changed, 30 insertions(

Re: [FFmpeg-devel] What is FFmpeg and what should it be

2023-08-01 Thread Vittorio Giovara
On Sun, Jul 30, 2023 at 3:04 PM Nicolas George wrote: > Kieran Kunhya (12023-07-28): > > FFmpeg doesn't implement TCP in userspace, it doesn't implement the > > WiFi protocol etc etc. Different layers are delegated to different > > programs. > > Hi. You seem to be discussing this in more good fai

[FFmpeg-devel] [PATCH 3/3] avcodec/jpeg2000htdec: Check m

2023-08-01 Thread Michael Niedermayer
This also fixes assertion failures Fixes: shift exponent 95 is too large for 64-bit type 'unsigned long long' Fixes: 58299/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5828618092937216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/proje

[FFmpeg-devel] [PATCH 2/3] avcodec/jpeg2000htdec: Consolidate jpeg2000 spec bits in jpeg2000_bitbuf_refill_backwards()

2023-08-01 Thread Michael Niedermayer
Code should make more sense now Fixes: out of array access Fixes: 58299/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6627570448465920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

[FFmpeg-devel] [PATCH 1/3] avcodec/jpeg2000htdec: Avoid freeing uninitialized pointers in ff_jpeg2000_decode_htj2k()

2023-08-01 Thread Michael Niedermayer
Fixes: freeing of uninitialized pointers Fixes: part of 58299 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000htdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

Re: [FFmpeg-devel] [PATCH 2/3] avfilter/avfilter: Make functions only used here static

2023-08-01 Thread Hendrik Leppkes
On Tue, Aug 1, 2023 at 5:05 PM Andreas Rheinhardt wrote: > > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/avfilter.c | 44 +++--- > libavfilter/internal.h | 8 > 2 files changed, 24 insertions(+), 28 deletions(-) > > diff --git a/libavfilter

Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent expensive get_cue_desc lookups

2023-08-01 Thread Tom Boshoven
On Thu, Mar 30, 2023 at 4:07 PM Tom Boshoven wrote: > > Due to the way the bandwidth estimation code works, the get_cue_desc > function was called many times over. > This function did a from-scratch lookup using a timestamp. > This lookup was done using linear iteration (O(n)), resulting in > sign

[FFmpeg-devel] [PATCH] avformat/img2dec: added option -strftime_mkdir to allow directory creation if the strftime pattern include non-existing directories, similarly to how hls muxer does.

2023-08-01 Thread Alexandre Heitor Schmidt
doc/demuxers.texi: Documented how to use the new parameter. Usage example: ffmpeg -i /dev/video0 -strftime 1 -strftime_mkdir 1 "/tmp/%Y/%m/%Y_%m_%d-%H_%M_%S.jpg" --- doc/muxers.texi | 13 + libavformat/img2enc.c | 28 +++- 2 files changed, 36 insertions

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

2023-08-01 Thread Paul B Mahol
On Tue, Aug 1, 2023 at 9:51 PM Cosmin Stejerean wrote: > On Jul 27, 2023, at 11:36 AM, Michael Niedermayer > wrote: > > Let me first explain what i want to provide to the user (most of this > is already implemented, some needs more work) > the user starts her favorite player, be that vlc, ffplay

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

2023-08-01 Thread Cosmin Stejerean
On Jul 27, 2023, at 11:36 AM, Michael Niedermayer wrote: Let me first explain what i want to provide to the user (most of this is already implemented, some needs more work) the user starts her favorite player, be that vlc, ffplay, or whatever chooses sdr as input device and thats all configurati

Re: [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate

2023-08-01 Thread Michael Niedermayer
On Tue, Aug 01, 2023 at 12:55:49PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: > > 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592 > > Fixes: Timeout > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master

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

2023-08-01 Thread Michael Niedermayer
On Tue, Aug 01, 2023 at 09:30:54AM -0400, Leo Izen wrote: > 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 > code it will only e

Re: [FFmpeg-devel] [PATCH v2 5/5] fftools/ffmpeg: support applying container level cropping

2023-08-01 Thread Cosmin Stejerean
On Jul 27, 2023, at 4:13 AM, Anton Khirnov wrote: Quoting Tomas Härdin (2023-07-26) tis 2023-07-25 klockan 14:09 -0300 skrev James Almer: Signed-off-by: James Almer --- Now inserting a filter into the graph. This looks useful for MXF +    { "apply_cropping",   HAS_ARG | OPT_BOOL | OPT_SPEC | +

[FFmpeg-devel] [PATCH v2 4/4] avcodec/error_resilience, mpeg12dec: Remove always-true checks

2023-08-01 Thread Andreas Rheinhardt
Having a decode_slice callback is mandatory for HWAccels; the only exception to this (and the reason why these checks were added) was XvMC, but it is no more since commit be95df12bb06b183c8d2aea3b0831fdf05466cf3. Signed-off-by: Andreas Rheinhardt --- libavcodec/error_resilience.c | 4 ++-- libav

[FFmpeg-devel] [PATCH 4/4] avcodec/error_resilience: Remove always-true checks

2023-08-01 Thread Andreas Rheinhardt
Having a decode_slice callback is mandatory for HWAccels; the only exception to this (and the reason why these checks were added) was XvMC, but it is no more since commit be95df12bb06b183c8d2aea3b0831fdf05466cf3. Signed-off-by: Andreas Rheinhardt --- libavcodec/error_resilience.c | 4 ++-- 1 fil

[FFmpeg-devel] [PATCH 3/3] avcodec/nvdec_(mjpeg|vp8): Constify AVHWAccels

2023-08-01 Thread Andreas Rheinhardt
The discrepancy between the actual definition and the declarations in hwaccels.h is actually UB. Signed-off-by: Andreas Rheinhardt --- libavcodec/nvdec_mjpeg.c | 2 +- libavcodec/nvdec_vp8.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvdec_mjpeg.c b/libav

[FFmpeg-devel] [PATCH 2/3] avfilter/avfilter: Make functions only used here static

2023-08-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 44 +++--- libavfilter/internal.h | 8 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index b8e1523bdb..df6f1ab3de 100644

[FFmpeg-devel] [PATCH 1/3] avfilter/avfilter: Also deprecate variable name

2023-08-01 Thread Andreas Rheinhardt
Otherwise the var_names and the corresponding enum will be off and e.g. the array holding the variable values will be too small. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c inde

[FFmpeg-devel] [PATCH v3] vulkan_h264: fill correct ScalingList8x8 entries

2023-08-01 Thread Benjamin Cheng
The Vulkan spec wants ScalingList8x8 as defined by ITU spec, which is in a different order from how ffmpeg parses it. v2: generalize for 444 case v3: fix whitespace --- libavcodec/vulkan_h264.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/vulkan_h264.c b/li

[FFmpeg-devel] [PATCH v2] vulkan_h264: fill correct ScalingList8x8 entries

2023-08-01 Thread Benjamin Cheng
The Vulkan spec wants ScalingList8x8 as defined by ITU spec, which is in a different order from how ffmpeg parses it. --- libavcodec/vulkan_h264.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c index 84bcef7933..9d4f

[FFmpeg-devel] [PATCH v6 5/5] fate/jpegxl_anim: add demuxer fate test for jpegxl_anim

2023-08-01 Thread Leo Izen
Adds a fate test for the jpegxl_anim demuxer, that should allow testing for true positives and false positives for animated jpegxl files. Note that two of the test cases are not animated, in order to help sort out false positives. Signed-off-by: Leo Izen --- tests/Makefile

[FFmpeg-devel] [PATCH v6 4/5] avformat/jpegxl: remove jpegxl_probe, instead call avcodec/jpegxl_parse

2023-08-01 Thread 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 code it will only exist in one location now. Signed-off-by: Leo Izen --- libavform

[FFmpeg-devel] [PATCH v6 3/5] avcodec/jpegxl_parser: add JPEG XL parser

2023-08-01 Thread 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 avformat/jpegxl_probe.c, but tha

[FFmpeg-devel] [PATCH v6 2/5] avcodec/libjxldec: use internal AVFrame as buffered space

2023-08-01 Thread Leo Izen
Before this commit, the decoder erroneously assumes that the AVFrame passed to the receive_frame is the same one each time. Now it keeps an internal AVFrame to write into, and copies it over when it's done. Signed-off-by: Leo Izen --- libavcodec/libjxldec.c | 37 +

[FFmpeg-devel] [PATCH v6 0/5] JPEG XL Parser (and bug fixes)

2023-08-01 Thread Leo Izen
Changes from v5: - Attached an extra commit to fix existing bug with libjxldec - Made various changes based on comments by Andreas Reinhardt -- removed jpegxl_parse.c from avformat, and jpegxl_parse.o from avformat/Makefile/OBJS -- checked for failure in init_vlc_lengths -- used a macro to initial

[FFmpeg-devel] [PATCH v6 1/5] avcodec/libjxldec: fix errors when decoding grayscale after rgb

2023-08-01 Thread Leo Izen
Fixes an error that's caused by decoding a grayscale JXL image after an RGB image is decoded, with the same decoder instance. Signed-off-by: Leo Izen --- libavcodec/libjxldec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libjxldec.c b/libavcodec/libjxldec.c

Re: [FFmpeg-devel] What is FFmpeg and what should it be

2023-08-01 Thread Rémi Denis-Courmont
Le 31 juillet 2023 00:07:37 GMT+07:00, Andrey Turkin a écrit : >вс, 30 июл. 2023 г. в 16:04, Nicolas George : > >> Kieran Kunhya (12023-07-28): >> > FFmpeg doesn't implement TCP in userspace, it doesn't implement the >> > WiFi protocol etc etc. Different layers are delegated to different >> > p

Re: [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate

2023-08-01 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: > 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592 > Fixes: Timeout > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/avr.c