[FFmpeg-devel] [PATCH 0/2] lavc/videotoolbox: use objpool instead of allocating memory each frame
Zhao Zhili
quinkblack at foxmail.com
Sun Nov 20 16:47:32 EET 2022
On Sat, 2022-11-19 at 16:35 -0500, Rick Kern wrote:
> objpool was only being used in fftools, but it's useful in other
> components to reduce alloation time and memory fragmentation.
>
> This patch set moves objpool to libavutil, so it can be used by
> lavc/videotoolboxenc for data being passed from input frames to
> output packets.
>
> Rick Kern (2):
> fftools/objpool: move objpool to libavutil
> lavc/videotoolboxenc: use objectpool for encoder output information
>
> fftools/Makefile | 1 -
> fftools/ffmpeg_mux.c | 2 +-
> fftools/sync_queue.c | 2 +-
> fftools/thread_queue.c | 2 +-
> fftools/thread_queue.h | 2 +-
> libavcodec/videotoolboxenc.c | 80 ++++++++++++++++++++++++++++
> ----
> libavutil/Makefile | 2 +
> {fftools => libavutil}/objpool.c | 0
> {fftools => libavutil}/objpool.h | 0
> 9 files changed, 77 insertions(+), 14 deletions(-)
> rename {fftools => libavutil}/objpool.c (100%)
> rename {fftools => libavutil}/objpool.h (100%)
>
libavutil.v specifies that only symbols with av prefix can be visible
outside of libavutil. So it doesn't work without rename those
functions.
Meanwhile I don't know if it's appropriate to add these functions to
libavutil.
More information about the ffmpeg-devel
mailing list