[FFmpeg-devel] [PATCH V2 7/7] libavfilter/dnn: add more data type support for dnn model input

2019-04-24 Thread Guo, Yejun
currently, only float is supported as model input, actually, there are other data types, this patch adds uint8. Signed-off-by: Guo, Yejun --- libavfilter/dnn_backend_native.c | 4 +++- libavfilter/dnn_backend_tf.c | 28 libavfilter/dnn_interface.h | 10

[FFmpeg-devel] [PATCH V2 5/7] libavfilter/dnn: avoid memcpy for tensorflow dnn output

2019-04-24 Thread Guo, Yejun
use TF_Tensor's cpu address to avoid extra memcpy. Signed-off-by: Guo, Yejun --- libavfilter/dnn_backend_tf.c | 36 libavfilter/vf_sr.c | 3 --- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/libavfilter/dnn_backend_tf.c

[FFmpeg-devel] [PATCH V2 6/7] libavfilter/dnn: support multiple outputs for tensorflow model

2019-04-24 Thread Guo, Yejun
some models such as ssd, yolo have more than one output. the clean up code in this patch is a little complex, it is because that set_input_output_tf could be called for many times together with ff_dnn_execute_model_tf, we have to clean resources for the case that the two interfaces are called

[FFmpeg-devel] [PATCH V2 3/7] libavfilter/dnn: remove limit for the name of DNN model input/output

2019-04-24 Thread Guo, Yejun
remove the requirment that the name of DNN model input/output should be "x"/"y", Signed-off-by: Guo, Yejun --- libavfilter/dnn_backend_native.c | 2 +- libavfilter/dnn_backend_tf.c | 10 +- libavfilter/dnn_interface.h | 2 +- libavfilter/vf_sr.c | 4 ++-- 4

[FFmpeg-devel] [PATCH V2 1/7] libavfilter/dnn_backend_tf.c: set layer_add_res for input layer

2019-04-24 Thread Guo, Yejun
otherwise, the following check will return error if layer_add_res is randomly initialized. Signed-off-by: Guo, Yejun --- libavfilter/dnn_backend_tf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c index 5bc7f06..9e0c127 100644 ---

[FFmpeg-devel] [PATCH V2 4/7] libavfilter/dnn: determine dnn output during execute_model instead of set_input_output

2019-04-24 Thread Guo, Yejun
Currently, within interface set_input_output, the dims/memory of the tensorflow dnn model output is determined by executing the model with zero input, actually, the output dims might vary with different input data for networks such as object detection models faster-rcnn, ssd and yolo. This patch

[FFmpeg-devel] [PATCH V2 2/7] libavfilter/vf_sr: refine code to remove keyword 'else'

2019-04-24 Thread Guo, Yejun
remove 'else' since there is always 'return' in 'if' scope, so the code will be clean for later maintenance Signed-off-by: Guo, Yejun --- libavfilter/vf_sr.c | 143 ++-- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git

[FFmpeg-devel] [PATCH]configure: Do not overwrite src symlink if it exists

2019-04-24 Thread Carl Eugen Hoyos
Hi! Attached patch allows to run fate from wsl for out-of-tree builds. Please comment, Carl Eugen From 8e8742a42a8e945c7d6c90810e6409cbb4210967 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 25 Apr 2019 00:42:48 +0200 Subject: [PATCH] configure: Do not overwrite src symlink if it

Re: [FFmpeg-devel] [PATCH]lavfi/frei0r: Fix union and remove unneeded cast

2019-04-24 Thread Carl Eugen Hoyos
2019-04-24 22:27 GMT+02:00, Paul B Mahol : > On 4/23/19, Carl Eugen Hoyos wrote: >> Hi! >> >> I failed to test attached patch but it seems like a more useful fix for >> the following (past) warning: >> libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from >> incompatible pointer

Re: [FFmpeg-devel] [PATCH] avcodec/h264_ps: fix storage size for offset_for_ref_frame

2019-04-24 Thread James Almer
On 4/16/2019 6:48 PM, Mark Thompson wrote: > On 11/04/2019 04:10, James Almer wrote: >> On 4/10/2019 3:30 PM, James Almer wrote: >>> The spec defines the valid range of values to be INT32_MIN + 1 to >>> INT32_MAX, inclusive. >>> >>> Signed-off-by: James Almer >>> --- >>> A good example of why

[FFmpeg-devel] [PATCH 2/2] avcodec/pnm_parser: Remember the size of the image and do not reparse the header

2019-04-24 Thread Michael Niedermayer
Fixes: Timeout (11sec -> 60ms) Fixes: 14270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5734809634078720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/pnm_parser.c | 29

