From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 68A6040333 for ; Tue, 18 Jul 2023 14:56:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C089E68C39A; Tue, 18 Jul 2023 17:56:05 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5D87868C17A for ; Tue, 18 Jul 2023 17:55:59 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B1A8640002 for ; Tue, 18 Jul 2023 14:55:58 +0000 (UTC) Date: Tue, 18 Jul 2023 16:55:57 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230718145557.GY1093384@pb2> References: <20230707140540.10279-1-nuomi2021@gmail.com> <20230708215151.GB1093384@pb2> <20230717221352.GW1093384@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2 01/14] vvcdec: add thread executor X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============4920092346046543155==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4920092346046543155== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CQ3bIqlPgDWyQ28b" Content-Disposition: inline --CQ3bIqlPgDWyQ28b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 18, 2023 at 07:53:09PM +0800, Nuo Mi wrote: > On Tue, Jul 18, 2023 at 6:14=E2=80=AFAM Michael Niedermayer > wrote: >=20 > > On Sun, Jul 16, 2023 at 02:28:53PM +0800, Nuo Mi wrote: > > > On Mon, Jul 10, 2023 at 3:41=E2=80=AFPM Nuo Mi = wrote: > > > > > > > > > > > > > > > On Sun, Jul 9, 2023 at 5:52=E2=80=AFAM Michael Niedermayer < > > michael@niedermayer.cc> > > > > wrote: > > > > > > > >> On Fri, Jul 07, 2023 at 10:05:27PM +0800, Nuo Mi wrote: > > > >> > The executor design pattern was inroduced by java > > > >> > < > > > >> > > https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/= concurrent/Executor.html > > > >> > > > > >> > it also adapted by python > > > >> > > > > >> > Compared to handcrafted thread pool management, it greatly > > simplifies > > > >> the thread code. > > > >> > --- > > > >> > libavcodec/Makefile | 1 + > > > >> > libavcodec/executor.c | 182 > > ++++++++++++++++++++++++++++++++++++++++ > > > >> > libavcodec/executor.h | 67 +++++++++++++++ > > > >> > libavcodec/vvc/Makefile | 4 + > > > >> > 4 files changed, 254 insertions(+) > > > >> > create mode 100644 libavcodec/executor.c > > > >> > create mode 100644 libavcodec/executor.h > > > >> > create mode 100644 libavcodec/vvc/Makefile > > > >> > > > >> This seems to need some fallback if pthreads are unavailable > > > >> > > > >> src/libavcodec/executor.c: In function =E2=80=98executor_worker_ta= sk=E2=80=99: > > > >> src/libavcodec/executor.c:64:5: error: implicit declaration of > > function > > > >> =E2=80=98pthread_mutex_lock=E2=80=99; did you mean =E2=80=98ff_mut= ex_lock=E2=80=99? > > > >> [-Werror=3Dimplicit-function-declaration] > > > >> pthread_mutex_lock(&e->lock); > > > >> ^~~~~~~~~~~~~~~~~~ > > > >> ff_mutex_lock > > > >> ... > > > >> cc1: some warnings being treated as errors > > > >> ffmpeg/ffbuild/common.mak:81: recipe for target > > 'libavcodec/executor.o' > > > >> failed > > > >> make: *** [libavcodec/executor.o] Error 1 > > > >> make: *** Waiting for unfinished jobs.... > > > >> > > > >> thx > > > >> > > > >> [...] > > > >> -- > > > >> Michael GnuPG fingerprint: > > 9FF2128B147EF6730BADF133611EC787040B0FAB > > > >> > > > >> Why not whip the teacher when the pupil misbehaves? -- Diogenes of > > Sinope > > > >> _______________________________________________ > > > >> ffmpeg-devel mailing list > > > >> ffmpeg-devel@ffmpeg.org > > > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > >> > > > >> To unsubscribe, visit link above, or email > > > >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > > >> > > > > Hi Michael, > > > > Thank you for the information. I will fixed it > > > > > > > > > > Hi Michael, > > > FFmpeg application has a dependency on threads > > > Once I --disable-pthreads, I can't build ffmpeg for the decoder md5 t= est. > > > Could you share with me how to test the decoder when we disabled thre= ads? > > > > it seems this failure occurred on a ppc cross compile > > ../configure --target-os=3Dlinux --enable-cross-compile --disable-iconv > > --disable-pthreads && make -j32 >=20 >=20 >=20 >=20 > > but its reproduceable on ubuntu x86-64 with a simple > > make distclean ; ./configure --disable-pthreads && make -j32 > > > I used a similar configuration, but both my configuration and the one you > provided do not generate the ffmpeg executable. We only get the ffprobe. > However, I need the ffmpeg executable to obtain the MD5 for the conforman= ce > test. I dont understand fully the command results in a build failure of libavcodec, theres no need to bui= ld the ffmpeg excutable, it should fail before Its true that once the build failure is corrected that testing this without= pthreads would be impossible with tools depending on pthreads and build in the same = pass. I dont think testing beyond build is critical here. But you can test it likely either with older ffmpeg or with a bit of "duct = tape" building with shared libs building ffmpeg with threads and linking to libs = build without. Again, iam not asking fr that to be done, iam happy if the build f= ailure is fixed and its believed to work. thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin --CQ3bIqlPgDWyQ28b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZLan+QAKCRBhHseHBAsP q+mQAKCFOSVIIqq4Ed2H8GOlVAQRsneo/ACbBIyRKCLN1MNdVq3GUEn3IABeF0w= =QY2/ -----END PGP SIGNATURE----- --CQ3bIqlPgDWyQ28b-- --===============4920092346046543155== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============4920092346046543155==--