Re: [FFmpeg-devel] [PATCH] avcodec/h264dec: remove unnecessary checks in h264_decode_frame

2018-09-06 Thread Zhao Zhili
On 2018年09月06日 17:01, Zhao Zhili wrote: These conditions are checked again in is_extra(). This patch makes no functional changes. I made a mistake. The patch makes no functional changes only after http://ffmpeg.org/pipermail/ffmpeg-devel/2018-September/233991.html --- libavcodec

Re: [FFmpeg-devel] [PATCH] avcodec/h264dec: Fix init_context memleak on error path

2018-09-10 Thread Zhao Zhili
Please review, thanks! On 2018年09月05日 16:53, Zhao Zhili wrote: --- libavcodec/h264dec.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 8d115fa..b2447e9 100644 --- a/libavcodec/h264dec.c +++ b

[FFmpeg-devel] [PATCH 1/3] avfilter/vf_sr: fix read out of bounds

2018-09-13 Thread Zhao Zhili
--- libavfilter/vf_sr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 5ad1baa..26cacde 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -239,7 +239,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame

[FFmpeg-devel] [PATCH 3/3] avfilter/dnn_backend_native: fix memleak

2018-09-13 Thread Zhao Zhili
--- libavfilter/dnn_backend_native.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c index 7ed155d..3108185 100644 --- a/libavfilter/dnn_backend_native.c +++ b/libavfilter/dnn_backend_native.c @@ -489,6 +489,7 @@ void ff_dnn_f

[FFmpeg-devel] [PATCH 2/3] avfilter/dnn_backend_native: fix invalid free

2018-09-13 Thread Zhao Zhili
--- libavfilter/dnn_backend_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c index baefea7..7ed155d 100644 --- a/libavfilter/dnn_backend_native.c +++ b/libavfilter/dnn_backend_native.c @@ -489,7 +489,7

[FFmpeg-devel] [PATCH] avfilter/vf_sr: fix read out of bounds

2018-09-13 Thread Zhao Zhili
--- libavfilter/vf_sr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 5ad1baa..bc9d186 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -239,7 +239,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame

Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_sr: fix read out of bounds

2018-09-13 Thread Zhao Zhili
Please drop this one. I have sent a version use const int array. On 2018年09月13日 15:49, Zhao Zhili wrote: --- libavfilter/vf_sr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 5ad1baa..26cacde 100644 --- a

Re: [FFmpeg-devel] [PATCH] avfilter/vf_sr: fix read out of bounds

2018-09-16 Thread Zhao Zhili
Ping for review. On 2018年09月13日 15:58, Zhao Zhili wrote: --- libavfilter/vf_sr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 5ad1baa..bc9d186 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -239,7

[FFmpeg-devel] [V2 PATCH 1/3] avfilter/vf_sr: fix read out of bounds

2018-09-18 Thread Zhao Zhili
--- libavfilter/vf_sr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 8a77a1d..c1ae6c5 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -227,7 +227,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame

[FFmpeg-devel] [V2 PATCH 2/3] avfilter/dnn_backend_native: fix invalid free

2018-09-18 Thread Zhao Zhili
--- libavfilter/dnn_backend_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c index 184fe54..7dd35d46 100644 --- a/libavfilter/dnn_backend_native.c +++ b/libavfilter/dnn_backend_native.c @@ -343,7 +343,7

[FFmpeg-devel] [V2 PATCH 3/3] avfilter/dnn_backend_native: fix memleak

2018-09-18 Thread Zhao Zhili
--- libavfilter/dnn_backend_native.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c index 7dd35d46..70d857f 100644 --- a/libavfilter/dnn_backend_native.c +++ b/libavfilter/dnn_backend_native.c @@ -343,6 +343,7 @@ void ff_dnn_

[FFmpeg-devel] [PATCH 1/2] avformat/libsrt: add LIBSRT_SETSOCKOPT/GETSOCKOPT helper

2021-02-07 Thread Zhao Zhili
To avoid duplicate between optname and optnamestr. --- libavformat/libsrt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index f73e7dbfa5..557ab9e6e3 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -272,6 +272,9 @@ static int

[FFmpeg-devel] [PATCH 2/2] avformat/libsrt: use LIBSRT_SETSOCKOPT/GETSOCKOPT helper to reduce duplication

2021-02-07 Thread Zhao Zhili
--- libavformat/libsrt.c | 66 ++-- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index 557ab9e6e3..d3c661d9d8 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -295,8 +295,8 @@ stat

[FFmpeg-devel] [PATCH 1/2] avformat/network: fix timeout inaccurate in wait_fd_timeout

