Re: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_colormap: Avoid allocation of small array

2022-04-29 Thread Paul B Mahol
whole set lgtm ___ 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 v6 1/2] lavc/vaapi_encode: add support for maxframesize

2022-04-29 Thread Fei Wang
From: Linjie Fu Add support for max frame size: - max_frame_size (bytes) to indicate the max allowed size for frame. If the frame size exceeds the limitation, encoder will to control the frame size by adjusting QP value. ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -f rawvideo \

[FFmpeg-devel] [PATCH v6 2/2] doc/vaapi_encode: add documentations for max_frame_size

2022-04-29 Thread Fei Wang
From: Linjie Fu Add docs for max_frame_size option. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- doc/encoders.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 966032a720..43f6288e33 100644 --- a/doc/encoders.texi +++ b/doc/encod

Re: [FFmpeg-devel] [PATCH v5 1/2] lavc/vaapi_encode: add support for maxframesize

2022-04-29 Thread Wang, Fei W
> -Original Message- > From: Xiang, Haihao > Sent: Friday, April 29, 2022 1:18 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Wang, Fei W ; linjie...@intel.com > Subject: Re: [FFmpeg-devel] [PATCH v5 1/2] lavc/vaapi_encode: add support for > maxframesize > > On Fri, 2022-04-22 at 13:36 +0800,

[FFmpeg-devel] [PATCH v1 1/4] lavu: add sub frame side data

2022-04-29 Thread Fei Wang
Sub frame side data allows attach another AVFrame as side data into the target AVFrame. Signed-off-by: Fei Wang --- libavutil/Makefile | 2 ++ libavutil/frame.c | 5 ++- libavutil/frame.h | 5 +++ libavutil/sub_frame_metadata.c | 61 ++

[FFmpeg-devel] [PATCH v1 2/4] lavc: add sub frame options and flag

2022-04-29 Thread Fei Wang
Signed-off-by: Fei Wang --- doc/codecs.texi| 9 + libavcodec/avcodec.h | 15 +++ libavcodec/options_table.h | 2 ++ libavcodec/version.h | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 5e

[FFmpeg-devel] [PATCH v1 3/4] lavc/hevc_vaapi: enable sub frame support

2022-04-29 Thread Fei Wang
Intel HW provide a feature that allows decoder output another scaled frame beside original frame. And the scaled frame will attach to main frame as sub frame side data. The use case is mainly for video analysis. For example, scaled down frame can be used for analysis, and the result can be applied

[FFmpeg-devel] [PATCH v1 4/4] examples: seperate vaapi_decode from hw_decode

2022-04-29 Thread Fei Wang
Now vaapi_decode can be used to test vaapi decode and vaapi decode with sub frame. decode example: $ vaapi_decode 1920x1080.h265 out.yuv decode with sub frame example: $ vaapi_decode 1920x1080.h265 out.yuv width=640:height=480:format=argb sub_out.argb Signed-off-by: Fei Wang --- configure

Re: [FFmpeg-devel] [PATCH] avformat/mov: skip call ff_codec_get_id if possible

2022-04-29 Thread zhilizhao(赵志立)
> On Apr 19, 2022, at 1:12 PM, Zhao Zhili wrote: > > ff_codec_get_id loops over ff_codec_movvideo_tags (which is a large > array) two times. The result is unused most of the cases. > --- > libavformat/mov.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/libavformat/

[FFmpeg-devel] [PATCH v2 1/5] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag

2022-04-29 Thread Tong Wu
When uploading rawvideos using d3d11va hardware framecontext, the bindflag is not initialized and will cause creating texture failure. Now fix it, assign it the value of D3D11_BIND_RENDER_TARGET. Fixes: $ ffmpeg.exe -init_hw_device d3d11va=d3d11 -f lavfi -i yuvtestsrc -vf \ "format=nv12,hwupload=e

[FFmpeg-devel] [PATCH v2 2/5] avutil/hwcontext_qsv: derive QSV frames to D3D11VA frames

