Re: [FFmpeg-devel] [PATCH] vaapi_encode_h264: Only set pic_order_cnt_type to 0 with B-frames

2023-01-08 Thread David Rosca
On Mon, Jan 9, 2023 at 3:22 AM Xiang, Haihao wrote: > > On Do, 2022-12-29 at 22:20 +0100, David Rosca wrote: > > --- > > libavcodec/vaapi_encode_h264.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c >

[FFmpeg-devel] [PATCH 7/8] lavfi/qsvvpp: set output frame durations

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 064b105a17..f074bf9978 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -503,6 +503,11 @@ static QSVF

[FFmpeg-devel] [PATCH 6/8] lavfi/vf_vpp_qsv: check output format string against NULL pointer

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang This is in preparation for reusing the code for other QSV filters. E.g. deinterlacing_qsv may have an option array without format option Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/v

[FFmpeg-devel] [PATCH 8/8] lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsv

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang The same members between QSVVPPContext and VPPContext are removed from VPPContext, and async_depth is moved from QSVVPPParam to QSVVPPContext so that all QSV filters using QSVVPPContext may support async depth. In addition, we may use QSVVPPContext as base context in other QSV

[FFmpeg-devel] [PATCH 5/8] lavfi/vf_vpp_qsv: add has_passthrough flag in VPPContext

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang QSV filters may set this flag in preinit callback to turn on / off pass through mode This is in preparation for reusing the code for other QSV filters. E.g. scale_qsv filter doesn't support pass through mode. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 6

[FFmpeg-devel] [PATCH 4/8] lavfi/vf_vpp_qsv: add vpp_preinit callback

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang Set the expected default value for options in this callback, hence we have the right values even if these options are not included in the option arrray. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv

[FFmpeg-devel] [PATCH 3/8] lavfi/vf_vpp_qsv: allow special values for the output video dimensions

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang Special values are: 0 = original width/height -1 = keep original aspect This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 47 ++-- 1 file changed, 40 insertions(+

[FFmpeg-devel] [PATCH 2/8] lavfi/vf_vpp_qsv: handle NULL pointer when evaluating an expression

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang This patch provides default value if the expression is NULL. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 36 1 file changed, 20 insertions(+), 16 deletions

[FFmpeg-devel] [PATCH 1/8] lavfi/vf_vpp_qsv: add "a", "dar" and "sar" variables

2023-01-08 Thread Xiang, Haihao
From: Haihao Xiang Also fix the naming style in enum var_name. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 49 1 file changed, 29 insertions(+), 20 deletions(-) diff --g

Re: [FFmpeg-devel] [PATCH v3 0/8] add fd protocol

2023-01-08 Thread zhilizhao(赵志立)
> On Dec 15, 2022, at 01:10, Zhao Zhili wrote: > > From: Zhao Zhili > > v2: > 1. Forbid pass file descriptor via fd:{num}, instead of -fd option > 2. Set CLOEXEC > 3. Prefer fd over pipe for fftools > > v1: dup file descriptor > > Zhao Zhili (8): > avformat/file: add fd option for pipe >

Re: [FFmpeg-devel] [PATCH] vaapi_encode_h264: Only set pic_order_cnt_type to 0 with B-frames

2023-01-08 Thread Xiang, Haihao
On Do, 2022-12-29 at 22:20 +0100, David Rosca wrote: > --- > libavcodec/vaapi_encode_h264.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c > index dd17be2..d6926c4 100644 > --- a/libavcodec/vaapi_encode_h264

[FFmpeg-devel] [PATCH] avformat/nsvdec: add support for STARDIVA format

2023-01-08 Thread Paul B Mahol
Hi, patch attached. Apparently the AAC PCE data and sample rate are not stored in files. From c612389d5a19bd41bc7d4c58ed6a0c6722064d44 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 9 Jan 2023 01:57:29 +0100 Subject: [PATCH] avformat/nsvdec: add support for STARDIVA format Signed-off-by

[FFmpeg-devel] [PATCH] avcodec/scpr: Test bx before use

2023-01-08 Thread Michael Niedermayer
Fixes: out of array access on 32bit Fixes: 54850/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5302669294305280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/scpr.c | 3 +++

Re: [FFmpeg-devel] [PATCH] libswresample: avoid s16p internal processing format

2023-01-08 Thread Paul B Mahol
On 1/8/23, Michael Niedermayer wrote: > On Fri, Jan 06, 2023 at 07:04:59PM +0100, Paul B Mahol wrote: >> On Fri, Jan 6, 2023 at 7:01 PM Paul B Mahol wrote: >> >> > >> > >> > On Fri, Jan 6, 2023 at 6:25 PM Michael Niedermayer >> > >> > wrote: >> > >> >> On Thu, Jan 05, 2023 at 11:08:25PM +0100, P

Re: [FFmpeg-devel] [PATCH] libswresample: avoid s16p internal processing format

2023-01-08 Thread Paul B Mahol
On 1/8/23, Michael Niedermayer wrote: > On Fri, Jan 06, 2023 at 07:01:06PM +0100, Paul B Mahol wrote: >> On Fri, Jan 6, 2023 at 6:25 PM Michael Niedermayer >> >> wrote: >> >> > On Thu, Jan 05, 2023 at 11:08:25PM +0100, Paul B Mahol wrote: >> > > On Thu, Jan 5, 2023 at 9:53 PM Michael Niedermayer

[FFmpeg-devel] [PATCH v3] avformat/dvd: new dvd:// protocol for reading dvd folder/images

2023-01-08 Thread Stanislav Ionascu
dvd:// protocol uses libdvdread for opening folders and/or disc-images, it then either identifies the longest title-set, or uses the title-set parameter. After opening the dvd, it will read and output all VOBs, in sequence defined by the program-chain. Signed-off-by: Stanislav Ionascu --- confi

Re: [FFmpeg-devel] [PATCH] libswresample: avoid s16p internal processing format

2023-01-08 Thread Michael Niedermayer
On Fri, Jan 06, 2023 at 07:04:59PM +0100, Paul B Mahol wrote: > On Fri, Jan 6, 2023 at 7:01 PM Paul B Mahol wrote: > > > > > > > On Fri, Jan 6, 2023 at 6:25 PM Michael Niedermayer > > wrote: > > > >> On Thu, Jan 05, 2023 at 11:08:25PM +0100, Paul B Mahol wrote: > >> > On Thu, Jan 5, 2023 at 9:53

Re: [FFmpeg-devel] [PATCH] libswresample: avoid s16p internal processing format

2023-01-08 Thread Michael Niedermayer
On Fri, Jan 06, 2023 at 07:01:06PM +0100, Paul B Mahol wrote: > On Fri, Jan 6, 2023 at 6:25 PM Michael Niedermayer > wrote: > > > On Thu, Jan 05, 2023 at 11:08:25PM +0100, Paul B Mahol wrote: > > > On Thu, Jan 5, 2023 at 9:53 PM Michael Niedermayer < > > mich...@niedermayer.cc> > > > wrote: > > >

[FFmpeg-devel] [PATCH] avfilter: add fractional delay IR source filter

2023-01-08 Thread Paul B Mahol
Patch attached. From 7492dad5bc3a7826e5abd67f26503c74bd5745d2 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 8 Jan 2023 13:53:39 +0100 Subject: [PATCH] avfilter: add fractional delay IR source filter Signed-off-by: Paul B Mahol --- doc/filters.texi | 23 ++ libavfilter

[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Test lowres

2023-01-08 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index a20345db5c..1725e30a5a 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -423,6 +423,10 @@ i

[FFmpeg-devel] [PATCH 7/8] lavfi/graphparser: improve applying graph-level sws options

2023-01-08 Thread Anton Khirnov
The current code will apply them if the options string does not contain a 'flags' substring, and will do so by appending the graph-level option string to the filter option string (with the standard ':' separator). This is flawed in at least the following ways: - naive substring matching without act

[FFmpeg-devel] [PATCH 4/8] lavfi/avfilter: export a multikey dict from process_options()

2023-01-08 Thread Anton Khirnov
This way the function does not need to be able to match keys to AVOptions, which will be useful in future commits. --- libavfilter/avfilter.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 689c91891e..278d5868d

[FFmpeg-devel] [PATCH 6/8] lavfi/avfilter: process options for filters without a private class

2023-01-08 Thread Anton Khirnov
It still makes sense to apply AVFilterContext-level options to such filters. --- libavfilter/avfilter.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 43dfb11bdb..c2ecdffa6f 100644 --- a/libavfilter/avfilter.

[FFmpeg-devel] [PATCH 8/8] lavfi/graphparser: drop a redundant label

2023-01-08 Thread Anton Khirnov
--- libavfilter/graphparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index c8b0af5aba..0759c39014 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -421,7 +421,7 @@ int avfilter_graph_par

[FFmpeg-devel] [PATCH 1/8] lavfi/vf_scale: allow passing options to swscale directly

2023-01-08 Thread Anton Khirnov
Avoid using the dictionary mechanism, which is non-introspectable. As this is the only user of AVFilter.init_dict(), this callback can now be removed. --- libavfilter/vf_scale.c | 95 +- 1 file changed, 66 insertions(+), 29 deletions(-) diff --git a/libavfi

[FFmpeg-devel] [PATCH 3/8] lavfi/avfilter: avoid a redundant av_opt_set_dict2() call

2023-01-08 Thread Anton Khirnov
Current code first sets AVFilterContext-level options, then aplies the leftover on the filter's private data. This is unnecessary, applying the options to AVFilterContext with the AV_OPT_SEARCH_CHILDREN flag accomplishes the same effect. --- libavfilter/avfilter.c | 10 +- 1 file changed,

[FFmpeg-devel] [PATCH 5/8] lavfi/avfilter: simplify process_options()

2023-01-08 Thread Anton Khirnov
This function currently treats AVFilterContext options and filter-private options differently: the former are immediately applied, while the latter are stored in a dictionary to be applied later. There is no good reason for having two branches - storing all options in the dictionary is simpler and

[FFmpeg-devel] [PATCH 2/8] lavfi: remove AVFilter.init_dict()

2023-01-08 Thread Anton Khirnov
Nothing uses it anymore. All options on all filters can now be set with normal AVOptions mechanisms, such as av_opt_set*(). --- libavfilter/avfilter.c | 2 -- libavfilter/avfilter.h | 13 - 2 files changed, 15 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c