2021-02-07 Thread Zhao Zhili
The wait_start was about POLLING_TIME larger which leads to timeout 100ms late than the option setting. --- libavformat/network.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavformat/network.c b/libavformat/network.c index 0f5a575f77..7a9a4be5bb 100644 ---

[FFmpeg-devel] [PATCH 2/2] avformat/libsrt: fix timeout inaccurate in wait_fd_timeout

2021-02-07 Thread Zhao Zhili
The wait_start was about POLLING_TIME larger which leads to timeout 100ms late than the option setting. --- libavformat/libsrt.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index d3c661d9d8..d08634b71a 100644 --- a/l

[FFmpeg-devel] [PATCH 1/2] lavf/network: add wait fd callback to ff_network_wait_fd_timeout

2021-02-07 Thread Zhao Zhili
--- libavformat/libamqp.c | 4 ++-- libavformat/network.c | 16 ++-- libavformat/network.h | 14 +- libavformat/tcp.c | 6 -- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/libavformat/libamqp.c b/libavformat/libamqp.c index c3b9c484ea..ca7d3ab70f

[FFmpeg-devel] [PATCH 2/2] lavf/libsrt: deduplicate libsrt_network_wait_fd_timeout

2021-02-07 Thread Zhao Zhili
--- libavformat/libsrt.c | 45 +--- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index f73e7dbfa5..67e42bacc6 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -164,12 +164,14 @@ st

[FFmpeg-devel] [PATCH v2 1/2] lavf/network: add wait fd callback to ff_network_wait_fd_timeout

2021-02-07 Thread Zhao Zhili
--- libavformat/libamqp.c | 4 ++-- libavformat/network.c | 16 ++-- libavformat/network.h | 14 +- libavformat/tcp.c | 6 -- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/libavformat/libamqp.c b/libavformat/libamqp.c index c3b9c484ea..ca7d3ab70f

[FFmpeg-devel] [PATCH v2 2/2] lavf/libsrt: deduplicate libsrt_network_wait_fd_timeout

2021-02-07 Thread Zhao Zhili
--- v2: code rebase libavformat/libsrt.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index 233e9096fa..95a20b2308 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -176,7 +176,7 @@ stati

[FFmpeg-devel] [PATCH 1/2] avformat/libsrt: fix setsockopt() typo

