[FFmpeg-devel] [PATCH] lavu: always provide symbols from hwcontext_vulkan.h

2022-07-04 Thread Niklas Haas
From: Niklas Haas This header is unconditionally installed, even though the utility functions defined by it may be missing from the built library. A precedent set by e.g. libavcodec/qsv.h (and others) is to always provide these functions by compiling stub functions in the absence of CONFIG_*. Ma

Re: [FFmpeg-devel] [PATCH] avformat/concat: fix missing metadata

2022-07-04 Thread Steven Hartland
I'm not sure we're on the same page, so let me try and clarify. The files have multiple tracks, the standard audio and video and 3 metadata tracks. I'm using the command line option -map 0:m:handler_name:"" to identify the tracks to copy. Given a single file this works as expected, but as soon as

[FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for MVC2

2022-07-04 Thread Michael Niedermayer
Fixes: Timeout Fixes: 48689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVC2_fuzzer-6436301427048448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed,

[FFmpeg-devel] [PATCH 3/3] avformat/iff: simplify duration calculation

2022-07-04 Thread Michael Niedermayer
Fixes: signed integer overflow: 315680096256 * 134215943 cannot be represented in type 'long long' Fixes: 48713/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5886272312311808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by

[FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for CFHD

2022-07-04 Thread Michael Niedermayer
Fixes: Timeout Fixes: 46504/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6376835606249472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 2 +- 1 file changed

[FFmpeg-devel] [PATCH 4/4] avformat/movenc: Ensure packet is writable before modifying it

2022-07-04 Thread Andreas Rheinhardt
Fixes e.g. ffmpeg -i fate-suite/h264/bbc2.sample.h264 -c:v rawvideo -map 0:v -frames:v 10 -pix_fmt gray8 -f tee "first.mov|second.mov" Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c i

[FFmpeg-devel] [PATCH 3/4] fftools/ffprobe: Add const to AVPacket data pointers

2022-07-04 Thread Andreas Rheinhardt
These packets need not be writable (and are not modified by us), so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt --- fftools/ffprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 5020ba484c

[FFmpeg-devel] [PATCH 2/4] avcodec: Add const to muxer packet data pointers

2022-07-04 Thread Andreas Rheinhardt
The packets given to decoder need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt --- libavcodec/cpia.c| 4 ++-- libavcodec/dfpwmdec.c| 3 ++- libavcodec/hnm4video.c | 8 libavcodec/libcodec2.c

[FFmpeg-devel] [PATCH 1/4] av(format|device): Add const to muxer packet data pointers

2022-07-04 Thread Andreas Rheinhardt
The packets given to muxers need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt --- libavdevice/alsa_enc.c | 2 +- libavdevice/fbdev_enc.c | 3 ++- libavdevice/oss_enc.c| 2 +- libavdevice/sndio_enc.c | 2 +- libavformat/dvenc.c |

Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: don't error out on truncated strings

2022-07-04 Thread James Almer
On 7/4/2022 1:55 PM, Michael Niedermayer wrote: On Sun, Jul 03, 2022 at 09:27:31PM -0300, James Almer wrote: On 7/3/2022 7:00 AM, Nicolas George wrote: Andreas Rheinhardt (12022-07-03): if (!av_bprint_is_complete(bp)) -return AVERROR(ENOMEM); +

Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: don't error out on truncated strings

2022-07-04 Thread Michael Niedermayer
On Sun, Jul 03, 2022 at 09:27:31PM -0300, James Almer wrote: > On 7/3/2022 7:00 AM, Nicolas George wrote: > > Andreas Rheinhardt (12022-07-03): > > > > if (!av_bprint_is_complete(bp)) > > > > -return AVERROR(ENOMEM); > > > > +break; > > > > > Isn't thi

[FFmpeg-devel] [PATCH v3] ffmpeg: add option -isync

2022-07-04 Thread Gyan Doshi
This is a per-file input option that adjusts an input's timestamps with reference to another input, so that emitted packet timestamps account for the difference between the start times of the two inputs. Typical use case is to sync two or more live inputs such as from capture devices. Both the tar

[FFmpeg-devel] [PATCH] fftools/ffmpeg: use the sync queues to handle -frames

2022-07-04 Thread Anton Khirnov
Same issues apply to it as to -shortest. Changes the results of the following tests: - matroska-flac-extradata-update The test reencodes two input FLAC streams into three output FLAC streams. The last output stream is limited to 8 frames. The current code results in the first two output stre

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/wnv1: Check for width =1

2022-07-04 Thread Michael Niedermayer
On Sun, Jul 03, 2022 at 08:38:15AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > The decoder only outputs pixels for width >1 images, fail early > > > > Fixes: Timeout > > Fixes: > > 48298/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WNV1_fuzzer-6198626319204352 > > > > Found-

[FFmpeg-devel] [PATCH 5/5] avformat/apngenc: Add const where possible

2022-07-04 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/apngenc.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index c219b80161..cddb148d50 100644 --- a/libavformat/apngenc.c +++ b/libavformat/apngenc.c @@ -48,7 +48,8

[FFmpeg-devel] [PATCH 4/5] avformat/apngenc: Don't modify input packet

2022-07-04 Thread Andreas Rheinhardt
It might not be writable at this point. Signed-off-by: Andreas Rheinhardt --- libavformat/apngenc.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 1c039685f2..c219b80161 100644 --- a/libavformat/apngenc.c

[FFmpeg-devel] [PATCH 3/5] avformat/apngenc: Check fcTL size

2022-07-04 Thread Andreas Rheinhardt
The remaining code relies on it having the value it should have. Signed-off-by: Andreas Rheinhardt --- libavformat/apngenc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 7443c77504..1c039685f2 100644 --- a/libavformat/apngenc.c +++ b

[FFmpeg-devel] [PATCH 2/5] avformat/apngenc: Check for incomplete chunks

2022-07-04 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/apngenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 88d4a41462..7443c77504 100644 --- a/libavformat/apngenc.c +++ b/libavformat/apngenc.c @@ -50,7 +50,7 @@ typedef struc

[FFmpeg-devel] [PATCH 1/5] avcodec/apng: Add APNG_FCTL_CHUNK_SIZE define

2022-07-04 Thread Andreas Rheinhardt
Also use it where appropriate. Signed-off-by: Andreas Rheinhardt --- libavcodec/apng.h | 3 +++ libavcodec/pngdec.c | 2 +- libavcodec/pngenc.c | 6 +++--- libavformat/apngdec.c | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libavcodec/apng.h b/libavcodec/apng.h

[FFmpeg-devel] [PATCH v2 2/2] avcodec/libopusdec: Enable FEC/PLC

2022-07-04 Thread Philip-Dylan Gleonec
Adds FEC/PLC support to libopus. The lost packets are detected as a discontinuity in the audio stream. When a discontinuity is used, this patch tries to decode the FEC data. If FEC data is present in the packet, it is decoded, otherwise audio is re-created through PLC. This patch is based on Stein

[FFmpeg-devel] [PATCH v2 1/2] avcodec/libopusenc: reload packet loss at encode

2022-07-04 Thread Philip-Dylan Gleonec
An estimation of packet loss is required by libopus to compute its FEC data. Currently, this estimation is constant, and can not be changed after configuration. This means an application using libopus through ffmpeg can not adapt the packet loss estimation when the network quality degrades. This p

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libopusdec: Enable FEC/PLC

2022-07-04 Thread Philip-Dylan Gleonec
Hello, Please find attached a new version of the patchset, with the required corrections. I also added the following changes: - remove use of avc->channels (deprecated) in favor of avc->ch_layout - rebase on master The patches have been tested against FATE, and validated in use on a rtp stream wi

Re: [FFmpeg-devel] [PATCH 1/4] avformat/(mpeg|mpegts|mxf|sup)enc: Use const uint8_t* to access pkt data

2022-07-04 Thread Paul B Mahol
lgtm for set ___ 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 4/4] avcodec/mscc: Don't modify input packet

2022-07-04 Thread Andreas Rheinhardt
This packet may not be writable, hence we must not write to it. Signed-off-by: Andreas Rheinhardt --- libavcodec/mscc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c index ac67ec9c47..3666b881a1 100644 --- a/l

[FFmpeg-devel] [PATCH 3/4] avcodec/decoders: Use const uint8_t* to access input packet data

2022-07-04 Thread Andreas Rheinhardt
These packets need not be writable, so we must not modify them. Signed-off-by: Andreas Rheinhardt --- libavcodec/ansi.c | 2 +- libavcodec/cllc.c | 2 +- libavcodec/diracdec.c | 2 +- libavcodec/fic.c| 8 libavcodec/hqx.c| 2 +- libavcod

[FFmpeg-devel] [PATCH 2/4] avcodec/dcadec: Treat the input packet's data as const

2022-07-04 Thread Andreas Rheinhardt
A decoder's input packet need not be writable, so we must not modify the data. Signed-off-by: Andreas Rheinhardt --- libavcodec/dca_core.c | 4 ++-- libavcodec/dca_core.h | 4 ++-- libavcodec/dca_lbr.c | 2 +- libavcodec/dca_lbr.h | 2 +- libavcodec/dca_xll.c | 10 +- libavcodec/d

[FFmpeg-devel] [PATCH 1/4] avformat/(mpeg|mpegts|mxf|sup)enc: Use const uint8_t* to access pkt data

2022-07-04 Thread Andreas Rheinhardt
The packets muxers receive are not guaranteed to be writable, so they must not be modified. Ergo only access the packet's data via a const uint8_t*. Signed-off-by: Andreas Rheinhardt --- libavformat/mpegenc.c | 2 +- libavformat/mpegtsenc.c | 2 +- libavformat/mxfenc.c| 4 ++-- libavformat

Re: [FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

2022-07-04 Thread Tomas Härdin
lör 2022-07-02 klockan 11:43 +0200 skrev Anton Khirnov: > Quoting Tomas Härdin (2022-06-30 14:42:42) > > Hi > > > > Previous version of this patch failed fate-fic-avi with > > THREAD_TYPE=slice THREADS=2 due to thread_execute() always > > returning 0. > > Fixed in this version. > > > > The fic sa

[FFmpeg-devel] [PATCH 2/2] avcodec/dvenc: Don't set chroma_sample_location

2022-07-04 Thread Andreas Rheinhardt
The documentation specifies that it is set by the user for encoders. Given that ff_dvvideo_init() is so extremely simple, the fix consists of inlining the function into its two callers, with setting chroma_sample_location omitted in dvenc.c. This unfortunately leads to the color siting element wri

[FFmpeg-devel] [PATCH 1/2] avcodec/dv: Remove unnecessary header

2022-07-04 Thread Andreas Rheinhardt
Forgotten in 6d484671ecb612c32cbda0fab65f961743aff5f8. Signed-off-by: Andreas Rheinhardt --- libavcodec/dv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/dv.h b/libavcodec/dv.h index 19290aa382..855afcc758 100644 --- a/libavcodec/dv.h +++ b/libavcodec/dv.h @@ -30,7 +30,6 @@ #in

Re: [FFmpeg-devel] [PATCH v5 00/25] Subtitle Filtering 2022

2022-07-04 Thread Jean-Baptiste Kempf
On Sun, 3 Jul 2022, at 12:42, Paul B Mahol wrote: >> But here, the discussion goes nowhere "I'm right", "No, I'm right", "No, >> I'm correct" and will only evolve in insults and slander. >> > Why should I do this work? > > I will just create my own fork. (Already did.) History shows that it's very

Re: [FFmpeg-devel] [PATCH v3] libavcodec/qsvenc: Enable fixed QP configure in qsv CQP runtime

2022-07-04 Thread Chen, Wenbin
> Quoting Chen, Wenbin (2022-07-04 08:33:49) > > > Why is this using frame metadata rather than the AVVideoEncParams > side > > > data? > > > > The usage of AVVideoEncParams relates to the "qp" variable in > mfxEncodeCtrl which is passed > > to MFXVideoENCODE_encoderFrameAsync(). This variable in q

Re: [FFmpeg-devel] [PATCH v2 2/2] ffmpeg: add option -isync

2022-07-04 Thread Gyan Doshi
On 2022-07-04 11:51 am, Anton Khirnov wrote: Quoting Gyan Doshi (2022-07-02 11:51:53) On 2022-07-02 02:12 pm, Anton Khirnov wrote: Quoting Gyan Doshi (2022-07-01 13:03:04) On 2022-07-01 03:33 pm, Anton Khirnov wrote: Quoting Gyan Doshi (2022-06-25 10:29:51) This is a per-file input option

[FFmpeg-devel] [PATCH v4 5/5] lavfi/format: add a hwmap auto conversion filter

2022-07-04 Thread Tong Wu
When two formats lists cannot be merged, a scale filter is auto-inserted. However, when it comes to hardware map, we have to manually add a hwmap filter to do the conversion. This patch introduces an auto hwmap filter to do the hwmap conversion automatically. Signed-off-by: Tong Wu --- libavfilt

[FFmpeg-devel] [PATCH v4 4/5] lavfi/format: wrap auto filters into structures

2022-07-04 Thread Tong Wu
This patch wraps auto conversion filters into new structures, making it easier to add more auto filters. And it adds a loop to automatically insert every possible conversion filter until merge succeeds. Signed-off-by: Tong Wu --- libavfilter/avfiltergraph.c | 76 +

[FFmpeg-devel] [PATCH v4 3/5] lavfi/avfiltergraph: move convert codes into functions

2022-07-04 Thread Tong Wu
This patch moves the auto-insert filter codes into two functions. Signed-off-by: Tong Wu --- libavfilter/avfiltergraph.c | 128 ++-- 1 file changed, 79 insertions(+), 49 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index b7d

[FFmpeg-devel] [PATCH v4 2/5] avfilter/vf_hwmap: get the AVHWDeviceType from outlink format

2022-07-04 Thread Tong Wu
When a derive_device_type is not specified, the hwmap filter should be able to retrieve AVHWDeviceType from outlink->format and create corresponding hwdevice context. Signed-off-by: Tong Wu --- libavfilter/vf_hwmap.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --gi

[FFmpeg-devel] [PATCH v4 1/5] avutil/hwcontext: add a function to get the AVHWDeviceType

2022-07-04 Thread Tong Wu
Add a function to get the corresponding AVHWDeviceType from a given hardware pixel format. Signed-off-by: Tong Wu --- libavutil/hwcontext.c | 11 +++ libavutil/hwcontext.h | 12 2 files changed, 23 insertions(+) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c ind