2022-04-29 Thread Tong Wu
Fixes: $ ffmpeg.exe -y -hwaccel qsv -init_hw_device d3d11va=d3d11 \ -init_hw_device qsv=qsv@d3d11 -c:v h264_qsv -i input.h264 \ -vf "hwmap=derive_device=d3d11va,format=d3d11" -f null - Signed-off-by: Tong Wu --- libavutil/hwcontext_qsv.c | 15 +-- 1 file changed, 13 insertions(+), 2

[FFmpeg-devel] [PATCH v2 3/5] avutil/hwcontext_d3d11va: add a format check for staging texture

2022-04-29 Thread Tong Wu
The texDesc.Format needs to be filled in with a corresponding format. I add a format check to initialize the format in case sometimes the ctx->internal->priv is not initialized, such as during the hwmap process. $ ffmpeg.exe -y -hwaccel qsv -init_hw_device d3d11va=d3d11 \ -init_hw_device qsv=qsv@d

[FFmpeg-devel] [PATCH v2 4/5] avutil/hwcontext_qsv: map QSV frames to D3D11VA frames

2022-04-29 Thread Tong Wu
When input is a rawvideo, after mapping QSV frames to D3D11VA frames, the output will have green frames. Now fix it. Fixes: $ ffmpeg.exe -y -init_hw_device d3d11va=d3d11 \ -init_hw_device qsv=qsv@d3d11 -s:v WxH -pix_fmt nv12 -i input.yuv \ -vf "format=nv12,hwupload=extra_hw_frames=16,\ hwmap=deriv

[FFmpeg-devel] [PATCH v2 5/5] avutil/hwcontext_qsv: map D3D11VA frames to QSV frames

2022-04-29 Thread Tong Wu
Fixes: $ ffmpeg.exe -init_hw_device d3d11va=d3d11 -f lavfi -i yuvtestsrc -vf "format=nv12,hwupload=extra_hw_frames=16,hwmap=derive_device=qsv,format=qsv ,hwdownload,format=nv12" -f null - Signed-off-by: Tong Wu --- libavutil/hwcontext_qsv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [FFmpeg-devel] [PATCH] avformat/mov: skip call ff_codec_get_id if possible

2022-04-29 Thread Andreas Rheinhardt
"zhilizhao(赵志立)": > > >> On Apr 19, 2022, at 1:12 PM, Zhao Zhili wrote: >> >> ff_codec_get_id loops over ff_codec_movvideo_tags (which is a large >> array) two times. The result is unused most of the cases. >> --- >> libavformat/mov.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >>

[FFmpeg-devel] [PATCH] avfilter: Add blockdetect filter

2022-04-29 Thread Thilo Borgmann
Hi, $subject based on http://www.eurasip.org/Proceedings/Eusipco/Eusipco2005/defevent/papers/cr1042.pdf -ThiloFrom e69095b17619454e671e401ec5c01f130c308a76 Mon Sep 17 00:00:00 2001 From: Thilo Borgmann Date: Fri, 29 Apr 2022 15:58:11 +0200 Subject: [PATCH] avfilter: Add blockdetect filter ---

Re: [FFmpeg-devel] [PATCH] lavc/flacdec: Increase residual limit from INT_MAX to UINT_MAX

2022-04-29 Thread Martijn van Beurden
Op wo 6 apr. 2022 om 09:12 schreef Martijn van Beurden : > > Op di 5 apr. 2022 om 15:37 schreef Martijn van Beurden : > > > > --- > > libavcodec/flacdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c > > index dd6026f9de

[FFmpeg-devel] [PATCH v2] avformat/avio: use av_match_name to match protocol whitelist

2022-04-29 Thread Leo Izen
This swaps av_match_list to av_match_name inside ffurl_connect, which allows ALL to be treated as a valid value on the whitelist in accordance with the behavior described in the documentation. --- libavformat/avio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/av

Re: [FFmpeg-devel] [PATCH 3/3] avformat/movenc: Add support for AVIF muxing

