genode/repos/libports/lib/mk/libyuv.inc
Alexander Boettcher 0d868515a5 libyuv: add support to overwrite default allocator
Internally libyuv uses malloc & free for short time dynamic memory
allocation during image transformation. The converted images are
such large, that the Libc allocator will create and destroy new Genode
dataspace per image.  In time sensitive code paths, the overhead can be
noticeable by the caller of the image transformation.
The patch adds the option to register callbacks in the libyuv library to
implement the image allocation by users of the library. They may implement
caching strategies to avoid the overhead, e.g. as seen with qemu-usb and
the webcam model.
2023-10-04 13:22:06 +02:00

21 lines
448 B
PHP

SHARED_LIB = yes
YUV_PORT := $(call select_from_ports,libyuv)
YUV_DIR = $(YUV_PORT)/src/lib/libyuv
LIB_DIR = $(REP_DIR)/src/lib/libyuv
LIBS = libc stdcxx jpeg
INC_DIR += $(REP_DIR)/include
INC_DIR += $(YUV_PORT)/include
SRC_CC = $(notdir $(wildcard $(YUV_DIR)/source/*.cc))
SRC_CC += memory.cc
CC_CXX_WARN_STRICT = -Wextra -Werror
CC_OPT += -Wno-unused-parameter -DHAVE_JPEG
vpath memory.cc $(LIB_DIR)
vpath %.cc $(YUV_DIR)/source