[FFmpeg-devel] [PATCH] avfilter/vf_subtitles: add wrap_unicode option

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili So CJK can be wrapped automatically. Signed-off-by: Zhao Zhili --- libavfilter/version.h | 2 +- libavfilter/vf_subtitles.c | 13 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libavfilter/version.h b/libavfilter/version.h index ba8a6fdab2

[FFmpeg-devel] [PATCH 1/5] avcodec/h264_mp4toannexb_bsf: refactor start_code_size handling

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili start_code_size depends on whether PS comes from out-of-band or in-band. Make the code more readable. --- libavcodec/h264_mp4toannexb_bsf.c | 34 --- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b

[FFmpeg-devel] [PATCH 4/5] avcodec/h264_mp4toannexb_bsf: process new extradata

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili For fate-h264_mp4toannexb_ticket5927 and fate-h264_mp4toannexb_ticket5927_2, they work by accident previously. The sample file has two 'avc1' entries, and video samples use the second one. It means packets should be decoded with new extradata in side data. Before

[FFmpeg-devel] [PATCH 2/5] avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili It's a fixed value. There is no use case to change that. --- libavcodec/h264_mp4toannexb_bsf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 7dce1ae9b6..846671abb6 1

[FFmpeg-devel] [PATCH 3/5] avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili If there is a single group of SPS/PPS before an IDR frame, but no SPS/PPS after that, we will miss the chance to reset idr_sps_seen/idr_pps_seen. No SPS/PPS are inserted afterwards. This patch saves in-band SPS/PPS and insert them before IDR frames when necessary. --- sample

[FFmpeg-devel] [PATCH 5/5] fate/h264: move mp4toannexb_ticket5927 test to fate-h264

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili --- tests/fate/ffmpeg.mak | 6 +- tests/fate/h264.mak | 6 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 0f33c2a0ed..1ef2df7697 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak

[FFmpeg-devel] [PATCH] avformat/tests/imf: fix memleak

2023-05-19 Thread Zhao Zhili
From: Zhao Zhili It breaks fate test with asan. Signed-off-by: Zhao Zhili --- libavformat/tests/imf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index cfd84fb8c8..ee2ca375bf 100644 --- a/libavformat/tests/imf.c +++ b/libavformat

Re: [FFmpeg-devel] [PATCH] avfilter/vf_subtitles: add wrap_unicode option

2023-05-19 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Lance Wang > Sent: 2023年5月19日 22:15 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_subtitles: add wrap_unicode > option > > On Fri, May 19, 2023 at 3:59 PM Zhao Zhili wrote: &g

Re: [FFmpeg-devel] 回复: [PATCH] avcodec/videotoolboxenc: add low-latency encoding

2023-05-19 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Rick Kern > Sent: 2023年5月19日 21:37 > To: FFmpeg development discussions and patches > Cc: zhilizhao(赵志立) > Subject: Re: [FFmpeg-devel] 回复: [PATCH] avcodec/videotoolboxenc: add > low-latency encoding > > On Fri, May 19, 2023 at 1:56 AM 徐福隆 <839789...@qq.com> w

Re: [FFmpeg-devel] 回复: [PATCH] avcodec/videotoolboxenc: add low-latency encoding

2023-05-20 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Rick Kern > Sent: 2023年5月20日 23:01 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] 回复: [PATCH] avcodec/videotoolboxenc: add > low-latency encoding > > On Fri, May 19, 2023 at 2:06 PM Zhao Zhili wrote: >

[FFmpeg-devel] [PATCH v3 1/2] avcodec/vvc: Fix output and unref a frame which isn't decoding yet

2024-09-14 Thread Zhao Zhili
From: Zhao Zhili ff_vvc_output_frame is called before actually decoding. It's possible for ff_vvc_output_frame to select current frame to output. If current frame is nonref frame, it will be released by ff_vvc_unref_frame. Fix this by always marking the current frame

[FFmpeg-devel] [PATCH v3 2/2] fate/vvc: Add a sample which lose frames before b02b411

2024-09-14 Thread Zhao Zhili
From: Zhao Zhili --- sample: 8054b4b8e62c0171476b40206d044590 Hierarchical.bit https://drive.google.com/file/d/1U5WGWeSsMFiEkhsl_vL4NiMma-LLh02t/view?usp=sharing tests/fate/vvc.mak | 1 + tests/ref/fate/vvc-conformance-Hierarchical | 35 + 2 files

Re: [FFmpeg-devel] [PATCH v2] avcodec/vvc: Fix output and unref a frame which isn't decoding yet

2024-09-14 Thread Zhao Zhili
> On Sep 15, 2024, at 08:46, Nuo Mi wrote: > > Hi Zhili > Thank you for the patch. > > > On Fri, Sep 13, 2024 at 2:35 PM Zhao Zhili <mailto:quinkbl...@foxmail.com>> wrote: > >> From: Zhao Zhili >> >> ff_vvc_output_frame is ca

[FFmpeg-devel] [PATCH] avcodec/mediacodecdec_common: Workaround MTK broken crop implementation