2022-04-29 Thread Vignesh Venkatasubramanian
On Thu, Apr 21, 2022 at 9:38 AM Vignesh Venkatasubramanian wrote: > > On Wed, Apr 13, 2022 at 2:35 PM Vignesh Venkatasubramanian > wrote: > > > > On Wed, Apr 13, 2022 at 2:04 PM Andreas Rheinhardt > > wrote: > > > > > > Vignesh Venkatasubramanian: > > > > On Mon, Mar 21, 2022 at 1:46 PM Andreas

Re: [FFmpeg-devel] [PATCH v11 5/6] fftools: Enable long path support on Windows (fixes #8885)

2022-04-29 Thread nil-admirari
> What is the effect of the version attribute here? Would it be meaningful > to replace the static dummy value with something more realistic like > "5.1.n" or similar? Version is a required attribute, see https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests. It does not h

[FFmpeg-devel] [PATCH 2/2] avcodec/mpeg4videodec: Check pixel size against packet size

2022-04-29 Thread Michael Niedermayer
Fixes: Timeout Fixes: 46866/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5114397204283392 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4videodec.c | 15 +--

[FFmpeg-devel] [PATCH 1/2] avcodec/alacdsp: Make intermediates unsigned

2022-04-29 Thread Michael Niedermayer
Fixes: signed integer overflow: -14914387 + -2147418648 cannot be represented in type 'int' Fixes: 46464/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-474307197311385 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-b

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-04-29 Thread nil-admirari
> A code change for which no use case exists and does not provide > any benefit is not relevant. That's my point. You've deleted me saying >> You're talking as if MAX_PATH limited library loader is self-evidently >> superior, and it is the loader that has no such limitation that has to >> justif

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-04-29 Thread nil-admirari
> What I'm saying is that prepending the long path prefix is the better way > for supporting long paths and I mentioned our experience with it only to > confirm that it's working well. Maybe you'll even provide a patchset for such a wonderful approach? > The .NET/corefx runtime uses the prefix

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-04-29 Thread nil-admirari
> This patchset does not provide reliable behavior. Actually it does. > This way, you won't be able to use long paths with ffmpeg within the next 5-8 > years at minimum, Long paths can be used since August, 2 2016. Some ~6 years have already passed. > because even in the latest versions of Win

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-04-29 Thread nil-admirari
> As soon as Microsoft actually makes UTF-8 > the default code page going forward, that issue will poof > out of existence, as if by magic. It already does if you > toggle it on in the system settings. True. System-wide UTF-8 can cause problems with legacy software, but starting with Windows 11 su

[FFmpeg-devel] [PATCH 14/19] tests/Makefile: Remove unset FATE_TESTS

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index ea5e939cf5..ca228ae897 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -274,10 +274,10 @@ fate:: $(FATE) fate-hw: $(FATE_HW-y

[FFmpeg-devel] [PATCH 15/19] fate/hevc: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Also replace define/foreach with pattern-specific variable values. Signed-off-by: Andreas Rheinhardt --- tests/fate/hevc.mak | 102 +++- 1 file changed, 34 insertions(+), 68 deletions(-) diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 3adee59

[FFmpeg-devel] [PATCH 16/19] fate/lossless-video: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/lossless-video.mak | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/fate/lossless-video.mak b/tests/fate/lossless-video.mak index a81c6e9ab0..05a8ba29e1 100644 --- a/tests/fate/lossless-video.ma

[FFmpeg-devel] [PATCH 17/19] fate/microsoft: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/microsoft.mak | 68 +++- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index 639757880c..ee1a062425 100644 --- a/tests/fate/microsoft.mak +++

[FFmpeg-devel] [PATCH 18/19] fate/mpeg4: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/mpeg4.mak | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/fate/mpeg4.mak b/tests/fate/mpeg4.mak index 05c26b9be5..4cec21c547 100644 --- a/tests/fate/mpeg4.mak +++ b/tests/fate/mpeg4.mak @@ -3,21 +3,23 @@ MPEG4_R

[FFmpeg-devel] [PATCH 19/19] fate/pixlet: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/pixlet.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/pixlet.mak b/tests/fate/pixlet.mak index 7c4604cc08..524a8797c0 100644 --- a/tests/fate/pixlet.mak +++ b/tests/fate/pixlet.mak @@ -1,5 +1,5 @@ -FATE_PIX

Re: [FFmpeg-devel] [PATCH] avfilter/alimiter: Add an option "comp_delay" that removes the delay introduced by lookahead buffer

2022-04-29 Thread Wang Cao
On Fri, Apr 15, 2022 at 11:50 AM Wang Cao wrote: > 1. The option also flushes all the valid audio samples in the lookahead >buffer so the audio integrity is preserved. Previously the the output >audio will lose the amount of audio samples equal to the size of >lookahead buffer > 2. Ad

Re: [FFmpeg-devel] [PATCH v2] avcodec/libaomenc: Add unmet target level warning

2022-04-29 Thread Bohan Li
Gentle ping on this :) On Tue, Apr 19, 2022 at 11:20 AM Bohan Li wrote: > When target levels are set, this patch checks whether they are > satisfied by libaom. If not, a warning is shown. Otherwise the output > levels are also logged. > > This patch applies basically the same approach used for l

Re: [FFmpeg-devel] [PATCH v2 1/5] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag

2022-04-29 Thread Hendrik Leppkes
On Fri, Apr 29, 2022 at 12:45 PM Tong Wu wrote: > > When uploading rawvideos using d3d11va hardware framecontext, the bindflag > is not initialized and will cause creating texture failure. Now fix it, > assign it the value of D3D11_BIND_RENDER_TARGET. > As with similar fixes of this nature, this

[FFmpeg-devel] [PATCH 1/2] tools/target_dec_fuzzer: Adjust threshold or CFHD

2022-04-29 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 2/2] avcodec/h2645_parse: Check HEVC NAL size

