Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-27 Thread Nuo Mi
On Tue, Jun 25, 2024 at 8:36 PM Nuo Mi wrote: > > > On Mon, Jun 24, 2024 at 12:48 PM Zhao Zhili > wrote: > >> From: Zhao Zhili >> >> Before the patch, disable threads support at configure/build time >> was the only method to force zero thread in executor. However, >> it's common practice for li

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-25 Thread Nuo Mi
On Mon, Jun 24, 2024 at 12:48 PM Zhao Zhili wrote: > From: Zhao Zhili > > Before the patch, disable threads support at configure/build time > was the only method to force zero thread in executor. However, > it's common practice for libavcodec to run on caller's thread when > user specify thread

[FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-23 Thread Zhao Zhili
From: Zhao Zhili Before the patch, disable threads support at configure/build time was the only method to force zero thread in executor. However, it's common practice for libavcodec to run on caller's thread when user specify thread number to one. And for WASM environment, whether threads are sup

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-19 Thread Steven Liu
Nuo Mi 于2024年6月19日周三 16:40写道: > > On Tue, Jun 18, 2024 at 8:06 PM Steven Liu wrote: > > > Nuo Mi 于2024年6月18日周二 19:51写道: > > > > > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili > > wrote: > > > > > > > > > > > > > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes > > wrote: > > > > > > > > > > On

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-19 Thread Nuo Mi
On Tue, Jun 18, 2024 at 10:24 PM Zhao Zhili wrote: > > > > On Jun 18, 2024, at 19:50, Nuo Mi wrote: > > > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili > wrote: > > > >> > >> > >>> On Jun 17, 2024, at 16:45, Hendrik Leppkes > wrote: > >>> > >>> On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > >>

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-19 Thread Nuo Mi
On Tue, Jun 18, 2024 at 8:06 PM Steven Liu wrote: > Nuo Mi 于2024年6月18日周二 19:51写道: > > > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili > wrote: > > > > > > > > > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes > wrote: > > > > > > > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > > > wrote: >

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-18 Thread Zhao Zhili
> On Jun 18, 2024, at 19:50, Nuo Mi wrote: > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili wrote: > >> >> >>> On Jun 17, 2024, at 16:45, Hendrik Leppkes wrote: >>> >>> On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili >> wrote: > On Jun 17, 2024, at 15:05, Anton Khirnov w

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-18 Thread Steven Liu
Nuo Mi 于2024年6月18日周二 19:51写道: > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili wrote: > > > > > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes wrote: > > > > > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > > wrote: > > >> > > >> > > >> > > >>> On Jun 17, 2024, at 15:05, Anton Khirnov wrote:

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-18 Thread Nuo Mi
On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili wrote: > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes wrote: > > > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > wrote: > >> > >> > >> > >>> On Jun 17, 2024, at 15:05, Anton Khirnov wrote: > >>> > >>> Quoting Zhao Zhili (2024-06-17 07:19:26) > >

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-17 Thread Zhao Zhili
> On Jun 17, 2024, at 16:45, Hendrik Leppkes wrote: > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili wrote: >> >> >> >>> On Jun 17, 2024, at 15:05, Anton Khirnov wrote: >>> >>> Quoting Zhao Zhili (2024-06-17 07:19:26) From: Zhao Zhili When thread_count be zero, it will be

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-17 Thread Hendrik Leppkes
On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili wrote: > > > > > On Jun 17, 2024, at 15:05, Anton Khirnov wrote: > > > > Quoting Zhao Zhili (2024-06-17 07:19:26) > >> From: Zhao Zhili > >> > >> When thread_count be zero, it will be run on current thread like > >> !HAVE_THREADS. > > > > Other APIs tr

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-17 Thread Zhao Zhili
> On Jun 17, 2024, at 15:05, Anton Khirnov wrote: > > Quoting Zhao Zhili (2024-06-17 07:19:26) >> From: Zhao Zhili >> >> When thread_count be zero, it will be run on current thread like >> !HAVE_THREADS. > > Other APIs treat zero to mean "auto". executor don’t detect cpu cores by itself. It

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-17 Thread Paul B Mahol
On Mon, Jun 17, 2024 at 9:05 AM Anton Khirnov wrote: > Quoting Zhao Zhili (2024-06-17 07:19:26) > > From: Zhao Zhili > > > > When thread_count be zero, it will be run on current thread like > > !HAVE_THREADS. > > Other APIs treat zero to mean "auto". > Agreed, this approach for 0 to mean do it

Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-17 Thread Anton Khirnov
Quoting Zhao Zhili (2024-06-17 07:19:26) > From: Zhao Zhili > > When thread_count be zero, it will be run on current thread like > !HAVE_THREADS. Other APIs treat zero to mean "auto". -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg

[FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-16 Thread Zhao Zhili
From: Zhao Zhili When thread_count be zero, it will be run on current thread like !HAVE_THREADS. --- libavutil/executor.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/libavutil/executor.c b/libavutil/executor.c index 26691fe157..fb20104b58 10