[FFmpeg-devel] [PATCH] libavutil/hwcontext_qsv: clean padding when upload qsv frames

2021-12-01 Thread Wenbin Chen
When we upload a frame that is not padded as MSDK requires, we create a new AVFrame to copy data. The frame's padding data is uninitialized so it brings run to run problem. For example, If we run the following command serveral times we will get different outputs. ffmpeg -init_hw_device qsv=qsv:hw

Re: [FFmpeg-devel] [PATCH] swresample/swresample: Remove array size hint from swr_convert()

2021-12-01 Thread Andreas Rheinhardt
Andreas Rheinhardt: > SWR_CH_MAX is internal only and the arrays are therefore not required > to have that many elements (and they typically don't do it). So remove > this potentially confusing hint. > > (Newer versions of GCC emit -Warray-parameter= warnings for this, > because the definition

Re: [FFmpeg-devel] [PATCH v3 1/3] avfilter/x86/vf_exposure: add x86 SIMD optimization

2021-12-01 Thread Wu, Jianhua
Ping. > From: Wu, Jianhua > Sent: Monday, November 22, 2021 4:09 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Wu, Jianhua > Subject: [PATCH v3 1/3] avfilter/x86/vf_exposure: add x86 SIMD optimization > > Performance data(Less is better): > exposure_c:857394 > exposure_sse: 327589 > >

[FFmpeg-devel] [PATCH v2] avformat/rtsp: load the sdp file with avio_read_to_bprint()

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e6a4993..249a019 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2373,9

Re: [FFmpeg-devel] 回复: [PATCH v4 2/2] avfilter: add a flip_vulkan filter

2021-12-01 Thread Wu, Jianhua
Ping. > Wu Jianhua: > Lynne: > >>ffm...@gyani.pro: > >>> On 2021-11-26 04:33 pm, Lynne wrote: > >>> > 26 Nov 2021, 11:37 by ffm...@gyani.pro: > > > > > On 2021-11-26 03:08 pm, Lynne wrote: > > > >> 26 Nov 2021, 10:10 by jianhua...@intel.com: > >> > >> This filter

Re: [FFmpeg-devel] [PATCH V5 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-12-01 Thread Chen, Wenbin
> The vaapi can import external frame, but the planes of the external > frames should be in the same drm object. A new option "contiguous_planes" > is added to device. This flag tells device to allocate places in one > memory. When device is derived from vaapi this flag will be enabled. > A new

[FFmpeg-devel] [PATCH V5 5/5] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

2021-12-01 Thread Wenbin Chen
When vulkan image exports to drm, the tilling need to be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan image using this format. Now the following command line works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \ vaapi -i

[FFmpeg-devel] [PATCH V5 4/5] libavutil/hwcontext_vulkan: Add support to hwmap to software frame when using contiguous_planes flag.

2021-12-01 Thread Wenbin Chen
Add support to map vulkan frames to software frames when using contiguous_planes flag. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vulkan.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index

[FFmpeg-devel] [PATCH V5 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-12-01 Thread Wenbin Chen
The vaapi can import external frame, but the planes of the external frames should be in the same drm object. A new option "contiguous_planes" is added to device. This flag tells device to allocate places in one memory. When device is derived from vaapi this flag will be enabled. A new flag

[FFmpeg-devel] [PATCH V5 2/5] libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frame

2021-12-01 Thread Wenbin Chen
Vulkan will map nv12 to R8 and GR88, so add this map to vaapi to support vulkan frame. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vaapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 75acc851d6..994b744e4d 100644 ---

[FFmpeg-devel] [PATCH V5 1/5] hwcontext_vaapi: Use PRIME_2 memory type for modifiers.

2021-12-01 Thread Wenbin Chen
From: Bas Nieuwenhuizen This way we can pass explicit modifiers in. Sometimes the modifier matters for the number of memory planes that libva accepts, in particular when dealing with driver-compressed textures. Furthermore the driver might not actually be able to determine the implicit modifier

Re: [FFmpeg-devel] [PATCH V4 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-12-01 Thread Chen, Wenbin
> Quoting Wenbin Chen (2021-11-30 07:28:13) > > diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h > > index fdf2a60156..c485ee7437 100644 > > --- a/libavutil/hwcontext_vulkan.h > > +++ b/libavutil/hwcontext_vulkan.h > > @@ -35,6 +35,17 @@ > > * with the data pointer set to

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread lance . lmwang
On Wed, Dec 01, 2021 at 06:55:19PM +0100, Marton Balint wrote: > > > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > > On Wed, Dec 01, 2021 at 05:17:08PM +0200, Martin Storsjö wrote: > > > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > > > > > > On Wed, Dec 01, 2021 at 03:55:37PM

Re: [FFmpeg-devel] [PATCH] libavdevice/avfoundation.m: use AudioConvert, extend supported formats

2021-12-01 Thread Romain Beauxis
Hi there! Anyone interested in the patch below? It fixes an issue with some macos avfoundation input devices that return formats currently not supported by the implementation. I also have another important bugfix in the concurrency model of the implementation waiting for this to be merged first.

Re: [FFmpeg-devel] [PATCH v2] lavu/avframe: add a time_base field

2021-12-01 Thread Lynne
1 Dec 2021, 16:47 by an...@khirnov.net: > Quoting Lynne (2021-11-26 09:00:59) > >> 25 Nov 2021, 23:49 by c...@passwd.hu: >> >> > >> > >> > On Thu, 25 Nov 2021, Lynne wrote: >> > >> >> This adds a time_base field (currently unused), analogue to the >> >> AVPacket.time_base field. >> >> This allows

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread Marton Balint
On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: On Wed, Dec 01, 2021 at 05:17:08PM +0200, Martin Storsjö wrote: On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > On Wed, Dec 01, 2021 at 03:55:37PM +0200, Martin Storsjö wrote: > > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > >

[FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_filter: Avoid DynBuf API to improve error checks

2021-12-01 Thread Andreas Rheinhardt
choose_pix_fmts() used the dynamic buffer API to write strings; as is common among uses of this API, only opening the dynamic buffer was checked, but not the end result, leading to crashes in case of allocation failure. Furthermore, some static strings were duplicated; the allocations performed

[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_filter: Avoid DynBuf-API for writing strings

2021-12-01 Thread Andreas Rheinhardt
It is not really natural, it requires internal allocations of its own and its error handling is horrible (i.e. the implicit (re)allocations here are unchecked). Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_filter.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-)

[FFmpeg-devel] [PATCH 2/4] swscale/yuv2rgb: Silence a set-but-unused-variable warning

2021-12-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libswscale/yuv2rgb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 353de2f822..76232cb364 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -145,8 +145,8 @@ const int

[FFmpeg-devel] [PATCH 1/4] all: Remove unused-but-set variables

2021-12-01 Thread Andreas Rheinhardt
Newer versions of Clang detect this and emit warnings for it. Signed-off-by: Andreas Rheinhardt --- libavcodec/aaccoder.c| 3 +-- libavcodec/cinepakenc.c | 3 --- libavcodec/error_resilience.c| 3 --- libavcodec/imc.c | 5 ++--- libavcodec/j2kenc.c

Re: [FFmpeg-devel] Add support for loongarch.

2021-12-01 Thread Michael Niedermayer
On Wed, Dec 01, 2021 at 11:52:18AM +0800, Shiyou Yin wrote: > V2: > 1. rebase. > 2. Change Author email from yinshi...@loongson.cn to > yinshiyou...@loongson.cn for 1/3 2/3. > 3. Refine 2/3. > > [PATCH v2 1/3] configure: Add support for loongarch. > [PATCH v2 2/3] avcodec: [loongarch] optimize

Re: [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust DXA threshold

2021-12-01 Thread Michael Niedermayer
On Tue, Nov 30, 2021 at 08:59:33PM +0100, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 40203/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXA_fuzzer-4587923496894464 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/vp3: Check version in all cases when VP4 code is not built

2021-12-01 Thread Michael Niedermayer
On Wed, Dec 01, 2021 at 04:14:20PM +1100, Peter Ross wrote: > On Tue, Nov 30, 2021 at 08:59:34PM +0100, Michael Niedermayer wrote: > > Fixes: out of array read > > Fixes: > > 40284/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4599568176644096 > > > > Found-by: continuous fuzzing

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/gemdec: Check tag & planes before image allocation

2021-12-01 Thread Michael Niedermayer
On Wed, Dec 01, 2021 at 04:15:49PM +1100, Peter Ross wrote: > On Sun, Nov 28, 2021 at 07:55:14PM +0100, Michael Niedermayer wrote: > > Fixes: Timeout > > Fixes: > > 41083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5843826518917120 > > > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH v2] lavu/avframe: add a time_base field

2021-12-01 Thread Anton Khirnov
Quoting Lynne (2021-11-26 09:00:59) > 25 Nov 2021, 23:49 by c...@passwd.hu: > > > > > > > On Thu, 25 Nov 2021, Lynne wrote: > > > >> This adds a time_base field (currently unused), analogue to the > >> AVPacket.time_base field. > >> This allows for API clients to exchange AVFrames directly,

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread lance . lmwang
On Wed, Dec 01, 2021 at 05:17:08PM +0200, Martin Storsjö wrote: > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > > On Wed, Dec 01, 2021 at 03:55:37PM +0200, Martin Storsjö wrote: > > > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > > > > > > From: Limin Wang > > > > >

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread Martin Storsjö
On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: On Wed, Dec 01, 2021 at 03:55:37PM +0200, Martin Storsjö wrote: On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavformat/rtsp.c | 30 -- > 1 file

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread lance . lmwang
On Wed, Dec 01, 2021 at 03:55:37PM +0200, Martin Storsjö wrote: > On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavformat/rtsp.c | 30 -- > > 1 file changed, 20 insertions(+), 10 deletions(-)

Re: [FFmpeg-devel] [PATCH v18 02/19] avutil/frame: Prepare AVFrame for subtitle handling

2021-12-01 Thread Anton Khirnov
Quoting Soft Works (2021-11-29 20:47:56) > @@ -481,6 +489,39 @@ typedef struct AVFrame { > */ > uint64_t channel_layout; > > +/** > + * Display start time, relative to packet pts, in ms. > + */ > +uint32_t subtitle_start_time; > + > +/** > + * Display end time,

Re: [FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread Martin Storsjö
On Wed, 1 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e6a4993..ec8be8b 100644 ---

[FFmpeg-devel] [PATCH v2 4/5] avcodec/bitpacked_dec: support for frame thread decode

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/bitpacked_dec.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c index a2edccc..90e5bcc 100644 --- a/libavcodec/bitpacked_dec.c +++

[FFmpeg-devel] [PATCH 5/5] avcodec/bitpacked_enc: suppport for frame thread encode

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- multi-thread is active, but I'm not sure why the performance isn't getting better. libavcodec/bitpacked_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bitpacked_enc.c b/libavcodec/bitpacked_enc.c index

[FFmpeg-devel] [PATCH 4/5] avcodec/bitpacked_dec: support for frame thread decode

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/bitpacked_dec.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c index a2edccc..90e5bcc 100644 --- a/libavcodec/bitpacked_dec.c +++

[FFmpeg-devel] [PATCH 3/5] avcodec/bitpacked_dec: setting pict_type and key_frame after decode()

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/bitpacked_dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c index c1cb6ac..a2edccc 100644 --- a/libavcodec/bitpacked_dec.c +++

[FFmpeg-devel] [PATCH 2/5] avcodec/bitpacked_dec: remove AV_CODEC_CAP_EXPERIMENTAL capabilities

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/bitpacked_dec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c index 0440df9..c1cb6ac 100644 --- a/libavcodec/bitpacked_dec.c +++ b/libavcodec/bitpacked_dec.c @@ -149,7 +149,6

[FFmpeg-devel] [PATCH 1/5] avformat/rtsp: make use of avio_get_str() to load the sdp

2021-12-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e6a4993..ec8be8b 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@

Re: [FFmpeg-devel] [PATCH v18 01/19] avcodec, avutil: Move enum AVSubtitleType

2021-12-01 Thread Anton Khirnov
Quoting Soft Works (2021-11-29 20:47:52) > Signed-off-by: softworkz > --- > libavcodec/avcodec.h | 19 +-- > libavutil/subfmt.h | 58 > 2 files changed, 59 insertions(+), 18 deletions(-) > create mode 100644 libavutil/subfmt.h This

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Steven Liu (2021-12-01 12:37:40) >> Check avio_printf value and len from avio_close_dyn_buf, it should >> incorrect if they are not equal each other. >> >> Reported-by: TOTE Robot >> Signed-off-by: Steven Liu >> --- >> fftools/ffmpeg_filter.c | 5 - >> 1 file

Re: [FFmpeg-devel] [PATCH V4 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-12-01 Thread Anton Khirnov
Quoting Wenbin Chen (2021-11-30 07:28:13) > diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h > index fdf2a60156..c485ee7437 100644 > --- a/libavutil/hwcontext_vulkan.h > +++ b/libavutil/hwcontext_vulkan.h > @@ -35,6 +35,17 @@ > * with the data pointer set to an AVVkFrame.

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Anton Khirnov
Quoting Steven Liu (2021-12-01 12:37:40) > Check avio_printf value and len from avio_close_dyn_buf, it should > incorrect if they are not equal each other. > > Reported-by: TOTE Robot > Signed-off-by: Steven Liu > --- > fftools/ffmpeg_filter.c | 5 - > 1 file changed, 4 insertions(+), 1

[FFmpeg-devel] [PATCH v2] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Steven Liu
Check avio_printf value and len from avio_close_dyn_buf, it should incorrect if they are not equal each other. Reported-by: TOTE Robot Signed-off-by: Steven Liu --- fftools/ffmpeg_filter.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c

Re: [FFmpeg-devel] [PATCH 4/5] avformat: make AVFormatContext io_close return an int

2021-12-01 Thread Anton Khirnov
Quoting Marton Balint (2021-11-30 10:07:21) > > > On Tue, 30 Nov 2021, Andreas Rheinhardt wrote: > > > Marton Balint: > >> Otherwise there is no way to detect any error during avio_close(). > >> > >> Signed-off-by: Marton Balint > >> --- > >> doc/APIchanges | 3 +++ > >>

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-01 Thread Anton Khirnov
Quoting Soft Works (2021-11-30 15:22:38) > Signed-off-by: softworkz > --- > V2: Add public method av_frame_copy_side_data() instead to copying the > implementation. > > libavfilter/qsvvpp.c | 5 > libavfilter/vf_overlay_qsv.c | 19 +--- > libavutil/frame.c| 57

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Anton Khirnov
Quoting Steven Liu (2021-12-01 11:27:41) > Anton Khirnov 于2021年12月1日周三 下午6:21写道: > > > > Quoting Steven Liu (2021-12-01 09:37:52) > > > From: Steven Liu > > > > > > ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can > > > be set to NULL, check NULL pointer deference after it

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-01 Thread Tomas Härdin
tis 2021-11-30 klockan 10:22 +0100 skrev Nicolas Gaullier: Fix GC container ul. Fix GC element type both for the generic case and for OPAtom. Thanks to Philip de Nier for checking the values, especially for OPAtom. ---  libavformat/mxfenc.c  | 8 ++--  tests/ref/lavf/mxf_opatom | 2 +-  2

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Steven Liu
Anton Khirnov 于2021年12月1日周三 下午6:21写道: > > Quoting Steven Liu (2021-12-01 09:37:52) > > From: Steven Liu > > > > ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can > > be set to NULL, check NULL pointer deference after it should be ok. > > I don't understand this reasoning.

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Anton Khirnov
Quoting Steven Liu (2021-12-01 09:37:52) > From: Steven Liu > > ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can > be set to NULL, check NULL pointer deference after it should be ok. I don't understand this reasoning. avio_close_dyn_buf() should produce a non-NULL output

[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf

2021-12-01 Thread Steven Liu
From: Steven Liu ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can be set to NULL, check NULL pointer deference after it should be ok. Reported-by: TOTE Robot Signed-off-by: Steven Liu --- fftools/ffmpeg_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git