[FFmpeg-devel] [PATCH 1/2] avcodec/agm: Check output size before allocation

2019-04-24 Thread Michael Niedermayer
Fixes: OOM Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/agm.c | 3 +++ 1 file changed, 3

Re: [FFmpeg-devel] [PATCH]lavfi/frei0r: Fix union and remove unneeded cast

2019-04-24 Thread Paul B Mahol
On 4/23/19, Carl Eugen Hoyos wrote: > Hi! > > I failed to test attached patch but it seems like a more useful fix for > the following (past) warning: > libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from > incompatible pointer type ‘char *’ > > Please comment, Carl Eugen > LGTM

Re: [FFmpeg-devel] [PATCHv2 3/5] avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid

2019-04-24 Thread Marton Balint
On Wed, 24 Apr 2019, Tomas Härdin wrote: mån 2019-04-22 klockan 19:15 +0200 skrev Marton Balint: This affects the following samples: samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf samples/ffmpeg-bugs/trac/ticket5016/r0.mxf

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_mpeg2: fix leak of extra_information_slice buffer in cbs_mpeg2_read_slice_header()

2019-04-24 Thread Andreas Rheinhardt
Hello, James Almer: > cbs_mpeg2_free_slice() calls av_buffer_unref() on extra_information_ref, > meaning allocating with av_malloc() was not the intention. > > Signed-off-by: James Almer > --- > Couldn't find any mpeg2 sample containing these fields, so it's untested. > The leak is obvious

[FFmpeg-devel] [PATCH] avcodec/cbs_mpeg2: fix leak of extra_information_slice buffer in cbs_mpeg2_read_slice_header()

2019-04-24 Thread James Almer
cbs_mpeg2_free_slice() calls av_buffer_unref() on extra_information_ref, meaning allocating with av_malloc() was not the intention. Signed-off-by: James Almer --- Couldn't find any mpeg2 sample containing these fields, so it's untested. The leak is obvious regardless of that.

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mxfenc: support XAVC long gop

2019-04-24 Thread Baptiste Coudurier
Hi Michael, I hope you are doing well, > On Apr 16, 2019, at 4:03 PM, Michael Niedermayer > wrote: > > Signed PGP part > On Wed, Apr 10, 2019 at 06:54:53PM -0300, James Almer wrote: >> On 4/10/2019 6:26 PM, Baptiste Coudurier wrote: On Apr 9, 2019, at 6:27 PM, James Almer wrote:

Re: [FFmpeg-devel] [PATCH v1] lavf/dashenc: Add option for calculting pkt duration

2019-04-24 Thread Jun Li
On Sun, Apr 21, 2019 at 5:51 PM Jun Li wrote: > Fix #7144. > The current packet duration calculation is heuristic, which uses the > historical durtion as current duration. This commit adds the option > to buffer one packet and calcuate its duration when next packet arrives. > Obviously it adds

Re: [FFmpeg-devel] [MSVC toolchain] Patch to allow building FFmpeg with Linux bash on Windows (WSL)

2019-04-24 Thread Thomas Volkert
On 24.04.2019 12:20, Timo Rothenpieler wrote: > On 24/04/2019 01:38, Carl Eugen Hoyos wrote: >> 2017-12-29 13:16 GMT+01:00, Cyber Sinh : >>> Sorry for the diff instead of regular git patch. Here is the patch. >> >> Only saw this today after wondering >> why nobody tried using wsl before... > > I'm

