Re: [FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: dlopen libvulkan

2021-04-29 Thread Zane van Iperen
On 29/4/21 12:50 pm, Lynne wrote: v3 attached. > +for (int i = 0; i < FF_ARRAY_ELEMS(lib_names); i++) { > +p->libvulkan = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); Did you mean lib_names[i] instead of "libvulkan.so.1"? ___ ff

Re: [FFmpeg-devel] [PATCH v3 1/2] avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data

2021-04-29 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > lance.lmw...@gmail.com > Sent: 2021年4月28日 21:17 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v3 1/2] avfilter/dnn/dnn_backend_tf: > simplify the code with ff_hex_to_data > > On Wed, Apr 28, 2021 at 12:26:54PM

[FFmpeg-devel] [PATCH v4] doc/filters: Documentation to add sess_config option for tensorflow backend

2021-04-29 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- doc/filters.texi | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index e99d70a..4af5b72 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10214,6 +10214,12 @@ Set the input

[FFmpeg-devel] [PATCH 1/4] avfilter/vf_ssim: remove unnecessary check

2021-04-29 Thread lance . lmwang
From: Limin Wang For the pointer have been checked in the previous few lines of code Signed-off-by: Limin Wang --- libavfilter/vf_ssim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index e004b36..c6e4fe2 100644 --- a/libavfi

Re: [FFmpeg-devel] [PATCH v3 1/2] avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data

2021-04-29 Thread lance . lmwang
On Thu, Apr 29, 2021 at 12:20:17PM +, Guo, Yejun wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > lance.lmw...@gmail.com > > Sent: 2021年4月28日 21:17 > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH v3 1/2] avfilter/dnn/dnn_backend_tf: > >

Re: [FFmpeg-devel] [PATCH v4] doc/filters: Documentation to add sess_config option for tensorflow backend

2021-04-29 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > lance.lmw...@gmail.com > Sent: 2021年4月29日 20:46 > To: ffmpeg-devel@ffmpeg.org > Cc: Limin Wang > Subject: [FFmpeg-devel] [PATCH v4] doc/filters: Documentation to add > sess_config option for tensorflow backend > > From: Limin Wan

[FFmpeg-devel] [PATCH 2/4] avfilter/vf_psnr: remove unnecessary check

2021-04-29 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/vf_psnr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 7117e26..e5459d3 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -372,7 +372,7 @@ static

[FFmpeg-devel] [PATCH 3/4] avfilter/vf_identify: remove unnecessary check

2021-04-29 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/vf_identity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index 4e0a44d..c81c40a 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -29

[FFmpeg-devel] [PATCH 4/4] avfilter/vf_identify: fix typo

2021-04-29 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/vf_identity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index c81c40a..f476119 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -20

[FFmpeg-devel] [PATCH V2 1/6] lavfi/dnn_backend_openvino.c: unify code for infer request for sync/async

2021-04-29 Thread Guo, Yejun
--- the main change of V2 in this patch set is to rebase with latest code by resolving the conflicts libavfilter/dnn/dnn_backend_openvino.c | 49 +++--- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dn

[FFmpeg-devel] [PATCH V2 2/6] lavfi/dnn_backend_openvino.c: add InferenceItem between TaskItem and RequestItem

2021-04-29 Thread Guo, Yejun
There's one task item for one function call from dnn interface, there's one request item for one call to openvino. For classify, one task might need multiple inference for classification on every bounding box, so add InferenceItem. --- libavfilter/dnn/dnn_backend_openvino.c | 157 +

[FFmpeg-devel] [PATCH V2 3/6] lavfi/dnn_backend_openvino.c: move the logic for batch mode earlier

2021-04-29 Thread Guo, Yejun
--- libavfilter/dnn/dnn_backend_openvino.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index a8a02d7589..9f3c696e0a 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b/libavf

[FFmpeg-devel] [PATCH V2 4/6] lavfi/dnn: refine dnn interface to add DNNExecBaseParams

2021-04-29 Thread Guo, Yejun
Different function type of model requires different parameters, for example, object detection detects lots of objects (cat/dog/...) in the frame, and classifcation needs to know which object (cat or dog) it is going to classify. The current interface needs to add a new function with more parameter

[FFmpeg-devel] [PATCH V2 5/6] lavfi/dnn: add classify support with openvino backend

2021-04-29 Thread Guo, Yejun
Signed-off-by: Guo, Yejun --- libavfilter/dnn/dnn_backend_openvino.c | 143 + libavfilter/dnn/dnn_io_proc.c | 60 +++ libavfilter/dnn/dnn_io_proc.h | 1 + libavfilter/dnn_filter_common.c| 21 libavfilter/dnn_filter_common.h