2024-10-11 Thread Zhao Zhili
From: Zhao Zhili MediaTek SOC return broken crop info, e.g., width: int32(3840) height: int32(2160) crop: Rect(0, 0, 318, 238) It will notify the right crop info with infoOutputFormatChanged, but too late. --- libavcodec/mediacodecdec_common.c | 3 ++- 1 file changed, 2 insertions(+), 1

[FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Extract configOBUs from AV1CodecConfigurationRecord

2024-10-04 Thread Zhao Zhili
From: Zhao Zhili MediaCodec can generate AV1CodecConfigurationRecord, which shouldn't be put into packet->data. Skip four bytes and extract configOBUs if it exist. --- I did some test on Pixel 8 Pro. AV1 hardware encoding works with a lot of bugs: 1. It's broken for width non-align

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Extract configOBUs from AV1CodecConfigurationRecord

2024-10-04 Thread Zhao Zhili
> On Oct 5, 2024, at 02:15, James Almer wrote: > > On 10/4/2024 2:54 PM, Zhao Zhili wrote: >> From: Zhao Zhili >> MediaCodec can generate AV1CodecConfigurationRecord, which shouldn't >> be put into packet->data. Skip four bytes and extract configOBUs &

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Extract configOBUs from AV1CodecConfigurationRecord

2024-10-04 Thread Zhao Zhili
> On Oct 5, 2024, at 05:01, Martin Storsjö wrote: > > On Sat, 5 Oct 2024, Zhao Zhili wrote: > >> From: Zhao Zhili >> >> MediaCodec can generate AV1CodecConfigurationRecord, which shouldn't >> be put into packet->data. Skip four bytes and extrac

Re: [FFmpeg-devel] [PATCH v4] fate/vvc: Add a sample which lose frames before 5c66a3

2024-10-21 Thread Zhao Zhili
> On Sep 18, 2024, at 14:56, Zhao Zhili wrote: > > From: Zhao Zhili > > --- > sample: > 8054b4b8e62c0171476b40206d044590 Hierarchical.bit > https://drive.google.com/file/d/1U5WGWeSsMFiEkhsl_vL4NiMma-LLh02t/view?usp=sharing > > Put Hierarchical.bit und

Re: [FFmpeg-devel] [PATCH] fftools/ffplay: use swapchain_colorspace_hint to get better HDR support

2024-10-21 Thread Zhao Zhili
> On Sep 25, 2024, at 22:45, Zhao Zhili wrote: > > From: Zhao Zhili > > For example, the default surface configuration on macOS is: > VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_PASS_THROUGH_EXT > > With HDR10 content and swapchain_colorspace_hint, the

[FFmpeg-devel] [PATCH] tests/fate-run: Fix pixdesc failure

2024-10-21 Thread Zhao Zhili
From: Zhao Zhili -u and -q doesn't work together for diff on macOS. --- tests/fate-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f8d67de25a..c371bd1c3c 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -

Re: [FFmpeg-devel] [PATCH] avcodec/decode: clean-up if get_hw_frames_parameters fails

2024-10-30 Thread Zhao Zhili
> On Oct 30, 2024, at 21:19, Thomas Guillem via ffmpeg-devel > wrote: > > Happy monthly anniversary to my not very interesting patch. > > FYI, OpenSuse applied it for their ffmpeg build... LGTM and applied, thanks. > > On Mon, Oct 14, 2024, at 10:54, Thomas Guillem via ffmpeg-devel wrote:

[FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-10-30 Thread Zhao Zhili
From: Zhao Zhili The codec wants to know whether the usecase is realtime playback or full-speed transcoding, or playback at a higher speed. The codec runs faster when operating_rate higher than framerate. --- libavcodec/mediacodecdec.c | 8 1 file changed, 8 insertions(+) diff --git a

[FFmpeg-devel] [PATCH] x86/vvc: Fix build error for arch x86_32

2024-11-01 Thread Zhao Zhili
From: Zhao Zhili There were static functions which built for x86_32, but the simd functions they reference only available for x86_64. --- libavcodec/x86/vvc/vvcdsp_init.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c

Re: [FFmpeg-devel] [FFmpeg-cvslog] fate/vvc: Add a sample which lose frames before 5c66a3

2024-11-01 Thread Zhao Zhili
 > 在 2024年11月2日,上午7:01,Michael Niedermayer 写道: > > On Fri, Nov 01, 2024 at 09:11:47AM +0000, Zhao Zhili wrote: >> ffmpeg | branch: master | Zhao Zhili | Wed Sep 18 >> 14:56:22 2024 +0800| [1864025458021a2d2c542f56e268ee1106f84460] | committer: >> Zhao Zhili >

Re: [FFmpeg-devel] [PATCH] avformat/gifdec: There is an overflow int64_t receiving with int

2024-11-04 Thread Zhao Zhili
> On Nov 5, 2024, at 08:36, wzq via ffmpeg-devel > wrote: > > From: wzqzero <1918583...@qq.com> > > When converting a two-minute 3840 x 2160 video to a GIF file, > the viewing duration is shorter than the source duration when you use ffmpeg > -i, > which is due to data overflow, > which caus

Re: [FFmpeg-devel] [RFC] libavutil split out

2024-10-30 Thread Zhao Zhili
> On Oct 31, 2024, at 08:13, Timo Rothenpieler wrote: > > On 31.10.2024 01:08, Michael Niedermayer wrote: >> Hi >> Theres a problem with libavutil, or maybe more than one >> a library implementing a codec that tries do use libavutil and itself is >> used by libavcodec. Creates a (build) dependa

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext: Don't assume frames_uninit is reentrant

2024-10-28 Thread Zhao Zhili
> On Oct 24, 2024, at 02:14, 徐浩宇 wrote: > > I have discovered that the vulnerability addressed by commit 3bb00c0 > > also > affects the release/6.1 branch,but the fix has not yet been applied. Given > that there

Re: [FFmpeg-devel] Patch for libx265 memory leak

2024-11-11 Thread Zhao Zhili
Hi Chen, > On Nov 12, 2024, at 01:09, chen wrote: > > From 4067c58be8e719a55d89e68aaa9d3db19b88b32f Mon Sep 17 00:00:00 2001 > > From: Chen > > Date: Fri, 8 Nov 2024 22:21:19 -0800 > > Subject: [PATCH] Fix memory leak in the libx265 > > > > > --- > > libavcodec/libx265.c | 4 +++- > > 1

[FFmpeg-devel] [PATCH 1/3] configure: Add wasm as a fake arch

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili And add wasm simd128 flag, so we can add simd128 optimizations. It can be enabled by put -msimd128 to extra cflags. There is no runtime detection on simd128 support yet. I think that needs to be done with JavaScript. --- Makefile | 3 ++- configure

[FFmpeg-devel] [PATCH 2/3] tests/checkasm: Add partial support for wasm

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili WASI mssing signal and siglongjmp support. This patch workaround build error and add simd128 flag. Please note that many tests use large array on stack, so you need to increase the stack size when build checkasm, e.g., --extra-ldflags='-Wl,-z,stack-size=10485760'

[FFmpeg-devel] [PATCH 3/3] avcodec/hevc: Add wasm simd128 idct

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili We don't use intrinsics normally for performance reasons. However, WASM isn't machine instruction. I suspect that in this scenario, handwritten assembly may not bring much performance compared with intrinsics. And I don't want to dig into the WASM ABI. S

Re: [FFmpeg-devel] [PATCH] fftools/ffplay: fix crash when vk renderer is null

2024-10-31 Thread Zhao Zhili
> On Oct 31, 2024, at 21:40, Leandro Santiago wrote: > > When vulkan rendering is requested by the user and fails, ffplay should > exit graciously instead of crash due to a null pointer deref. > > Signed-off-by: Leandro Santiago > --- > fftools/ffplay.c | 5 + > 1 file changed, 5 insertio

[FFmpeg-devel] [PATCH 1/2] avformat/internal: Add ff_get_frame_filename

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili It's similar to av_get_frame_filename2 but with int64_t number support. Make av_get_frame_filename* a wrapper over ff_get_frame_filename. --- libavformat/internal.h | 16 libavformat/utils.c| 11 --- 2 files changed, 24 insertions(+), 3 dele

Re: [FFmpeg-devel] [PATCH v3 2/2] avformat: deprecated av_get_frame_filename() and av_get_frame_filename2()

2024-09-23 Thread Zhao Zhili
> On Sep 23, 2024, at 18:18, Filip Mašić wrote: > > --- > doc/APIchanges | 3 ++- > libavfilter/vf_signature.c | 4 ++-- > libavformat/avformat.h | 22 ++ > libavformat/img2dec.c | 10 +- > libavformat/segment.c | 4 ++-- > libavformat/ut

[FFmpeg-devel] [PATCH v2 1/3] aarch64/vvc: Add w_avg

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili w_avg_8_2x2_c: 0.0 ( 0.00x) w_avg_8_2x2_neon:0.0 ( 0.00x) w_avg_8_4x4_c: 0.2 ( 1.00x) w_avg_8_4x4_neon:0.0 ( 0.00x

[FFmpeg-devel] [PATCH v2 3/3] aarch64/vvc: Add dmvr

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili dmvr_8_12x20_c: 2.2 ( 1.00x) dmvr_8_12x20_neon: 0.5 ( 4.50x) dmvr_8_20x12_c: 2.0 ( 1.00x) dmvr_8_20x12_neon: 0.2 ( 8.00x

[FFmpeg-devel] [PATCH v2 2/3] aarch64/vvc: Add dmvr_hv

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili dmvr_hv_8_12x20_c: 8.0 ( 1.00x) dmvr_hv_8_12x20_neon:1.2 ( 6.62x) dmvr_hv_8_20x12_c: 8.0 ( 1.00x) dmvr_hv_8_20x12_neon:0.9 ( 8.37x

Re: [FFmpeg-devel] [PATCH] avcodec/videotoolbox: add AV1 hardware acceleration

2024-09-23 Thread Zhao Zhili
> On Sep 21, 2024, at 05:39, Martin Storsjö wrote: > > From: Jan Ekström > > Co-authored-by: Ruslan Chernenko > Co-authored-by: Martin Storsjö > --- > This is a touched up version of Jan and Ruslan's patches for > AV1 hwaccel via videotoolbox; I tried to polish the code a little > by not ov

[FFmpeg-devel] [PATCH v2 1/2] avformat/internal: Add ff_get_frame_filename

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili It's similar to av_get_frame_filename2 but with int64_t number support. Make av_get_frame_filename* a wrapper over ff_get_frame_filename. Co-authored-by: Filip Mašić --- libavformat/internal.h | 16 libavformat/utils.c| 11 --- 2 files change

[FFmpeg-devel] [PATCH v2 2/2] avformat/img2enc: Fix integer truncation when frame_pts is enabled

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/img2enc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 526a11e5ee..41638d92b8 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -160,13 +160,13 @@ static int

Re: [FFmpeg-devel] [PATCH 22/23] tests/fate/hevc: add a test for switching between single and multi-view

2024-09-23 Thread Zhao Zhili
> On Sep 14, 2024, at 18:45, Anton Khirnov wrote: > > --- > tests/fate/hevc.mak | 10 ++ > tests/ref/fate/hevc-mv-switch | 172 ++ > 2 files changed, 182 insertions(+) > create mode 100644 tests/ref/fate/hevc-mv-switch Fate break on macOS. https://git

Re: [FFmpeg-devel] [PATCH] avcodec/videotoolbox: add AV1 hardware acceleration

2024-09-23 Thread Zhao Zhili
> On Sep 24, 2024, at 01:24, Cameron Gutman wrote: > > On Mon, Sep 23, 2024 at 6:07 AM Zhao Zhili wrote: >> >> >> >>> On Sep 21, 2024, at 05:39, Martin Storsjö wrote: >>> >>> From: Jan Ekström >>> >>&

[FFmpeg-devel] [PATCH v4] avcodec/vvc: Don't use large array on stack

2024-09-21 Thread Zhao Zhili
From: Zhao Zhili tmp_array in dmvr_hv takes 33024 bytes on stack, which can be dangerous. --- v4: 1. Add DMVR_FILTER2 macro 2. Process first line out of loop to remove condition check. libavcodec/vvc/inter_template.c | 33 ++--- 1 file changed, 18 insertions

[FFmpeg-devel] [PATCH 2/4] aarch64/vvc: Add apply_bdof

2024-09-21 Thread Zhao Zhili
From: Zhao Zhili apply_bdof_8_8x16_c:18.7 ( 1.00x) apply_bdof_8_8x16_neon: 9.7 ( 1.93x) apply_bdof_8_16x8_c:20.0 ( 1.00x) apply_bdof_8_16x8_neon: 9.5 ( 2.11x

[FFmpeg-devel] [PATCH 3/4] aarch64/vvc: Add dmvr_hv

2024-09-21 Thread Zhao Zhili
From: Zhao Zhili dmvr_hv_8_12x20_c: 8.0 ( 1.00x) dmvr_hv_8_12x20_neon:1.2 ( 6.62x) dmvr_hv_8_20x12_c: 8.0 ( 1.00x) dmvr_hv_8_20x12_neon:0.9 ( 8.37x

[FFmpeg-devel] [PATCH 1/4] aarch64/vvc: Add w_avg

2024-09-21 Thread Zhao Zhili
From: Zhao Zhili w_avg_8_2x2_c: 0.0 ( 0.00x) w_avg_8_2x2_neon:0.0 ( 0.00x) w_avg_8_4x4_c: 0.2 ( 1.00x) w_avg_8_4x4_neon:0.0 ( 0.00x

[FFmpeg-devel] [PATCH 4/4] aarch64/vvc: Add dmvr

2024-09-21 Thread Zhao Zhili
From: Zhao Zhili dmvr_8_12x20_c: 2.2 ( 1.00x) dmvr_8_12x20_neon: 0.5 ( 4.50x) dmvr_8_20x12_c: 2.0 ( 1.00x) dmvr_8_20x12_neon: 0.2 ( 8.00x

Re: [FFmpeg-devel] [PATCH] avformat/libsrt: Adding support for multiple clients as a server

2024-09-23 Thread Zhao Zhili
> On Sep 19, 2024, at 21:46, nicolas.d...@gmail.com wrote: > > From: Nicolas Jorge Dato > > When in listener mode and writing, now libsrt supports multiple clients > configured with the max_clients parameter. > > When max_clients=1 (default), it behaves as before. > When max_clientes > 1, aft

Re: [FFmpeg-devel] [PATCH 2/4] aarch64/vvc: Add apply_bdof

2024-09-23 Thread Zhao Zhili
Drop patch 2/4 for now. It needs more polish. See patch v2 https://ffmpeg.org/pipermail/ffmpeg-devel/2024-September/333800.html > On Sep 22, 2024, at 01:41, Zhao Zhili wrote: > > From: Zhao Zhili > > apply_bdof_8_8x16_c:

[FFmpeg-devel] [PATCH v2 1/2] avformat/internal: Add ff_get_frame_filename

2024-09-23 Thread Zhao Zhili
From: Zhao Zhili It's similar to av_get_frame_filename2 but with int64_t number support. Make av_get_frame_filename* a wrapper over ff_get_frame_filename. Co-authored-by: Filip Mašić --- libavformat/internal.h | 16 libavformat/utils.c| 11 --- 2 files change

Re: [FFmpeg-devel] [PATCH v3 2/2] avformat: deprecated av_get_frame_filename() and av_get_frame_filename2()

2024-09-23 Thread Zhao Zhili
ave added it to patch v2 1/2 and add co-authored-by you. By the way, please don’t top-post. 0001-avformat-internal-Add-ff_get_frame_filename.patch Description: Binary data 0002-avformat-img2enc-Fix-integer-truncation-when-frame_p.patch Description: Binary data > > Thanks for the help with

Re: [FFmpeg-devel] [PATCH v2] swscale/aarch64: Fix rgb24toyv12 only works with aligned width

2024-09-23 Thread Zhao Zhili
> On Sep 18, 2024, at 21:11, Zhao Zhili wrote: > > From: Zhao Zhili > > Since c0666d8b, rgb24toyv12 is broken for width non-aligned to 16. > Add a simple wrapper to handle the non-aligned part. > > Signed-off-by: Zhao Zhili > Co-authored-by: johzzy >

Re: [FFmpeg-devel] [PATCH 1/2] avutils/executor: remove unused ready callback

2024-09-24 Thread Zhao Zhili
> On Sep 24, 2024, at 22:16, Nuo Mi wrote: > > Due to the nature of multithreading, using a "ready check" mechanism may > introduce a deadlock. For example: > > Suppose all tasks have been submitted to the executor, and the last thread > checks the entire list and finds > no ready tasks. It

[FFmpeg-devel] [PATCH v3 1/3] aarch64/vvc: Add w_avg

2024-09-26 Thread Zhao Zhili
From: Zhao Zhili w_avg_8_2x2_c: 0.0 ( 0.00x) w_avg_8_2x2_neon:0.0 ( 0.00x) w_avg_8_4x4_c: 0.2 ( 1.00x) w_avg_8_4x4_neon:0.0 ( 0.00x

[FFmpeg-devel] [PATCH v3 3/3] aarch64/vvc: Add dmvr

2024-09-26 Thread Zhao Zhili
From: Zhao Zhili dmvr_8_12x20_c: 1.5 ( 1.00x) dmvr_8_12x20_neon: 0.2 ( 6.56x) dmvr_8_20x12_c: 1.0 ( 1.00x) dmvr_8_20x12_neon: 0.2 ( 4.33x

[FFmpeg-devel] [PATCH v3 1/3] aarch64/vvc: Add w_avg

2024-09-26 Thread Zhao Zhili
From: Zhao Zhili w_avg_8_2x2_c: 0.0 ( 0.00x) w_avg_8_2x2_neon:0.0 ( 0.00x) w_avg_8_4x4_c: 0.2 ( 1.00x) w_avg_8_4x4_neon:0.0 ( 0.00x

[FFmpeg-devel] [PATCH v3 0/3] aarch64/vvc add w_avg and dmvr/dmvr_hv

2024-09-26 Thread Zhao Zhili
From: Zhao Zhili v3: 1. Remove some const modifier in function prototypes 2. Use 'uaddl' to replace 'uxtl then add' in patch 3/3 Zhao Zhili (3): aarch64/vvc: Add w_avg aarch64/vvc: Add dmvr_hv aarch64/vvc: Add dmvr libavcodec/aarch64/vvc/dsp_init.c | 50 +++ li

[FFmpeg-devel] [PATCH v3 2/3] aarch64/vvc: Add dmvr_hv

2024-09-26 Thread Zhao Zhili
From: Zhao Zhili dmvr_hv_8_12x20_c: 8.0 ( 1.00x) dmvr_hv_8_12x20_neon:1.2 ( 6.62x) dmvr_hv_8_20x12_c: 8.0 ( 1.00x) dmvr_hv_8_20x12_neon:0.9 ( 8.37x

Re: [FFmpeg-devel] [PATCH v2 1/3] aarch64/vvc: Add w_avg

2024-09-26 Thread Zhao Zhili
> On Sep 26, 2024, at 19:25, Martin Storsjö wrote: > > On Mon, 23 Sep 2024, Zhao Zhili wrote: > >> From: Zhao Zhili >> >> w_avg_8_2x2_c: 0.0 ( 0.00x) >> w_avg_8_2x2_neon:

Re: [FFmpeg-devel] [PATCH v2 1/3] aarch64/vvc: Add w_avg

2024-09-26 Thread Zhao Zhili
> On Sep 26, 2024, at 20:17, Martin Storsjö wrote: > > On Thu, 26 Sep 2024, Zhao Zhili wrote: > >> --- a/libavcodec/aarch64/vvc/dsp_init.c >> +++ b/libavcodec/aarch64/vvc/dsp_init.c >> @@ -52,6 +52,37 @@ void ff_vvc_avg_12_neon(uint8_t *dst

[FFmpeg-devel] [PATCH v4 0/3] aarch64/vvc add w_avg and dmvr/dmvr_hv

2024-09-29 Thread Zhao Zhili
From: Zhao Zhili v4: 1. Rewords on Apple ABI 2. Remove const on some local variables v3: 1. Remove some const modifier in function prototypes 2. Use 'uaddl' to replace 'uxtl then add' in patch 3/3 Zhao Zhili (3): aarch64/vvc: Add w_avg aarch64/vvc: Add dmvr_hv a

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/img2enc: Fix integer truncation when frame_pts is enabled

2024-09-29 Thread Zhao Zhili
> On Sep 29, 2024, at 08:05, Michael Niedermayer wrote: > > On Tue, Sep 24, 2024 at 12:16:13AM +0800, Zhao Zhili wrote: >> From: Zhao Zhili >> >> --- >> libavformat/img2enc.c | 8 >> 1 file changed, 4 insertions(+), 4 deletions(-) >

[FFmpeg-devel] [PATCH v4 1/3] aarch64/vvc: Add w_avg

2024-09-29 Thread Zhao Zhili
From: Zhao Zhili w_avg_8_2x2_c: 0.0 ( 0.00x) w_avg_8_2x2_neon:0.0 ( 0.00x) w_avg_8_4x4_c: 0.2 ( 1.00x) w_avg_8_4x4_neon:0.0 ( 0.00x

[FFmpeg-devel] [PATCH v4 2/3] aarch64/vvc: Add dmvr_hv

2024-09-29 Thread Zhao Zhili
From: Zhao Zhili dmvr_hv_8_12x20_c: 8.0 ( 1.00x) dmvr_hv_8_12x20_neon:1.2 ( 6.62x) dmvr_hv_8_20x12_c: 8.0 ( 1.00x) dmvr_hv_8_20x12_neon:0.9 ( 8.37x

[FFmpeg-devel] [PATCH v4 3/3] aarch64/vvc: Add dmvr

2024-09-29 Thread Zhao Zhili
From: Zhao Zhili dmvr_8_12x20_c: 1.5 ( 1.00x) dmvr_8_12x20_neon: 0.2 ( 6.56x) dmvr_8_20x12_c: 1.0 ( 1.00x) dmvr_8_20x12_neon: 0.2 ( 4.33x

[FFmpeg-devel] [PATCH v2] avcodec/vvc: Don't use large array on stack

2024-09-19 Thread Zhao Zhili
From: Zhao Zhili tmp_array in dmvr_hv takes 33024 bytes on stack, which can be dangerous. --- libavcodec/vvc/ctu.h | 1 + libavcodec/vvc/dsp.h | 2 +- libavcodec/vvc/inter.c | 2 +- libavcodec/vvc/inter_template.c | 12 +++- libavcodec/x86/vvc

[FFmpeg-devel] [PATCH v3] avcodec/vvc: Don't use large array on stack

2024-09-20 Thread Zhao Zhili
From: Zhao Zhili tmp_array in dmvr_hv takes 33024 bytes on stack, which can be dangerous. --- libavcodec/vvc/inter_template.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c

Re: [FFmpeg-devel] [PATCH v2] avcodec/vvc: Don't use large array on stack

2024-09-20 Thread Zhao Zhili
> On Sep 20, 2024, at 11:43, Zhao Zhili wrote: > > From: Zhao Zhili > > tmp_array in dmvr_hv takes 33024 bytes on stack, which can be > dangerous. I prefer version 3 personally https://ffmpeg.org/pipermail/ffmpeg-devel/2024-September/333709.html > --- &

Re: [FFmpeg-devel] [PATCH v2 1/3] avcodec: make a local copy of executor

2024-10-01 Thread Zhao Zhili
> On Oct 1, 2024, at 14:55, Nuo Mi wrote: > > We still need several refactors to improve the current VVC decoder's > performance, > which will frequently break the API/ABI. To mitigate this, we've copied the > executor from > avutil to avcodec. Once the API/ABI is stable, we will move this c

[FFmpeg-devel] [PATCH] swscale/aarch64: Fix rgb24toyv12 only works with aligned width

2024-09-18 Thread Zhao Zhili
From: Zhao Zhili Since c0666d8b, rgb24toyv12 is broken for width non-aligned to 16. Add a simple wrapper to handle the non-aligned part. Signed-off-by: Zhao Zhili Co-authored-by: johzzy --- libswscale/aarch64/rgb2rgb.c | 23 ++- tests/checkasm/sw_rgb.c | 2 +- 2

[FFmpeg-devel] [PATCH v2] swscale/aarch64: Fix rgb24toyv12 only works with aligned width

2024-09-18 Thread Zhao Zhili
From: Zhao Zhili Since c0666d8b, rgb24toyv12 is broken for width non-aligned to 16. Add a simple wrapper to handle the non-aligned part. Signed-off-by: Zhao Zhili Co-authored-by: johzzy --- v2: test width 2 and 540 libswscale/aarch64/rgb2rgb.c | 23 ++- tests/checkasm

Re: [FFmpeg-devel] [PATCH] swscale/aarch64: Fix rgb24toyv12 only works with aligned width

2024-09-18 Thread Zhao Zhili
> On Sep 18, 2024, at 20:51, Martin Storsjö wrote: > > On Wed, 18 Sep 2024, Zhao Zhili wrote: > >> From: Zhao Zhili >> >> Since c0666d8b, rgb24toyv12 is broken for width non-aligned to 16. >> Add a simple wrapper to handle the non-aligned part. >

[FFmpeg-devel] [RFC PATCH] avcodec/vvc: Don't use large array on stack

2024-09-19 Thread Zhao Zhili
From: Zhao Zhili tmp_array in dmvr_hv takes 33024 bytes on stack, which can be dangerous. This patch fixed the C version and comment out the x86 asm version. --- libavcodec/vvc/ctu.h | 1 + libavcodec/vvc/dsp.h | 2 +- libavcodec/vvc/inter.c | 2

Re: [FFmpeg-devel] [FFmpeg-cvslog] swscale/aarch64: Fix rgb24toyv12 only works with aligned width

2024-09-25 Thread Zhao Zhili
> On Sep 25, 2024, at 16:01, Martin Storsjö wrote: > > On Tue, 24 Sep 2024, Zhao Zhili wrote: > >> ffmpeg | branch: master | Zhao Zhili | Wed Sep 18 >> 21:11:44 2024 +0800| [e18b46d95fadcbaaf450bda9f1871849f2b0c586] | committer: >> Zhao Zhili >> >

[FFmpeg-devel] [PATCH] fftools/ffplay: use swapchain_colorspace_hint to get better HDR support

2024-09-25 Thread Zhao Zhili
From: Zhao Zhili For example, the default surface configuration on macOS is: VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_PASS_THROUGH_EXT With HDR10 content and swapchain_colorspace_hint, the surface configuration updated to: VK_FORMAT_A2B10G10R10_UNORM_PACK32

Re: [FFmpeg-devel] [PATCH] avcodec/videotoolbox: add AV1 hardware acceleration

2024-09-25 Thread Zhao Zhili
> On Sep 25, 2024, at 20:04, Martin Storsjö wrote: > > On Wed, 25 Sep 2024, Martin Storsjö wrote: > >> On Tue, 24 Sep 2024, Cameron Gutman wrote: >> >>> On Tue, Sep 24, 2024 at 7:16 AM Martin Storsjö wrote: I don't hit any issues with any AV1 samples that I have, I guess I don't ha

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/img2enc: Fix integer truncation when frame_pts is enabled

2024-10-03 Thread Zhao Zhili
> On Sep 30, 2024, at 00:06, Filip Mašić wrote: > >>> >>> On Sep 29, 2024, at 08:05, Michael Niedermayer >> wrote: >>> >>> On Tue, Sep 24, 2024 at 12:16:13AM +0800, Zhao Zhili wrote: >>>> From: Zhao Zhili >>>>

Re: [FFmpeg-devel] [PATCH 2/2] configure: allow mixed declarations and code for Objective-C

2024-10-03 Thread Zhao Zhili
> On Sep 26, 2024, at 07:43, Marvin Scholz wrote: > > Mixing declarations and code is quite common in Objective-C (as can be > seen by the number of warnings we have for this in Objective-C files) > and forcing to not do it usually results in worse code, with unnecessary > widely scoped variab

[FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Fix access of uninitialized value

2024-10-03 Thread Zhao Zhili
From: Zhao Zhili When crop is skipped, av_strlcatf will access `str` which isn't initialized properly. --- libavcodec/mediacodecenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 6ca3968a24..e76ea81236 1

[FFmpeg-devel] [PATCH v4] fate/vvc: Add a sample which lose frames before 5c66a3

2024-09-17 Thread Zhao Zhili
From: Zhao Zhili --- sample: 8054b4b8e62c0171476b40206d044590 Hierarchical.bit https://drive.google.com/file/d/1U5WGWeSsMFiEkhsl_vL4NiMma-LLh02t/view?usp=sharing Put Hierarchical.bit under $(TARGET_SAMPLES)/vvc tests/fate/vvc.mak| 3 ++- tests/ref/fate/vvc-output-ref | 35

Re: [FFmpeg-devel] [PATCH] lavc/libx265: flag as experimental

2024-10-17 Thread Zhao Zhili
> 在 2024年10月17日,下午10:01,James Almer 写道: > > On 10/17/2024 10:49 AM, Timo Rothenpieler wrote: >>> On 17/10/2024 11:22, Anton Khirnov wrote: >>> Quoting Anton Khirnov (2023-03-15 15:45:25) This encoder leaks and overreads, as can be seen e.g. by running an encode under valgrind with def

[FFmpeg-devel] [PATCH 4/4] avcodec/mediacodecenc: add async mode support

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili It has better performance than poll in a loop. --- configure | 2 +- libavcodec/mediacodecenc.c | 296 + libavcodec/version.h | 2 +- 3 files changed, 266 insertions(+), 34 deletions(-) diff --git a/configure b

[FFmpeg-devel] [PATCH 2/4] avcodec/mediacodecenc: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili For example, with ./ffmpeg -operating_rate 400 -hwaccel mediacodec -i test.mp4 -an \ -c:v h264_mediacodec -operating_rate 400 -b:v 5M -f null - The transcoding speed is 254 FPS. Without -operating_rate on dec/enc, the speed is 148 FPS. With -operating_rate on decoder only, the

[FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The codec wants to know whether the usecase is realtime playback or full-speed transcoding, or playback at a higher speed. The codec runs faster when operating_rate higher than framerate. --- libavcodec/mediacodecdec.c | 8 1 file changed, 8 insertions(+) diff --git a

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
> On Nov 6, 2024, at 20:33, Zhao Zhili wrote: > > From: Zhao Zhili > > The codec wants to know whether the usecase is realtime playback > or full-speed transcoding, or playback at a higher speed. The codec > runs faster when operating_rate higher than framerate. > —

[FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The codec wants to know whether the usecase is realtime playback or full-speed transcoding, or playback at a higher speed. The codec runs faster when operating_rate higher than framerate. --- libavcodec/mediacodecdec.c | 8 1 file changed, 8 insertions(+) diff --git a

Re: [FFmpeg-devel] [PATCH v2] fftools/ffplay: fix crash when vk renderer is null

2024-11-06 Thread Zhao Zhili
> On Nov 1, 2024, at 04:50, Leandro Santiago wrote: > > When vulkan rendering is requested by the user and fails, ffplay should > exit graciously instead of crash due to a null pointer deref. > > Signed-off-by: Leandro Santiago > --- > fftools/ffplay.c | 5 + > 1 file changed, 5 insertion

[FFmpeg-devel] [PATCH] fftools/ffplay_renderer: Fix a typo

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The typo has no real effect except confusing. Signed-off-by: Zhao Zhili Reported-by: Chen Haibo --- fftools/ffplay_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay_renderer.c b/fftools/ffplay_renderer.c index 618149e7b2

[FFmpeg-devel] [PATCH 3/4] avcodec/mediacodec_wrapper: add async mode support

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 130 libavcodec/mediacodec_wrapper.h | 28 +++ 2 files changed, 158 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 96c88a..283bbe72d6 100644

Re: [FFmpeg-devel] [PATCH 1/4] avfilter/scale_vt: implement frame crop

2024-11-20 Thread Zhao Zhili
> 在 2024年11月21日,上午12:40,Koushik Dutta 写道: > > Is anyone reviewing videotoolbox or qsv filters? The scale_cuda > version of this patch was merged. Sorry I missed the scale_vt patch. I’m not good at tracking patches on mailing list. I will take a look this week. > >> On Sat, Oct 19, 2024 at 1

[FFmpeg-devel] [PATCH v2 3/3] avcodec/hevc: Add wasm simd128 idct

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili Benchmark with wasmtime: wasmtime checkasm --test=hevc_idct --benchmark hevc_idct_4x4_8_c: 20.8 ( 1.00x) hevc_idct_4x4_8_simd128:10.2 ( 2.02x) hevc_idct_4x4_10_c: 21.0

[FFmpeg-devel] [PATCH v2 2/3] tests/checkasm: Add partial support for wasm

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili WASI mssing signal and siglongjmp support. This patch workaround build error and add simd128 flag. Please note that many tests use large array on stack, so you need to increase the stack size when build checkasm, e.g., --extra-ldflags='-Wl,-z,stack-size=10485760'

[FFmpeg-devel] [PATCH v2 1/3] configure: Add wasm as a fake arch

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili And add wasm simd128 flag, so we can add simd128 optimizations. It can be enabled by put -msimd128 to extra cflags. There is no runtime detection on simd128 support yet. I think that needs to be done with JavaScript. --- Makefile | 3 ++- configure

[FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili v2: 1. Remove unused include 2. Remove words on intrinsics vs handwritten assembly in wasm context. Zhao Zhili (3): configure: Add wasm as a fake arch tests/checkasm: Add partial support for wasm avcodec/hevc: Add wasm simd128 idct Makefile| 3

[FFmpeg-devel] [PATCH 1/3] avcodec/cavs: Limit align requirement to variable than type

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili There are another three cavs_vector variables, ff_cavs_dir_mv, ff_cavs_intra_mv and un_mv. They don't need align to 8. --- libavcodec/cavs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 244c3

[FFmpeg-devel] [PATCH 3/3] avutil/mem_internal: local align should always work

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili --- configure| 7 --- libavutil/mem_internal.h | 28 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 0e9ed6dc3c..b9fb3cd5af 100755 --- a/configure +++ b/configure @@ -2246,7 +2246,6

[FFmpeg-devel] [PATCH 2/3] avutil/mem_internal: define DECLARE_ALIGNED as C11's _Alignas

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili _Alignas is portable than compiler's specific __attribute__. It do have a limitation, that _Alignas don't support specify aligment on the declarations of struct (it works for specify alignment on struct fields), which only used by avcodec/cavs, and is removed now. ---

[FFmpeg-devel] [PATCH v2 2/3] avutil/mem_internal: define DECLARE_ALIGNED as C11's alignas

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili alignas is portable than compiler's specific __attribute__. It do have a limitation, that alignas don't support specify aligment on the declarations of struct (it works for specify alignment on struct fields), which only used by avcodec/cavs, and is removed now. ---

[FFmpeg-devel] [PATCH] avfilter/textutils: Add missing time_internal.h

2024-11-18 Thread Zhao Zhili
From: Zhao Zhili This fix build error on Windows with MSVC. We need time_internal.h for gmtime_r and localtime_r. Signed-off-by: Zhao Zhili --- libavfilter/textutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c index e6b5239b20

Re: [FFmpeg-devel] [PATCH] avformat/smoothstreamingenc: check return value of avcodec_parameters_copy()

2024-11-21 Thread Zhao Zhili
> On Oct 13, 2024, at 01:18, Marth64 wrote: > > Written in the dominant style of the surrounding code block. > > Signed-off-by: Marth64 > --- > libavformat/smoothstreamingenc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/smoothstreamingenc.c > b/li

<    7   8   9   10   11   12   13   14   15   16   >