[FFmpeg-devel] [PATCH v2 01/14] vvcdec: add thread executor
Michael Niedermayer
michael at niedermayer.cc
Tue Jul 18 01:13:52 EEST 2023
On Sun, Jul 16, 2023 at 02:28:53PM +0800, Nuo Mi wrote:
> On Mon, Jul 10, 2023 at 3:41 PM Nuo Mi <nuomi2021 at gmail.com> wrote:
>
> >
> >
> > On Sun, Jul 9, 2023 at 5:52 AM Michael Niedermayer <michael at 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
> >> > <https://docs.python.org/3/library/concurrent.futures.html>
> >> > 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 ‘executor_worker_task’:
> >> src/libavcodec/executor.c:64:5: error: implicit declaration of function
> >> ‘pthread_mutex_lock’; did you mean ‘ff_mutex_lock’?
> >> [-Werror=implicit-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 at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-request at 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 test.
> Could you share with me how to test the decoder when we disabled threads?
it seems this failure occurred on a ppc cross compile
../configure --target-os=linux --enable-cross-compile --disable-iconv --disable-pthreads && make -j32
but its reproduceable on ubuntu x86-64 with a simple
make distclean ; ./configure --disable-pthreads && make -j32
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230718/ae273216/attachment.sig>
More information about the ffmpeg-devel
mailing list