[FFmpeg-devel] [PATCH 01/14] vvcdec: add thread executor
Lynne
dev at lynne.ee
Sun May 21 17:11:11 EEST 2023
May 21, 2023, 15:03 by nuomi2021 at gmail.com:
> 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/vvc/Makefile | 4 +
> libavcodec/vvc/vvc_executor.c | 193 ++++++++++++++++++++++++++++++++++
> libavcodec/vvc/vvc_executor.h | 73 +++++++++++++
> 4 files changed, 271 insertions(+)
> create mode 100644 libavcodec/vvc/Makefile
> create mode 100644 libavcodec/vvc/vvc_executor.c
> create mode 100644 libavcodec/vvc/vvc_executor.h
>
I'd like a unified API, since for AV1, we'd want something similar.
Having a custom one for each codec is a bad idea and prone to bitrotting.
More information about the ffmpeg-devel
mailing list