2022-04-29 Thread Michael Niedermayer
Fixes: Assertion failure Fixes: 46662/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4947860854013952 This also results in more frames to be decoded from fate samples Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by

[FFmpeg-devel] [PATCH 20/24] fate/qtrle: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/qtrle.mak | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/fate/qtrle.mak b/tests/fate/qtrle.mak index 3dd0afbd3f..3adefd2009 100644 --- a/tests/fate/qtrle.mak +++ b/tests/fate/qtrle.mak @@ -1,23 +1,26 @@

[FFmpeg-devel] [PATCH 22/24] tests/fate-run: Always use -bitexact for ffprobe

2022-04-29 Thread Andreas Rheinhardt
Makes no difference currently. Signed-off-by: Andreas Rheinhardt --- tests/fate-run.sh | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 3c62246c8a..821e949b01 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@

[FFmpeg-devel] [PATCH 21/24] tests/ref: Remove unused reference files

2022-04-29 Thread Andreas Rheinhardt
Accidentally resurrected in fc49f22c3b735db5aaac5f98e40b7124a2be13b8 and 7711f19eda40a7fd1c8a327f1700ffdd115e1667, forgotten in 6ebc71847e21a8abaf7ff3d902cb1cf63511e7b4 and 1a6a088f7c7b164042ad16d43d05543ce1bacfa4 or never needed (filter-aemphasis). Signed-off-by: Andreas Rheinhardt --- tests/re

[FFmpeg-devel] [PATCH 23/24] fate/hap: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/hap.mak | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/fate/hap.mak b/tests/fate/hap.mak index ba921798cc..8268798f4a 100644 --- a/tests/fate/hap.mak +++ b/tests/fate/hap.mak @@ -25,8 +25,10 @@ fate-hap-al

[FFmpeg-devel] [PATCH 24/24] fate/h264: Fix test requirements

2022-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/h264.mak | 69 +++-- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak index e075b6f67f..44e20f7259 100644 --- a/tests/fate/h264.mak +++ b/tests/fate/h2