[FFmpeg-devel] [PATCH V2 6/6] lavfi/dnn_classify: add filter dnn_classify for classification based on detection bounding boxes

2021-04-29 Thread Guo, Yejun
classification is done on every detection bounding box in frame's side data, which are the results of object detection (filter dnn_detect). Please refer to commit log of dnn_detect for the material for detection, and see below for classification. - download material for classifcation: wget https

Re: [FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: dlopen libvulkan

2021-04-29 Thread Lynne
Apr 29, 2021, 04:49 by d...@lynne.ee: > Apr 29, 2021, 04:35 by d...@lynne.ee: > >> Apr 29, 2021, 03:54 by d...@lynne.ee: >> >>> While Vulkan itself went more or less the way it was expected to go, >>> libvulkan didn't quite solve all of the opengl loader issues. It's >>> multi-vendor, >>> yes, b

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/faxcompr: Check for invalid VLC in decode_group3_1d_line()

2021-04-29 Thread Michael Niedermayer
On Wed, Apr 28, 2021 at 05:37:39PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: infinite loop > > Fixes: > > 33674/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4816457818046464 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-f

[FFmpeg-devel] [PATCH] ffmpeg: stop accessing private AVStream.codec_info_nb_frames

2021-04-29 Thread James Almer
Use AVSTREAM_EVENT_FLAG_NEW_PACKETS instead, which should provide the same information in this case. Finishes removing all uses of this field as started by 87f0c8280c. Signed-off-by: James Almer --- fftools/ffmpeg_opt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftool

[FFmpeg-devel] [PATCH] avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line()

2021-04-29 Thread Michael Niedermayer
Fixes: infinite loop Fixes: 33674/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4816457818046464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/faxcompr.c | 4 1 file cha

Re: [FFmpeg-devel] [PATCH] avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line()

2021-04-29 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: infinite loop > Fixes: > 33674/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4816457818046464 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > lib

[FFmpeg-devel] [PATCH] avfilter/vf_scale: store pointer offsets in a local variable before adding them

2021-04-29 Thread James Almer
Fixes -Wint-in-bool-context warnings. Signed-off-by: James Almer --- libavfilter/vf_scale.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index d95a8ad48a..759499395f 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/mv30: Check available space in decode_intra() more completly

2021-04-29 Thread Paul B Mahol
I suggest to write better non-hacky solutions. On Wed, Apr 28, 2021 at 4:33 PM Michael Niedermayer wrote: > On Thu, Feb 11, 2021 at 10:29:15PM +0100, Paul B Mahol wrote: > > this is hack > > what else do you suggest? > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF13

[FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix format specifiers for some printed variables

2021-04-29 Thread James Almer
VkPhysicalDeviceLimits.optimalBufferCopyRowPitchAlignment and VkPhysicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment are of type VkDeviceSize (a typedef uint64_t). VkPhysicalDeviceLimits.minMemoryMapAlignment is of type size_t. Signed-off-by: James Almer --- libavutil/h

Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_identify: remove unnecessary check

2021-04-29 Thread Paul B Mahol
commit log/message is wrong On Thu, Apr 29, 2021 at 3:16 PM wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavfilter/vf_identity.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c > index 4e0a44d.

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix format specifiers for some printed variables

2021-04-29 Thread Lynne
Apr 29, 2021, 18:33 by jamr...@gmail.com: > VkPhysicalDeviceLimits.optimalBufferCopyRowPitchAlignment and > VkPhysicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment > are of type > VkDeviceSize (a typedef uint64_t). > VkPhysicalDeviceLimits.minMemoryMapAlignment is of type

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix format specifiers for some printed variables

2021-04-29 Thread James Almer
On 4/29/2021 1:56 PM, Lynne wrote: Apr 29, 2021, 18:33 by jamr...@gmail.com: VkPhysicalDeviceLimits.optimalBufferCopyRowPitchAlignment and VkPhysicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment are of type VkDeviceSize (a typedef uint64_t). VkPhysicalDeviceLimits.minMe

[FFmpeg-devel] [PATCH] avcodec/utils: treat PAL8 for jpegs similar to other colorspaces

2021-04-29 Thread Michael Niedermayer
Fixes: out of array access Fixes: 33713/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5778775641030656 Related to: c8197f73e684b0edc450f3dc2b2b4b3fb9dedd0d Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael

Re: [FFmpeg-devel] [PATCH 2/2] avutil/mem: Also poison new av_realloc-allocated blocks

2021-04-29 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavutil/mem.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/libavutil/mem.c b/libavutil/mem.c > index cfb6d8ab8f..fa227f5e12 100644 > --- a/libavutil/mem.c > +++ b/libavutil/mem.c > @@ -133,14

[FFmpeg-devel] [PATCH 02/46] avcodec/a64multienc: Don't modify AVCodecContext.global_quality

2021-04-29 Thread Andreas Rheinhardt
According to the doxy, this field is set by the user. Signed-off-by: Andreas Rheinhardt --- libavcodec/a64multienc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 1b52631193..ad2500e41a 100644 --- a/libavcodec/a64mul

[FFmpeg-devel] [PATCH 03/46] avcodec/a64multienc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/a64multienc.c | 10 +- 1 file changed, 5 insertion

[FFmpeg-devel] [PATCH 05/46] avcodec/[e]ac3enc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
The size of the output buffer is always known in advance and the code has no alignment requirement (it uses mostly the PutBits API), so allowing user-supplied buffers is trivial. Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3enc.c | 3 ++- libavcodec/ac3enc_fixed.c | 1 + libavcodec/

[FFmpeg-devel] [PATCH 06/46] avcodec/adxenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/adxenc.c | 7 --- 1 file changed, 4 insertions(+), 3 d

[FFmpeg-devel] [PATCH 04/46] avcodec/adpcmenc: Avoid copying packet data, allow direct rendering

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; and one can also use user-supplied buffers. Signed-off-by: Andreas Rheinhardt --- libavcodec/adpcmenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcod

[FFmpeg-devel] [PATCH 07/46] avcodec/aptxenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/aptxenc.c | 7 --- 1 file changed, 4 insertions(+), 3

[FFmpeg-devel] [PATCH 08/46] avcodec/avuienc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial given that this encoder knows the size of the output buffer in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/avuienc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c index e9e30fe7f4..1c67af3fb5 100644 ---

[FFmpeg-devel] [PATCH 09/46] avcodec/bmpenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; this also makes it easy to allow user-supplied buffers. Only one thing needed to be changed: One can no longer use a pointer to uint16_t for the destination buffer because its alignment is

[FFmpeg-devel] [PATCH 10/46] avcodec/bmpenc: Use memcpy when data has desired endianness

2021-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/bmpenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index 409564d257..0082ec675a 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -20,6 +20,8 @@ * Foundation, Inc.

[FFmpeg-devel] [PATCH 13/46] avcodec/dcaenc: Don't write one bit at a time

2021-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/dcaenc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index bd08ccd331..76f1f141d1 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -1206,14 +1206,10 @@ static int e

[FFmpeg-devel] [PATCH 11/46] avcodec/cljrenc: Don't use too big buffers, don't copy them, set CAP_DR1

2021-04-29 Thread Andreas Rheinhardt
Up until now, the cljr encoder used buffers that were too big by a factor of eight (probably bit/byte confusion). This has been fixed. And because the needed buffer size can be easily calculated in advance, one can avoid the implicit use of an intermediate buffer and can even allow user-supplied bu

[FFmpeg-devel] [PATCH 12/46] avcodec/cngenc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for an encoder that knows the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/cngenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index 55826c75be..f37d586744 100644 --- a/libavco

[FFmpeg-devel] [PATCH 14/46] avcodec/dcaenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/dcaenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 del

[FFmpeg-devel] [PATCH 15/46] avcodec/dnxhdenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/dnxhdenc.c | 6 -- 1 file changed, 4 insertions(+), 2

[FFmpeg-devel] [PATCH 16/46] avcodec/dpxenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; this also makes it easy to allow user-supplied buffers. Only one thing needed to be changed: One can no longer use a pointer to uint16_t for the destination buffer because its alignment is

[FFmpeg-devel] [PATCH 17/46] avcodec/exrenc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for an encoder that knows the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/exrenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/exrenc.c b/libavcodec/exrenc.c index b2cb9c4205..60a9948b79 100644 --- a/libav

[FFmpeg-devel] [PATCH 18/46] avcodec/fitsenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/fitsenc.c | 9 - 1 file changed, 4 insertions(+),

[FFmpeg-devel] [PATCH 20/46] avcodec/g723_1enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/g723_1enc.c | 13 +++-- 1 file changed, 7 insertio

[FFmpeg-devel] [PATCH 19/46] avcodec/g722enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/g722enc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 de

[FFmpeg-devel] [PATCH 21/46] avcodec/g726: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/g726.c | 8 1 file changed, 4 insertions(+), 4 de

[FFmpeg-devel] [PATCH 22/46] avcodec/jpeglsenc: Check for invalid dimensions

2021-04-29 Thread Andreas Rheinhardt
The dimensions are written on two bytes. Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeglsenc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 3e73b04c0e..15d9204b1d 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/

[FFmpeg-devel] [PATCH 23/46] avcodec/jpeglsenc: Allocate buffer with fixed size only once

2021-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeglsenc.c | 46 -- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 15d9204b1d..17d46c0449 100644 --- a/libavcodec/jpeglsenc.c +++ b/liba

[FFmpeg-devel] [PATCH 24/46] avcodec/jpeglsenc: Avoid intermediate buffer, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Up until now, the JPEG-LS encoder allocated a worst-case-sized packet at the beginning of each encode2 call; then it wrote the packet header into its destination buffer and encoded the actual packet data; said data is written into another worst-case-sized buffer, because it needs to be escaped befo

[FFmpeg-devel] [PATCH 25/46] avcodec/jpeglsenc: Remove redundant implicit checks

2021-04-29 Thread Andreas Rheinhardt
Now that the proper buffer size is calculated (and checked) before allocating the buffer, it is known that the buffer always suffices. So use the unchecked PutBit-API; and also use an unchecked bitstream reader as we check ourselves. Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeglsenc.c |

[FFmpeg-devel] [PATCH 29/46] avcodec/pcm: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for encoders that know the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 79b33b935c..e9b8eab484 100644 --- a/libavcodec/pcm.c

[FFmpeg-devel] [PATCH 30/46] avcodec/r210enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/r210enc.c | 7 ++- 1 file changed, 6 insertions(+), 1

[FFmpeg-devel] [PATCH 26/46] avcodec/jpeglsenc: Remove unnecessary header

2021-04-29 Thread Andreas Rheinhardt
Unnecessary since 130d89d786d29148deb846de48b16e11a894e8a7. Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeglsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index c80d7373cf..a0552b3c54 100644 --- a/libavcodec/jpegls

[FFmpeg-devel] [PATCH 31/46] avcodec/r210enc: Deduplicate pix_fmts arrays

2021-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/r210enc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c index b143f516c1..2f641223d4 100644 --- a/libavcodec/r210enc.c +++ b/libavcodec/r210enc.c @@ -86,6 +86,7 @@ static int

[FFmpeg-devel] [PATCH 28/46] avcodec/pcm-dvdenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/pcm-dvdenc.c | 6 +++--- 1 file changed, 3 insertions(+),

[FFmpeg-devel] [PATCH 32/46] avcodec/ra144enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/ra144enc.c | 7 --- 1 file changed, 4 insertions(+), 3

[FFmpeg-devel] [PATCH 33/46] avcodec/rawenc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for an encoder that knows the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/rawenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c index baaab749fd..eec304448e 100644 --- a/libavco

[FFmpeg-devel] [PATCH 34/46] avcodec/roqaudioenc: Avoid copying data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/roqaudioenc.c | 6 -- 1 file changed, 4 insertions(+),

[FFmpeg-devel] [PATCH 35/46] avcodec/s302menc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/s302menc.c | 6 -- 1 file changed, 4 insertions(+), 2

[FFmpeg-devel] [PATCH 36/46] avcodec/v210enc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for an encoder that knows the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/v210enc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 020f0fffe5..ffa1cb6f4b 100644 --- a/liba

[FFmpeg-devel] [PATCH 37/46] avcodec/v308enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/v308enc.c | 5 - 1 file changed, 4 insertions(+), 1 de

[FFmpeg-devel] [PATCH 38/46] avcodec/v408enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/v408enc.c | 6 +- 1 file changed, 5 insertions(+), 1 d

[FFmpeg-devel] [PATCH 40/46] avcodec/xfaceenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/xfaceenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[FFmpeg-devel] [PATCH 39/46] avcodec/v410enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/v408enc.c | 6 -- libavcodec/v410enc.c | 6 -- 2 f

[FFmpeg-devel] [PATCH 41/46] avcodec/vc2enc: Allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Trivial for an encoder that has a very good estimate of the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc2enc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index ca5cebb742..2de6

[FFmpeg-devel] [PATCH 43/46] avcodec/xwdenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/xwdenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 dele

[FFmpeg-devel] [PATCH 44/46] avcodec/y41penc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/y41penc.c | 5 - 1 file changed, 4 insertions(+), 1 de

[FFmpeg-devel] [PATCH 42/46] avcodec/videotoolboxenc: Avoid copying data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Here the packet size is known before allocating the packet because the encoder provides said information (and works with internal buffers itself), so one use this information to avoid the implicit use of another intermediate buffer for the packet data; and by switching to ff_get_encode_buffer() one

[FFmpeg-devel] [PATCH 45/46] avcodec/yuv4enc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/yuv4enc.c | 6 +- 1 file changed, 5 insertions(+), 1 d

[FFmpeg-devel] [PATCH 46/46] avcodec/zmbvenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
Here the packet size is known before allocating the packet because the encoder itself works with an internal buffer, so one can use this information to avoid the implicit use of another intermediate buffer for the packet data; one can also switch to ff_get_encode_buffer() and directly use user-supp

[FFmpeg-devel] [PATCH 27/46] avcodec/nellymoserenc: Avoid copying packet data, allow user-supplied buffers

2021-04-29 Thread Andreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt --- libavcodec/nellymoserenc.c | 6 -- 1 file changed, 4 insertions(+

[FFmpeg-devel] [PATCH] avformat/dump: Remove remnants of codec timebase

2021-04-29 Thread Andreas Rheinhardt
Fixes Coverity issue #1477414. Signed-off-by: Andreas Rheinhardt --- libavformat/dump.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index 9f54bc3e8d..04c93dd7d3 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -5

[FFmpeg-devel] [PATCH 01/46] avcodec/a64multienc: Avoid intermediate buffer

2021-04-29 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- This patchset is the first batch of patches to implement support for user-supplied buffers in encoders; those who can't wait can already look here for the second part dealing with encoders with external libs: https://github.com/mkver/FFmpeg/commits/ff_alloc_pa

Re: [FFmpeg-devel] [PATCH] avformat/dump: Remove remnants of codec timebase

2021-04-29 Thread James Almer
On 4/29/2021 9:45 PM, Andreas Rheinhardt wrote: Fixes Coverity issue #1477414. Signed-off-by: Andreas Rheinhardt --- libavformat/dump.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index 9f54bc3e8d..04c93dd7d3 100644 ---

Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_identify: remove unnecessary check

2021-04-29 Thread lance . lmwang
On Thu, Apr 29, 2021 at 06:24:02PM +0200, Paul B Mahol wrote: > commit log/message is wrong Sorry, I'm not sure what's wrong, check -> checks? what's your suggestion? > > On Thu, Apr 29, 2021 at 3:16 PM wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavfilter

[FFmpeg-devel] [PATCH 1/4] dnn: add DCO_RGB color order to enum DNNColorOrder

2021-04-29 Thread Ting Fu
Adding DCO_RGB color order to DNNColorOrder, since tensorflow model needs this kind of color oder as input. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 1 + libavfilter/dnn/dnn_io_proc.c| 14 +++--- libavfilter/dnn_interface.h | 1 + 3 files changed, 13 inser

[FFmpeg-devel] [PATCH 2/4] lavfi/dnn_backend_tensorflow: add multiple outputs support

2021-04-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 49 libavfilter/dnn_filter_common.c | 45 + libavfilter/dnn_filter_common.h | 6 ++-- libavfilter/vf_derain.c | 2 +- libavfilter/vf_sr.c | 2 +- 5

[FFmpeg-devel] [PATCH 3/4] lavfi/dnn_backend_tensorflow: support detect model

2021-04-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 39 ++-- libavfilter/vf_dnn_detect.c | 32 +- 2 files changed, 63 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c

[FFmpeg-devel] [PATCH 4/4] dnn/vf_dnn_detect: add tensorflow output parse support

2021-04-29 Thread Ting Fu
Testing model is tensorflow offical model in github repo, please refer https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md to download the detect model as you need. For example, local testing was carried on with 'ssd_mobilenet_v2_coco_2018_03_29.ta

Re: [FFmpeg-devel] [PATCH] avfilter/af_afade: remove fade duration limit

2021-04-29 Thread realies
On Thu, Apr 29, 2021 at 2:49 AM realies wrote: > > From 8a4fe250e508932d8018adbb1af95d7c4a599a58 Mon Sep 17 00:00:00 2001 > From: realies > Date: Fri, 9 Apr 2021 21:57:47 +0100 > Subject: [PATCH] avfilter/af_afade: remove fade duration limit > > Removes arbitrary filter duration to allow fades up