2021-03-15 Thread Zhao Zhili
--- libavformat/libsrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index 233e9096fa..ac865c5658 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -334,7 +334,7 @@ static int libsrt_set_options_pre(URLContext *h, in

[FFmpeg-devel] [PATCH 2/2] avformat/libsrt: fix help message

2021-03-15 Thread Zhao Zhili
SRTO_TLPKTDROP works for receiver and sender both. --- libavformat/libsrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index ac865c5658..c1e96f700e 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -122,7 +122,7 @@

[FFmpeg-devel] [PATCH v3] examples/decode_video: flush parser to fix missing frame

2021-04-01 Thread Zhao Zhili
--- check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c index 18ee90a6c0..2f779328a7 100644 --- a/doc/examples/decode_video.c +++ b/doc/ex

[FFmpeg-devel] [PATCH 2/2] avformat/isom: move some condition checks outside of loop

2020-06-26 Thread Zhao Zhili
--- libavformat/isom.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index e34d3f2195..bddcd6364f 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -430,9 +430,11 @@ int ff_mov_iso639_to_lang(const char lang[4], int mp

[FFmpeg-devel] [PATCH 1/2] avformat/isom: update mov_mdhd_language_map

2020-06-26 Thread Zhao Zhili
This is a map from 'Macintosh Language Codes' to 'ISO639-2/T'. Some items in the map are ISO639-2/B, some are ISO639-1. German: ger => deu Dutch: dut = nld Swedish: sve => swe Icelandic: ice => isl Croatian: hr => hrv Chinese: chi => zho Faroese: fo => fao Farsi/Persian: "" => fas Flemish: "" => n

Re: [FFmpeg-devel] [PATCH 1/2] avformat/isom: update mov_mdhd_language_map

2020-06-27 Thread Zhao Zhili
> On Jun 27, 2020, at 4:00 PM, Marton Balint wrote: > > > > On Sat, 27 Jun 2020, Zhao Zhili wrote: > >> This is a map from 'Macintosh Language Codes' to 'ISO639-2/T'. Some items >> in the map are ISO639-2/B, some are ISO639-1. > > I

[FFmpeg-devel] [PATCH v2 2/3] avformat/isom: update mov_mdhd_language_map

2020-06-27 Thread Zhao Zhili
This is a map from 'Macintosh Language Codes' to 'ISO639-2/T'. Some items in the map were ISO639-2/B, some were ISO639-1. --- libavformat/isom.c | 50 +++--- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libavformat/isom.c b/libavformat/iso

[FFmpeg-devel] [PATCH v2 3/3] avformat/isom: move some condition checks outside of loop

2020-06-27 Thread Zhao Zhili
--- libavformat/isom.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index e6b9506f67..978fa32170 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -541,9 +541,11 @@ int ff_mov_iso639_to_lang(const char lang[4], int mp

[FFmpeg-devel] [PATCH v2 1/3] avformat/isom: add comment to mov_mdhd_language_map

2020-06-27 Thread Zhao Zhili
--- The following code is used to do the reformat: https://gist.github.com/quink-black/8643d8fab8b3f49ff6ace6916111d2c4 libavformat/isom.c | 158 +++-- 1 file changed, 139 insertions(+), 19 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c

[FFmpeg-devel] [PATCH] avformat/mov: fix memleak

2020-06-27 Thread Zhao Zhili
Remove the check on dv_demux since dv_fctx will leak if allocate dv_demux failed. --- libavformat/mov.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index adc52de947..f179b6efdd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov

[FFmpeg-devel] [PATCH 1/2] avcodec/tests: add h265_levels to .gitignore

2019-10-15 Thread Zhao Zhili
--- libavcodec/tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/tests/.gitignore b/libavcodec/tests/.gitignore index 56ddb2cbeb..a01a700e2d 100644 --- a/libavcodec/tests/.gitignore +++ b/libavcodec/tests/.gitignore @@ -9,6 +9,7 @@ /fft-fixed32 /golomb /h264_levels

[FFmpeg-devel] [PATCH 2/2] FATE/dnn: add .gitignore

2019-10-15 Thread Zhao Zhili
--- tests/dnn/.gitignore | 4 1 file changed, 4 insertions(+) create mode 100644 tests/dnn/.gitignore diff --git a/tests/dnn/.gitignore b/tests/dnn/.gitignore new file mode 100644 index 00..5eedaaa56d --- /dev/null +++ b/tests/dnn/.gitignore @@ -0,0 +1,4 @@ +/dnn-layer-conv2d-test +

[FFmpeg-devel] [PATCH] avfilter/f_sidedata: fix Wtautological-constant-out-of-range-compare

2019-10-15 Thread Zhao Zhili
--- How about add AV_FRAME_DATA_NONE to AVFrameSideDataType? libavfilter/f_sidedata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 381da5a052..4210dcac4c 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_side

[FFmpeg-devel] [PATCH] avfilter: remove useless cast

2019-10-27 Thread Zhao Zhili
--- libavfilter/allfilters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index d136734338..6156066028 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -503,7 +503,7 @@ const AVFilter *avfilter_get_by

Re: [FFmpeg-devel] [PATCH] avfilter: remove unused private field of AVFilterLink

2019-10-28 Thread Zhao Zhili
> On Oct 28, 2019, at 9:15 PM, Moritz Barsnick wrote: > > On Mon, Oct 28, 2019 at 14:09:53 +0100, Moritz Barsnick wrote: >>> -unsigned flags; >> >> Since this is a public header, this is part of the API and cannot be >> removed without a deprecation period. > > Sorry, I missed that it say

Re: [FFmpeg-devel] [PATCH v2 1/4] frame: handle add side data with the same type

2019-11-01 Thread Zhao Zhili
> On Nov 2, 2019, at 1:16 AM, Marton Balint wrote: > > > > On Fri, 1 Nov 2019, "zhilizhao(赵志立)" wrote: > >> >> >>> On Nov 1, 2019, at 8:13 PM, Hendrik Leppkes wrote: >>> On Fri, Nov 1, 2019 at 1:03 PM wrote: &

[FFmpeg-devel] [RFC PATCH] avutil/frame: fix remove_side_data

2019-11-02 Thread Zhao Zhili
From: Zhao Zhili remove_side_data is supposed to remove a single instance by design. Since new_side_data() doesn't forbid add multiple instance of the same type, remove_side_data should deal with that. --- libavutil/frame.c | 21 + 1 file changed, 13 insertions(

[FFmpeg-devel] [RFC PATCH v2] avutil/frame: fix remove_side_data

2019-11-02 Thread Zhao Zhili
remove_side_data is supposed to remove a single instance by design. Since new_side_data() doesn't forbid add multiple instances of the same type, remove_side_data should deal with that. --- I'm afraid this patch makes it harder to enforce single entry per type. libavutil/frame.c | 2 +- libavutil

Re: [FFmpeg-devel] [PATCH] avfilter: remove useless cast

2019-11-06 Thread Zhao Zhili
>>>> On 10/29/19, Michael Niedermayer wrote: >>>>> On Mon, Oct 28, 2019 at 11:18:04AM +0800, myp...@gmail.com wrote: >>>>>> On Mon, Oct 28, 2019 at 12:03 AM Zhao Zhili >>>>>> wrote: >>>>>>> >>>&g

Re: [FFmpeg-devel] [PATCH v1 2/2] configure: Fix for the configure failed for vmaf

2019-11-13 Thread Zhao Zhili
> On Nov 13, 2019, at 9:41 PM, Zhong Li wrote: > > Just curious why this issue hasn't been found earlier. I think it's a regression of libvmaf: libvmaf: build with meson https://github.com/Netflix/vmaf/commit/82a86e040371f2ca8665d6c210e3d1d2d608a636 I have a pull request for

[FFmpeg-devel] [PATCH] avformat/mov: fix typo in help text

2019-11-15 Thread Zhao Zhili
--- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index d5c67fbc68..7553a7fdfc 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8028,7 +8028,7 @@ static const AVOption mov_options[] = { OFFSET(use_abso

[FFmpeg-devel] [PATCH] avfilter/formats: optimize ff_all_formats

2019-12-06 Thread Zhao Zhili
This is a micro-optimization. Saving almost 200 relocations makes it worth a try. --- Can lavf depends on the sequential properties of AVPixelFormat and AVSampleFormat? Or should limited to pixdesc.h/samplefmt.h API? libavfilter/formats.c | 35 +-- 1 file changed,

[FFmpeg-devel] [PATCH v2] avfilter/formats: optimize ff_all_formats

2019-12-06 Thread Zhao Zhili
This is a micro-optimization. Saving almost 200 reallocations makes it worth a try. --- fix commit message typo: relocations -> reallocations libavfilter/formats.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/libavfilter/formats.c b/lib

Re: [FFmpeg-devel] [PATCH v4] avfilter/buffersrc: deprecate sws_param option

2019-12-11 Thread Zhao Zhili
Ping for review, thanks! > On Dec 4, 2019, at 6:57 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > --- > patch v4: update doc > > doc/filters.texi| 8 > libavfilter/buffersrc.c | 14 -- > libavfilter/version.h |

Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: remove sws_param option from buffersrc

2019-12-24 Thread Zhao Zhili
Ping for review, thanks! > On Dec 4, 2019, at 9:41 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > The option is deprecated and ignored by buffersrc. > --- > fftools/ffmpeg_filter.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff -

Re: [FFmpeg-devel] [PATCH 1/8] avutil/pixdesc: add av_pix_fmt_total_count and av_sample_fmt_total_count

2020-01-02 Thread Zhao Zhili
Ping for review, thanks! I'm planning to use these API in ff_all_formats() if the patch is acceptable. > On Dec 30, 2019, at 9:54 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > --- > doc/APIchanges| 3 +++ > libavutil/pixdesc.c | 5 + &

Re: [FFmpeg-devel] [PATCH 1/8] avutil/pixdesc: add av_pix_fmt_total_count and av_sample_fmt_total_count

2020-01-02 Thread Zhao Zhili
> On Jan 3, 2020, at 12:20 AM, Nicolas George wrote: > > Zhao Zhili (12020-01-03): >> Ping for review, thanks! I'm planning to use these API in ff_all_formats() >> if the patch is acceptable. > > For ff_all_formats(), as I told you, you cannot assume t

[FFmpeg-devel] [PATCH] avfilter/af_afir: add AArch64 SIMD for fcmul_add

2020-01-18 Thread Zhao Zhili
ir_neon.S @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2020 Zhao Zhili + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version

Re: [FFmpeg-devel] [PATCH] avfilter/af_afir: add AArch64 SIMD for fcmul_add

2020-01-24 Thread Zhao Zhili
Ping for review, thanks! > On Jan 18, 2020, at 10:35 PM, Zhao Zhili wrote: > > ./ffmpeg -threads 1 -f lavfi -i anoisesrc -f lavfi -t 30 -i anoisesrc -t 600 > -lavfi afir -benchmark -f null - > > Test results on Snapdragon 845: >Without SIMD: > size=N/A ti

[FFmpeg-devel] [PATCH] avfilter/af_anlmdn: add AArch64 SIMD for compute_distance_ssd

2020-01-24 Thread Zhao Zhili
avfilter/aarch64/af_anlmdn_neon.S @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2020 Zhao Zhili + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software F

[FFmpeg-devel] [PATCH] af_volume: fix integer clip

2020-01-26 Thread Zhao Zhili
--- Or specify an upper limit on volume. What do you think? libavfilter/af_volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 213c57195a..029925cbfb 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c

Re: [FFmpeg-devel] [PATCH] af_volume: fix integer clip

2020-01-27 Thread Zhao Zhili
> On Jan 27, 2020, at 12:59 AM, Carl Eugen Hoyos wrote: > > Am So., 26. Jan. 2020 um 17:13 Uhr schrieb Zhao Zhili <mailto:quinkbl...@foxmail.com>>: >> >> --- >> Or specify an upper limit on volume. What do you think? >> >> libavfilter/af_volu

[FFmpeg-devel] [PATCH] lavc/videotoolboxenc: set DataRateLimits for hevc

2021-04-25 Thread Zhao Zhili
>From the comment it's not available on old version. It works now by testing on macOS 11.2.1. There is no document about since when. So trying to set the configuration and ignore the error for hevc. --- libavcodec/videotoolboxenc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

[FFmpeg-devel] [RFC PATCH] ffmpeg_videotoolbox: skip memory copy if hwaccel_output_format match

2021-04-26 Thread Zhao Zhili
From: zhilizhao Simple test results: Command: ./ffmpeg -y -hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld \ -i test.mp4 -an -c:v h264_videotoolbox -benchmark out.mp4 Before: frame= 1221 fps= 66 q=-0.0 Lsize=3144kB time=00:00:20.33 bitrate=1266.6kbits/s dup=4 drop=0 speed= 1

[FFmpeg-devel] [PATCH 1/2] avformat/libsrt: support bidirectional transmission

2021-05-18 Thread Zhao Zhili
--- There is no good use case yet. Patch 2/2 is only used for test. libavformat/libsrt.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index c1e96f700e..a05921d9f0 100644 --- a/libavformat/libsr

[FFmpeg-devel] [ONLY FOR TEST PATCH 2/2] avformat/rtmp: add rtmp over srt

2021-05-18 Thread Zhao Zhili
--- Test with: ./ffplay -listen 1 rtmpsrt://127.0.0.1: ./ffmpeg -re -i bunny.mp4 -c copy -f flv rtmpsrt://127.0.0.1: configure | 2 + libavformat/Makefile| 2 + libavformat/protocols.c | 2 + libavformat/rtmpproto.c | 11 ++- libavformat/rtmpsrt.c | 167

Re: [FFmpeg-devel] [ONLY FOR TEST PATCH 2/2] avformat/rtmp: add rtmp over srt

2021-05-18 Thread Zhao Zhili
r the packet loss part, "tlpktdrop" is disabled explicitly. And libsrt has a file mode. RTMP over SRT doesn't make much sense anyway. > Best regards, > Thomas. > > On 18.05.2021 18:03, Zhao Zhili wrote: >> --- >> Test with: >> ./ffplay -listen 1 r

[FFmpeg-devel] [PATCH] avformat/librist: fix logging setting

2021-05-25 Thread Zhao Zhili
The librist logging API is confusing. It looks like a per instance setting but saves a copy to global static variable quietly. So there is a potential use-after-free issue with log_cb_arg. librist took zero as invalid file descriptor at first. After the problem was fixed, now it will close the zer

[FFmpeg-devel] [PATCH] avformat/libsrt: log streamid in listener mode

2021-05-27 Thread Zhao Zhili
It's useful for test client which pass streamid to ffmpeg/ffplay. For example, use ffmpeg to test streamid support in VLC: ./ffmpeg -v info -re -i foo.mp4 -c copy -f mpegts -mode listener srt://127.0.0.1:9000 ./vlc srt://127.0.0.1:9000?streamid=foobar --- libavformat/libsrt.c | 6 ++ 1 file c

[FFmpeg-devel] [PATCH v2] avformat/libsrt: log streamid in listener mode

2021-05-31 Thread Zhao Zhili
It's useful for test client which pass streamid to ffmpeg/ffplay. For example, use ffmpeg to test streamid support in VLC: ./ffmpeg -v info -re -i foo.mp4 -c copy -f mpegts -mode listener srt://127.0.0.1:9000 ./vlc srt://127.0.0.1:9000?streamid=foobar --- libavformat/libsrt.c | 22 +--

[FFmpeg-devel] [PATCH 1/2] avformat/libsrt: send message in order

2021-06-02 Thread Zhao Zhili
From: Zhao Zhili There is no good use case for out of order delivery of data. For live streaming with TSBPD enabled by default, the receiver get data in order based on the timestamps. However, if TSBPD is disabled, the data can be delivered out of order. --- libavformat/libsrt.c | 2 +- 1 file

[FFmpeg-devel] [PATCH 2/2] avformat/libsrt: add tsbpd option

2021-06-02 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/libsrt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index edebb49edf..3a57ac53cb 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -90,6 +90,7 @@ typedef struct SRTContext

[FFmpeg-devel] [PATCH] avformat/libsrt: workaround conflict with ffmpeg cmdline option

2021-06-04 Thread Zhao Zhili
Add 'srt_streamid' option as an alias for 'streamid'. --- doc/protocols.texi | 3 +++ libavformat/libsrt.c | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 8371f83059..8b21ce046e 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -1558,

[FFmpeg-devel] [PATCH v2 1/2] avformat/libsrt: send message in order

2021-06-04 Thread Zhao Zhili
From: Zhao Zhili There is no good use case for out of order delivery of data. For live streaming with TSBPD enabled by default, the receiver get data in order based on the timestamps. However, if TSBPD is disabled, the data can be delivered out of order. --- libavformat/libsrt.c | 2 +- 1 file

[FFmpeg-devel] [PATCH v2 2/2] avformat/libsrt: add tsbpd option

2021-06-04 Thread Zhao Zhili
From: Zhao Zhili --- v2: update doc doc/protocols.texi | 5 + libavformat/libsrt.c | 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 8b21ce046e..d3095c88c6 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi

[FFmpeg-devel] [PATCH v3] avformat/libsrt: log streamid in listener mode

2021-06-09 Thread Zhao Zhili
It's useful for test client which pass streamid to ffmpeg/ffplay. For example, use ffmpeg to test streamid support in VLC: ./ffmpeg -v info -re -i foo.mp4 -c copy -f mpegts -mode listener srt://127.0.0.1:9000 ./vlc srt://127.0.0.1:9000?streamid=foobar --- v3: Don't zero out streamid. Fix streamid

[FFmpeg-devel] [PATCH 1/2] avfilter/vf_drawtext: don't assign twice consecutively to the same value

2021-06-10 Thread Zhao Zhili
--- libavfilter/vf_drawtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index c4c09894e4..f7b9c25e62 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1052,7 +1052,7 @@ static int func_strftime

[FFmpeg-devel] [PATCH 2/2] avfilter/vf_drawtext: add rtctime

2021-06-10 Thread Zhao Zhili
Compared to gmtime and localtime, rtctime has higher resolution. For example, it can be used to show the end-to-end latency. On the same host, publish a stream by: ./ffmpeg \ -re -f lavfi -i "color=color=blue:size=1280x720:rate=60" \ -c:v libx264 \ -tune zerolatency \ -vf "drawtext

[FFmpeg-devel] [PATCH] avformat/udp: fix check for pthread_cond_wait return value

2021-06-21 Thread Zhao Zhili
POSIX errno is positive. We have strict_pthread_cond_wait to handle error code during development. --- libavformat/udp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index 9b9d3de197..bbe5aecc46 100644 --- a/libavformat/udp.c +++ b/li

Re: [FFmpeg-devel] [PATCH 1/3] avformat/flv: add support for h265 streams

2021-07-02 Thread Zhao Zhili
> On Jul 2, 2021, at 3:21 AM, Martin Storsjö wrote: > > On Thu, 1 Jul 2021, Jan Ekström wrote: > >> On Thu, Jul 1, 2021 at 5:16 PM James Almer wrote: >>> >>> From: Matthieu Patou >>> >>> Suggested-by: ffm...@fb.com >>> Signed-off-by: James Almer >>> --- >> >> For the record, if Big Compa

[FFmpeg-devel] [PATCH v4] examples/decode_video: flush parser to fix missing frame

2021-07-14 Thread Zhao Zhili
--- v4: break when error occured in fread, fix infinite loop introduced by v3 v3: check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c inde

[FFmpeg-devel] [PATCH] avformat/libsrt: add mininputbw option

2021-07-14 Thread Zhao Zhili
--- libavformat/libsrt.c | 16 1 file changed, 16 insertions(+) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index 8dee6aa3f3..5113858d97 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -72,6 +72,9 @@ typedef struct SRTContext { int ipttl; in

[FFmpeg-devel] [PATCH v4] examples/decode_video: flush parser to fix missing frame

2021-07-14 Thread Zhao Zhili
--- v4: break when error occured in fread, fix infinite loop introduced by v3 v3: check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c inde

[FFmpeg-devel] [PATCH v4] examples/decode_video: flush parser to fix missing frame

2021-07-14 Thread Zhao Zhili
--- v4: break when error occured in fread, fix infinite loop introduced by v3 v3: check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c inde

[FFmpeg-devel] [PATCH v4] examples/decode_video: flush parser to fix missing frame

2021-07-14 Thread Zhao Zhili
--- v4: break when error occured in fread, fix infinite loop introduced by v3 v3: check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c inde

[FFmpeg-devel] [PATCH v2] avformat/libsrt: add mininputbw option

2021-07-14 Thread Zhao Zhili
--- v2: add doc It's useful when tlpktdrop=0&maxbw=0 and network bandwidth is smaller than input stream rate. Without this option, the estimated input rate can drop to near zero. https://github.com/Haivision/srt/issues/2057 doc/protocols.texi | 4 libavformat/libsrt.c | 16 ++

Re: [FFmpeg-devel] [PATCH] ffmpeg: add option readrate

2021-07-17 Thread Zhao Zhili
> On Jul 17, 2021, at 12:07 PM, Gyan Doshi wrote: > > On 2021-07-17 04:50, ffmpegandmahanstreamer@e.email wrote: >> Put the fact that -re is equivalent to -readrate 1 in the deprecated message >> so people know what to switch to. > > It's already in the docs for -re as well as the ffmpeg -h

[FFmpeg-devel] [PATCH] avformat/http: use assignment of structure instead of memcpy

2017-10-17 Thread Zhao Zhili
--- libavformat/http.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 668cd51986..63dfd51117 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -173,12 +173,10 @@ static int http_read_header(URLContext *h, int

[FFmpeg-devel] [PATCH] avformat/tests/gitignore: add fifo_muxer entry

2016-10-15 Thread Zhao Zhili
From a3ee9afc37331315e4ec57f1ebf881779b62bf60 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Sun, 16 Oct 2016 00:09:25 +0800 Subject: [PATCH] avformat/tests/gitignore: add fifo_muxer entry --- libavformat/tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/tests

[FFmpeg-devel] [PATCH] avutil/mem: fix outdated comment

2016-07-18 Thread Zhao Zhili
--- libavutil/mem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavutil/mem.h b/libavutil/mem.h index d25b322..9dd9099 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -99,14 +99,14 @@ av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t

[FFmpeg-devel] [PATCH] avutil/mem: fix wrong comment

2016-07-18 Thread Zhao Zhili
--- libavutil/mem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/mem.h b/libavutil/mem.h index 9dd9099..ae0fae1 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -339,8 +339,8 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, static

[FFmpeg-devel] [PATCH] avutil/mem: fix memleak

2016-07-18 Thread Zhao Zhili
The original code assumes av_realloc() will free ptr if size is zero. The assumes is incorrect now. --- libavutil/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/mem.c b/libavutil/mem.c index 8dfaad8..809ec01 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@

[FFmpeg-devel] [PATCH] ffprobe: fix use of uninitialized variable

2017-08-06 Thread Zhao Zhili
--- ffprobe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffprobe.c b/ffprobe.c index f22c4f57ad..ac9ff051fa 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -3328,6 +3328,7 @@ static int parse_read_interval(const char *interval_spec, } interval->end =

Re: [FFmpeg-devel] [PATCH] ffprobe: fix use of uninitialized variable

2017-08-08 Thread Zhao Zhili
On Wed, Aug 9, 2017 at 1:23 AM, Michael Niedermayer wrote: > On Sun, Aug 06, 2017 at 03:39:07PM +0800, Zhao Zhili wrote: > > --- > > ffprobe.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/ffprobe.c b/ffprobe.c > &

Re: [FFmpeg-devel] [PATCH] ffprobe: fix use of uninitialized variable

2017-08-16 Thread Zhao Zhili
Ping. On Wed, Aug 9, 2017 at 1:05 PM, Zhao Zhili wrote: > > > On Wed, Aug 9, 2017 at 1:23 AM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: > >> On Sun, Aug 06, 2017 at 03:39:07PM +0800, Zhao Zhili wrote: >> > --- >> > ffprobe.c | 4

Re: [FFmpeg-devel] [PATCH] ffprobe: fix use of uninitialized variable

2017-08-16 Thread Zhao Zhili
On Thu, Aug 17, 2017 at 3:24 AM, Michael Niedermayer wrote: > On Wed, Aug 09, 2017 at 01:05:11PM +0800, Zhao Zhili wrote: > > On Wed, Aug 9, 2017 at 1:23 AM, Michael Niedermayer > > > wrote: > > > > > On Sun, Aug 06, 2017 at 03:39:07PM +0800, Zhao Zhili wrote: &

Re: [FFmpeg-devel] [PATCH] tests: Remove fate-libx265-hdr10

2024-03-25 Thread Zhao Zhili
Ping. Is it OK to apply the patch as it is? > On Mar 23, 2024, at 06:36, Jan Ekström wrote: > > On Fri, Mar 22, 2024 at 10:18 PM Anton Khirnov wrote: >> >> Quoting Zhao Zhili (2024-03-22 13:43:43) >>> From: Zhao Zhili >>> >>> The test depen

[FFmpeg-devel] [PATCH] avcodec/h264_parse: Fix error code in decode_extradata

2024-03-25 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/h264_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c index 3378650fd5..09d3b9dc05 100644 --- a/libavcodec/h264_parse.c +++ b/libavcodec/h264_parse.c @@ -468,7 +468,7 @@ int

Re: [FFmpeg-devel] [PATCH v2] libavformat/libsrt.c: Add statistics option to output SRT statistics with av_log()

2024-04-02 Thread Zhao Zhili
> 在 2024年3月19日,下午7:51,Ryan McCartney 写道: > > --- > libavformat/libsrt.c | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c > index a7aafea536..80d52b1737 100644 > --- a/libavformat/libsrt.c > +++ b/libavfor

Re: [FFmpeg-devel] [PATCH] lavf/matroskaenc: sort options by name

2024-04-07 Thread Zhao Zhili
> On Apr 7, 2024, at 14:16, Anton Khirnov wrote: > > Quoting Andreas Rheinhardt (2024-04-06 13:25:49) >> See https://ffmpeg.org/pipermail/ffmpeg-devel/2024-February/320849.html >> Additionally I do not agree that sorting options by name is the best >> way; it should be sorted by what are (belie

[FFmpeg-devel] [PATCH] avformat/tls_mbedtls: Pass FLAG_NONBLOCK to underlying transport

2024-04-08 Thread Zhao Zhili
From: Zhao Zhili This fix rtmps failure since rtmps requires nonblocking read. Signed-off-by: Zhao Zhili --- libavformat/tls_mbedtls.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 8503523b6d..f51cf43b1c 100644 --- a

Re: [FFmpeg-devel] [PATCH] avformat/tls_mbedtls: Pass FLAG_NONBLOCK to underlying transport

2024-04-08 Thread Zhao Zhili
> On Apr 8, 2024, at 21:32, Dennis Mungai wrote: > > On Mon, 8 Apr 2024 at 16:26, Zhao Zhili wrote: > >> From: Zhao Zhili >> >> This fix rtmps failure since rtmps requires nonblocking read. >> >> Signed-off-by: Zhao Zhili >> --- >> l

[FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0

2024-04-11 Thread Zhao Zhili
We don’t have a minimum required version of Android in FFmpeg. libavdevice/android_camera requires Android 7, Java MediaCodec requires Android 4.1, and NDK MediaCodec requires Android 5.0. Without an explicit version, it’s unclear for development and test. Android 5.0 is released in 2014, is it O

Re: [FFmpeg-devel] [PATCH] avformat/tls_mbedtls: Pass FLAG_NONBLOCK to underlying transport

2024-04-11 Thread Zhao Zhili
> On Apr 8, 2024, at 21:26, Zhao Zhili wrote: > > From: Zhao Zhili > > This fix rtmps failure since rtmps requires nonblocking read. > > Signed-off-by: Zhao Zhili > --- > libavformat/tls_mbedtls.c | 4 > 1 file changed, 4 insertions(+) > > diff

Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0

2024-04-11 Thread Zhao Zhili
> On Apr 11, 2024, at 21:17, Tomas Härdin wrote: > > tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: >> We don’t have a minimum required version of Android in FFmpeg. >> libavdevice/android_camera requires Android 7, Java MediaCodec >> requires Android 4.1,

Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0

2024-04-11 Thread Zhao Zhili
> 在 2024年4月11日,下午9:57,Zhao Zhili 写道: > >  >> >> On Apr 11, 2024, at 21:17, Tomas Härdin wrote: >> >> tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: >>> We don’t have a minimum required version of Android in FFmpeg. >>> libavdevice

Re: [FFmpeg-devel] [PATCH v1] libavfilter/af_channelsplit.c:fix memory leak

2024-04-12 Thread Zhao Zhili
> On Apr 12, 2024, at 17:19, LuMingYin wrote: > > Signed-off-by: LuMingYin > --- > libavfilter/af_channelsplit.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c > index d18d91dcb6..2cfac19cd3 100644 > --

Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0

2024-04-12 Thread Zhao Zhili
> On Apr 12, 2024, at 18:50, Tomas Härdin wrote: > > tor 2024-04-11 klockan 21:57 +0800 skrev Zhao Zhili: >> >> >>> On Apr 11, 2024, at 21:17, Tomas Härdin wrote: >>> >>> tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: >>>> W

Re: [FFmpeg-devel] [PATCH v1] libavfilter/af_channelsplit.c:fix memory leak

2024-04-14 Thread Zhao Zhili
> On Apr 12, 2024, at 17:49, Zhao Zhili wrote: > > >> On Apr 12, 2024, at 17:19, LuMingYin wrote: >> >> Signed-off-by: LuMingYin >> --- >> libavfilter/af_channelsplit.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >&g

[FFmpeg-devel] [PATCH 3/8] avcodec/mediacodec_wrapper: Fix unused variable warning

2024-04-16 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index a9c8b522e0..96c88a 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -365,6

[FFmpeg-devel] [PATCH 4/8] avcodec/mediacodecenc: Fix return empty packet when bsf is used

2024-04-16 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index b59de75b9b..e562181120 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec

<    1   2   3   4   5   6   7   8   9   10   >