This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new a8e6a07b0 graphics/libyuv: add libyuv
a8e6a07b0 is described below
commit a8e6a07b0a41eca60a735e0412b1f73348ef4d9d
Author: Peter Bee <[email protected]>
AuthorDate: Thu Dec 1 12:46:36 2022 +0800
graphics/libyuv: add libyuv
Library for video format conversions
Signed-off-by: Peter Bee <[email protected]>
---
graphics/libyuv/.gitignore | 2 ++
graphics/libyuv/Kconfig | 18 ++++++++++++++++++
graphics/libyuv/Make.defs | 26 ++++++++++++++++++++++++++
graphics/libyuv/Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 89 insertions(+)
diff --git a/graphics/libyuv/.gitignore b/graphics/libyuv/.gitignore
new file mode 100644
index 000000000..23b19093e
--- /dev/null
+++ b/graphics/libyuv/.gitignore
@@ -0,0 +1,2 @@
+libyuv
+*.tar.gz
diff --git a/graphics/libyuv/Kconfig b/graphics/libyuv/Kconfig
new file mode 100644
index 000000000..8d6b7cb7c
--- /dev/null
+++ b/graphics/libyuv/Kconfig
@@ -0,0 +1,18 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config LIBYUV
+ bool "libyuv"
+ default n
+ ---help---
+ Enable libyuv.
+
+if LIBYUV
+
+config LIBYUV_BRANCH
+ string "libyuv branch (main/stable)"
+ default "stable"
+
+endif # LIBYUV
diff --git a/graphics/libyuv/Make.defs b/graphics/libyuv/Make.defs
new file mode 100644
index 000000000..d22f2ab11
--- /dev/null
+++ b/graphics/libyuv/Make.defs
@@ -0,0 +1,26 @@
+############################################################################
+# apps/graphics/libyuv/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifneq ($(CONFIG_LIBYUV),)
+CONFIGURED_APPS += $(APPDIR)/graphics/libyuv
+
+CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/libyuv/libyuv/include
+CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/libyuv/libyuv/include
+endif
diff --git a/graphics/libyuv/Makefile b/graphics/libyuv/Makefile
new file mode 100644
index 000000000..a6c781cce
--- /dev/null
+++ b/graphics/libyuv/Makefile
@@ -0,0 +1,43 @@
+############################################################################
+# apps/graphics/libyuv/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+SRCDIR = libyuv
+
+CXXEXT := .cc
+CXXFLAGS += -Wno-shadow
+CXXSRCS = $(wildcard $(SRCDIR)/source/*.cc)
+
+libyuv.tar.gz:
+ $(Q) curl -L
https://chromium.googlesource.com/libyuv/libyuv/+archive/refs/heads/$(CONFIG_LIBYUV_BRANCH).tar.gz
-o libyuv.tar.gz
+ $(Q) mkdir -p $(SRCDIR)
+ $(Q) tar zxf libyuv.tar.gz --directory $(SRCDIR)
+
+# Download and unpack tarball if no git repo found
+ifeq ($(wildcard libyuv/libyuv),)
+context:: libyuv.tar.gz
+
+distclean::
+ $(call DELDIR, libyuv)
+ $(call DELFILE, libyuv.tar.gz)
+endif
+
+include $(APPDIR)/Application.mk