Re: [FFmpeg-devel] [PATCH V5 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread Guo, Yejun
> > From: avih [mailto:avih...@yahoo.com] > Sent: Wednesday, April 24, 2019 9:22 PM > To: FFmpeg development discussions and patches > Cc: Guo, Yejun > Subject: Re: [FFmpeg-devel] [PATCH V5 1/2] configure: sort > decoder/encoder/filter/... names in alphabet order > > >  print_in_columns() { >

Re: [FFmpeg-devel] [PATCH V5 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread avih
>  print_in_columns() { > -    cols=$(expr $ncols / 24) > -    cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t > +    # the input should not contain chars such as '*', > +    # otherwise, '*' will be expanded to be all files in the current > +    # working directory which don't begin with a

Re: [FFmpeg-devel] [PATCH V5 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread avih
>  log_file(){ > -    log BEGIN $1 > -    pr -n -t $1 >> $logfile > -    log END $1 > +    log BEGIN "$1" > +    log_file_i=1 > +    while IFS= read -r log_file_line;do > +    printf '%5s  %s\n' "${log_file_i}" "${log_file_line}" > +    log_file_i=$(($log_file_i+1)) > +    done < "$1" >>

[FFmpeg-devel] [PATCH V5 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread Guo, Yejun
This patch is based on https://trac.ffmpeg.org/ticket/5680 provided by Kylie McClain at Wed, 29 Jun 2016 16:37:20 -0400, and have some changes. contributor: Kylie McClain contributor: avih Signed-off-by: Guo, Yejun --- configure | 10 +++--- 1 file changed, 7 insertions(+), 3

[FFmpeg-devel] [PATCH V5 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread Guo, Yejun
take decoder names an example, with the default page length, shell command 'pr' needs two pages for all the decoder names. The names are firstly printed in the first page, then in the second page. So, as a whole, the names are sorted neither in column order nor in row order. It's a little

Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread Guo, Yejun
> From: avih [mailto:avih...@yahoo.com] > Sent: Wednesday, April 24, 2019 8:16 PM > To: Guo, Yejun ; FFmpeg development discussions and > patches > Subject: Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf > since busybox does not support pr > > > how about add the keyword

Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread avih
> how about add the keyword local which makes the variables not global. No. It's not portable and not standard, and will break with a lot of shells which ffmpeg currently supports. Different shells have different ways to limit a variable scope to the current function, some don't have a way at

Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread Guo, Yejun
> -Original Message- > From: Guo, Yejun > Sent: Wednesday, April 24, 2019 7:02 PM > To: Guo, Yejun > Subject: Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf > since busybox does not support pr > > > log_file(){ > > log BEGIN $1 > > -pr -n -t $1 >>

[FFmpeg-devel] [PATCH] x86/opusdsp: replace loads with shuffles

2019-04-24 Thread Lynne
Has a slight speedup. Can't be carried over to aarch64, since it has no shufps-like instruction. >From 6b09809a05c0d0bd916f7f6de5b205965bf4b69a Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 24 Apr 2019 12:19:48 +0100 Subject: [PATCH] x86/opusdsp: replace loads with shuffles Has a slight

[FFmpeg-devel] [PATCH] swscale/ppc: VSX-optimize hscale_fast

2019-04-24 Thread Lauri Kasanen
./ffmpeg -f lavfi -i yuvtestsrc=duration=1:size=1200x1440 -sws_flags fast_bilinear \ -s 2400x720 -f rawvideo -vframes 5 -pix_fmt abgr -nostats test.raw 4.27 speedup for hyscale_fast: 24796 UNITS in hyscale_fast,4096 runs, 0 skips 5797 UNITS in hyscale_fast,4096 runs,

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/arbc: Skip unchanged frames

2019-04-24 Thread Michael Niedermayer
On Sun, Apr 14, 2019 at 01:05:03PM +0200, Michael Niedermayer wrote: > Fixes: Timeout (16sec -> 5sec) > Fixes: > 14128/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5767365721063424 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 1/4] avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()

2019-04-24 Thread Michael Niedermayer
On Tue, Apr 16, 2019 at 06:31:28PM +0200, Paul B Mahol wrote: > On 4/16/19, Michael Niedermayer wrote: > > The function in case of n=0 would read more bytes than 0. > > The end pointer could be beyond the allocated space, which > > is undefined. > > > > Signed-off-by: Michael Niedermayer > > ---

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Skip stsd adjustment without chunks

2019-04-24 Thread Michael Niedermayer
On Wed, Apr 17, 2019 at 12:21:54AM +0200, Michael Niedermayer wrote: > Fixes: Assertion failure > Fixes: > clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272 > > Found-by: Clusterfuzz > Reported-by: Dan Sanders > Signed-off-by: Michael Niedermayer > --- >

Re: [FFmpeg-devel] [PATCH] avcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()

2019-04-24 Thread Michael Niedermayer
On Mon, Apr 15, 2019 at 02:40:07AM +0200, Michael Niedermayer wrote: > Fixes: Timeout (33sec -> 16 milli sec) > Fixes: > 14181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5681840708386816 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH] avcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()

2019-04-24 Thread Michael Niedermayer
On Mon, Apr 15, 2019 at 07:28:18PM +0200, Michael Niedermayer wrote: > Fixes: Timeout (158sec -> 36sec) > Fixes: > 14214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5633569034076160 > > This is untested with valid cin files as none of the files i found cover the >

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/agm: Check that there is available input in read_code()

2019-04-24 Thread Michael Niedermayer
On Sun, Apr 07, 2019 at 01:21:14AM +0200, Michael Niedermayer wrote: > Fixes: Timeout (46sec -> 7ms) > Fixes: > 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > avih > Sent: Wednesday, April 24, 2019 5:22 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort > decoder/encoder/filter/...

Re: [FFmpeg-devel] [MSVC toolchain] Patch to allow building FFmpeg with Linux bash on Windows (WSL)

2019-04-24 Thread Timo Rothenpieler
On 24/04/2019 01:38, Carl Eugen Hoyos wrote: 2017-12-29 13:16 GMT+01:00, Cyber Sinh : Sorry for the diff instead of regular git patch. Here is the patch. Only saw this today after wondering why nobody tried using wsl before... I'm using WSL since a while, but never bothered trying to setup

Re: [FFmpeg-devel] [PATCH] avcodec/zmbv: optimize motion compensation with memcpy()

2019-04-24 Thread Tomas Härdin
mån 2019-04-22 klockan 21:33 +0200 skrev Michael Niedermayer: > Fixes: Timeout (16 sec - 7 sec) > Fixes: > 14237/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5693453897302016 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCHv2 3/5] avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid

2019-04-24 Thread Tomas Härdin
mån 2019-04-22 klockan 19:15 +0200 skrev Marton Balint: > This affects the following samples: > > samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf > samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf > samples/ffmpeg-bugs/trac/ticket5016/r0.mxf >

Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread avih
> No. It expands at `echo` because you didn't quote `$inputs`. I meant the at the line `echo $inputs`. The shell expands it before it executes `echo`. `echo` (or any other command) will get the expanded value, which with `*` is all files in the current working directory which don't begin with a

Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread avih
> btw, I tried read as following, looks that read also expands '*': > print_in_columns() { > read inputs > echo $inputs > } No. It expands at `echo` because you didn't quote `$inputs`. As I commented on your v4 part 2 patch, you _must_ quote all strings unless you know for a fact that

Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread Guo, Yejun
> -Original Message- > From: Guo, Yejun > Sent: Wednesday, April 24, 2019 3:29 PM > To: Guo, Yejun > Subject: Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort > decoder/encoder/filter/... names in alphabet order > > > print_in_columns() { > > -    cols=$(expr $ncols / 24) > > -    cat

[FFmpeg-devel] [PATCH 3/3] avcodec/mediacodecdec: re-indent after previous commit

2019-04-24 Thread Matthieu Bouron
--- libavcodec/mediacodecdec_common.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index f90e2f1a23..1656cd6664 100644 --- a/libavcodec/mediacodecdec_common.c +++

[FFmpeg-devel] [PATCH 1/3] avcodec/mediacodecdec: try to receive a frame after signaling EOF to the codec

2019-04-24 Thread Matthieu Bouron
Avoids returning EAGAIN after signaling EOF to the codec in ff_mediacodec_dec_send() so we can try to receive a frame before returning in mediacodec_receive_frame(). This helps avoiding an extra round-trip between avcodec_send_frame() and avcodec_receive_frame() while draining the remaining

[FFmpeg-devel] [PATCH 2/3] avcodec/mediacodecdec: remove unneeded else block in ff_mediacodec_dec_send()

2019-04-24 Thread Matthieu Bouron
--- libavcodec/mediacodecdec_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index f7a06cdc6d..f90e2f1a23 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c

Re: [FFmpeg-devel] [PATCH V4 2/2] configure: replace 'pr' with printf since busybox does not support pr

2019-04-24 Thread avih
>  log_file(){ > log BEGIN $1 > -    pr -n -t $1 >> $logfile > +    i=1 Shell variables are global. This means that any part of the code which ends up calling `log_file` directly or through some other function (and not isolated in a subshell) will get its `i` variable clobbered by `log_file`.

Re: [FFmpeg-devel] [PATCH] libavformat: fix inputs initialization in mpegts muxer with filters

2019-04-24 Thread Andreas Håkon
‐‐‐ Original Message ‐‐‐ On Wednesday, 24 de April de 2019 0:58, Michael Niedermayer wrote: > On Tue, Apr 23, 2019 at 11:55:59PM +0200, Michael Niedermayer wrote: > > > On Tue, Apr 23, 2019 at 07:16:07AM +, Andreas Håkon wrote: > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > >

Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

2019-04-24 Thread avih
> print_in_columns() { > -    cols=$(expr $ncols / 24) > -    cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t > +    set -- $(cat | tr ' ' '\n' | sort) > +    col_width=24 > +    cols=$(($ncols / $col_width)) > +    rows=$(($(($# + $cols - 1)) / $cols)) > +    cols_seq=$(seq $cols) > +