All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package
@ 2019-03-14 15:34 Eloi Bail
  2019-03-14 15:34 ` [Buildroot] [PATCH 2/2] package/gst1-plugins-bayer2rgb-neon: " Eloi Bail
  2019-03-29 20:16 ` [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: " Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Eloi Bail @ 2019-03-14 15:34 UTC (permalink / raw)
  To: buildroot

bayer2rgb-neon[1] is a library which allows decoding raw camera bayer
to RGB using NEON hardware acceleration.

[1]: https://git.phytec.de/bayer2rgb-neon/

Signed-off-by: Eloi Bail <eloi.bail@savoirfairelinux.com>
---
 package/Config.in                        |  1 +
 package/bayer2rgb-neon/Config.in         | 12 +++++++++
 package/bayer2rgb-neon/bayer2rgb-neon.mk | 32 ++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/bayer2rgb-neon/Config.in
 create mode 100644 package/bayer2rgb-neon/bayer2rgb-neon.mk

diff --git a/package/Config.in b/package/Config.in
index 420e6e95a3..259bd50224 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -12,6 +12,7 @@ menu "Audio and video applications"
 	source "package/alsa-utils/Config.in"
 	source "package/atest/Config.in"
 	source "package/aumix/Config.in"
+	source "package/bayer2rgb-neon/Config.in"
 	source "package/bellagio/Config.in"
 	source "package/bluez-alsa/Config.in"
 	source "package/dvblast/Config.in"
diff --git a/package/bayer2rgb-neon/Config.in b/package/bayer2rgb-neon/Config.in
new file mode 100644
index 0000000000..702e2e316d
--- /dev/null
+++ b/package/bayer2rgb-neon/Config.in
@@ -0,0 +1,12 @@
+menuconfig BR2_PACKAGE_BAYER2RGB_NEON
+	bool "bayer2rgb-neon"
+	depends on BR2_arm
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_ARM_ENABLE_NEON
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	help
+	  bayer2rgb-neon is a library which allows
+	  to decode raw camera bayer to RGB using
+	  NEON hardware acceleration.
+
+	  https://git.phytec.de/bayer2rgb-neon/
diff --git a/package/bayer2rgb-neon/bayer2rgb-neon.mk b/package/bayer2rgb-neon/bayer2rgb-neon.mk
new file mode 100644
index 0000000000..964563d152
--- /dev/null
+++ b/package/bayer2rgb-neon/bayer2rgb-neon.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# bayer2rgb-neon
+#
+################################################################################
+
+BAYER2RGB_NEON_VERSION = v0.4
+BAYER2RGB_NEON_SOURCE = bayer2rgb-neon-$(BAYER2RGB_NEON_VERSION).tar.bz2
+BAYER2RGB_NEON_SITE = https://git.phytec.de/bayer2rgb-neon/snapshot
+
+BAYER2RGB_NEON_LICENSE = GPL-3.0
+BAYER2RGB_NEON_LICENSE_FILES = COPYING
+
+BAYER2RGB_NEON_INSTALL_STAGING = YES
+
+BAYER2RGB_NEON_DEPENDENCIES += host-pkgconf host-gengetopt
+
+BAYER2RGB_NEON_CONF_OPTS = --prefix="/usr"
+BAYER2RGB_NEON_AUTORECONF = YES
+
+BAYER2RGB_NEON_CFLAGS = $(TARGET_CFLAGS)
+BAYER2RGB_NEON_CFLAGS += -mfpu=neon
+
+BAYER2RGB_NEON_CONF_ENV = CFLAGS=" $(BAYER2RGB_NEON_CFLAGS)"
+
+define BAYER2RGB_NEON_PRE_CONFIGURE_FIXUP
+	mkdir -p $(@D)/m4
+endef
+
+BAYER2RGB_NEON_PRE_CONFIGURE_HOOKS += BAYER2RGB_NEON_PRE_CONFIGURE_FIXUP
+
+$(eval $(autotools-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] package/gst1-plugins-bayer2rgb-neon: new package
  2019-03-14 15:34 [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package Eloi Bail
@ 2019-03-14 15:34 ` Eloi Bail
  2019-03-29 20:16 ` [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: " Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Eloi Bail @ 2019-03-14 15:34 UTC (permalink / raw)
  To: buildroot

gst1-plugins-bayer2rgb-neon[1] is a gstreamer1 plugin which uses
bayer2rgb-neon library to decode raw camera bayer to RGB using NEON
hardware acceleration.

[1] https://git.phytec.de/gst-bayer2rgb-neon

Signed-off-by: Eloi Bail <eloi.bail@savoirfairelinux.com>
---
 package/gstreamer1/Config.in                  |  1 +
 .../gst1-plugins-bayer2rgb-neon/Config.in     | 15 +++++++++
 .../gst1-plugins-bayer2rgb-neon.mk            | 31 +++++++++++++++++++
 3 files changed, 47 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-bayer2rgb-neon/Config.in
 create mode 100644 package/gstreamer1/gst1-plugins-bayer2rgb-neon/gst1-plugins-bayer2rgb-neon.mk

diff --git a/package/gstreamer1/Config.in b/package/gstreamer1/Config.in
index 922ecefcff..bb5c1d2af8 100644
--- a/package/gstreamer1/Config.in
+++ b/package/gstreamer1/Config.in
@@ -4,6 +4,7 @@ source "package/gstreamer1/gstreamer1/Config.in"
 if BR2_PACKAGE_GSTREAMER1
 source "package/gstreamer1/gstreamer1-mm/Config.in"
 source "package/gstreamer1/gst1-plugins-base/Config.in"
+source "package/gstreamer1/gst1-plugins-bayer2rgb-neon/Config.in"
 source "package/gstreamer1/gst1-plugins-good/Config.in"
 source "package/gstreamer1/gst1-plugins-bad/Config.in"
 source "package/gstreamer1/gst1-plugins-ugly/Config.in"
diff --git a/package/gstreamer1/gst1-plugins-bayer2rgb-neon/Config.in b/package/gstreamer1/gst1-plugins-bayer2rgb-neon/Config.in
new file mode 100644
index 0000000000..3fae9ac494
--- /dev/null
+++ b/package/gstreamer1/gst1-plugins-bayer2rgb-neon/Config.in
@@ -0,0 +1,15 @@
+menuconfig BR2_PACKAGE_GST1_PLUGINS_BAYER2RGB_NEON
+	bool "gst1-plugins-bayer2rgb-neon"
+	depends on BR2_arm # bayer2rgb-neon
+	depends on !BR2_STATIC_LIBS # bayer2rgb-neon
+	depends on BR2_ARM_ENABLE_NEON # bayer2rgb-neon
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX # bayer2rgb-neon
+	select BR2_PACKAGE_GST1_PLUGINS_BASE
+	select BR2_PACKAGE_BAYER2RGB_NEON
+	help
+	  gst1-plugins-bayer2rgb-neon is a gstreamer1
+	  plugin which uses bayer2rgb-neon library to
+	  decode raw camera bayer to RGB using
+	  NEON hardware acceleration.
+
+	  https://git.phytec.de/gst-bayer2rgb-neon
diff --git a/package/gstreamer1/gst1-plugins-bayer2rgb-neon/gst1-plugins-bayer2rgb-neon.mk b/package/gstreamer1/gst1-plugins-bayer2rgb-neon/gst1-plugins-bayer2rgb-neon.mk
new file mode 100644
index 0000000000..722a71c318
--- /dev/null
+++ b/package/gstreamer1/gst1-plugins-bayer2rgb-neon/gst1-plugins-bayer2rgb-neon.mk
@@ -0,0 +1,31 @@
+################################################################################
+#
+# gst1-plugins-bayer2rgb-neon
+#
+################################################################################
+
+GST1_PLUGINS_BAYER2RGB_NEON_VERSION = v0.3
+GST1_PLUGINS_BAYER2RGB_NEON_SOURCE = gst-bayer2rgb-neon-$(GST1_PLUGINS_BAYER2RGB_NEON_VERSION).tar.bz2
+GST1_PLUGINS_BAYER2RGB_NEON_SITE = https://git.phytec.de/gst-bayer2rgb-neon/snapshot
+
+GST1_PLUGINS_BAYER2RGB_NEON_LICENSE = GPL-3.0
+GST1_PLUGINS_BAYER2RGB_NEON_LICENSE_FILES = COPYING
+
+GST1_PLUGINS_BAYER2RGB_NEON_INSTALL_STAGING = YES
+
+GST1_PLUGINS_BAYER2RGB_NEON_DEPENDENCIES += \
+	host-pkgconf \
+	gstreamer1 \
+	gst1-plugins-base \
+	bayer2rgb-neon
+
+GST1_PLUGINS_BAYER2RGB_NEON_CONF_OPTS = --prefix="/usr"
+GST1_PLUGINS_BAYER2RGB_NEON_AUTORECONF = YES
+
+define GST1_PLUGINS_BAYER2RGB_NEON_PRE_CONFIGURE_FIXUP
+	mkdir -p $(@D)/m4
+endef
+
+GST1_PLUGINS_BAYER2RGB_NEON_PRE_CONFIGURE_HOOKS += GST1_PLUGINS_BAYER2RGB_NEON_PRE_CONFIGURE_FIXUP
+
+$(eval $(autotools-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package
  2019-03-14 15:34 [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package Eloi Bail
  2019-03-14 15:34 ` [Buildroot] [PATCH 2/2] package/gst1-plugins-bayer2rgb-neon: " Eloi Bail
@ 2019-03-29 20:16 ` Thomas Petazzoni
  2019-04-02 12:46   ` Éloi Bail
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-03-29 20:16 UTC (permalink / raw)
  To: buildroot

Hello Eloi,

On Thu, 14 Mar 2019 16:34:34 +0100
Eloi Bail <eloi.bail@savoirfairelinux.com> wrote:

> bayer2rgb-neon[1] is a library which allows decoding raw camera bayer
> to RGB using NEON hardware acceleration.
> 
> [1]: https://git.phytec.de/bayer2rgb-neon/
> 
> Signed-off-by: Eloi Bail <eloi.bail@savoirfairelinux.com>

I have applied your patch, but after a fair number of changes, see
below for the details.

> ---
>  package/Config.in                        |  1 +
>  package/bayer2rgb-neon/Config.in         | 12 +++++++++
>  package/bayer2rgb-neon/bayer2rgb-neon.mk | 32 ++++++++++++++++++++++++
>  3 files changed, 45 insertions(+)

When adding a new package, an entry in the DEVELOPERS file must be
added. All new packages must also have a .hash file containing the hash
of the tarball and the license file.

> diff --git a/package/Config.in b/package/Config.in
> index 420e6e95a3..259bd50224 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -12,6 +12,7 @@ menu "Audio and video applications"

bayer2rgb-neon is not really an application, but more a library, so I
moved it to Library -> Graphics.

> diff --git a/package/bayer2rgb-neon/Config.in b/package/bayer2rgb-neon/Config.in
> new file mode 100644
> index 0000000000..702e2e316d
> --- /dev/null
> +++ b/package/bayer2rgb-neon/Config.in
> @@ -0,0 +1,12 @@
> +menuconfig BR2_PACKAGE_BAYER2RGB_NEON

A "menuconfig" is not appropriate for a single package, we use a simple
"config" option.

> +	bool "bayer2rgb-neon"
> +	depends on BR2_arm
> +	depends on !BR2_STATIC_LIBS
> +	depends on BR2_ARM_ENABLE_NEON

Having Neon enabled is not needed: we only need the CPU to suport Neon,
so I changed this to BR2_ARM_CPU_HAS_NEON.

> +	depends on BR2_TOOLCHAIN_BUILDROOT_CXX

This is not the correct option to depend on C++: this option only
exists when using an internal toolchain, so this dependency prevents
selecting this package when an external toolchain is used. The correct
dependency is BR2_INSTALL_LIBSTDCPP.

Another dependency that was missing is on the gcc version: because it
uses C++11, we need gcc >= 4.9.

> +	help
> +	  bayer2rgb-neon is a library which allows
> +	  to decode raw camera bayer to RGB using
> +	  NEON hardware acceleration.
> +
> +	  https://git.phytec.de/bayer2rgb-neon/

When a package has dependencies, we add a Config.in comment to document
those dependencies and help the user, so I've done that.

> diff --git a/package/bayer2rgb-neon/bayer2rgb-neon.mk b/package/bayer2rgb-neon/bayer2rgb-neon.mk
> new file mode 100644
> index 0000000000..964563d152
> --- /dev/null
> +++ b/package/bayer2rgb-neon/bayer2rgb-neon.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# bayer2rgb-neon
> +#
> +################################################################################
> +
> +BAYER2RGB_NEON_VERSION = v0.4
> +BAYER2RGB_NEON_SOURCE = bayer2rgb-neon-$(BAYER2RGB_NEON_VERSION).tar.bz2
> +BAYER2RGB_NEON_SITE = https://git.phytec.de/bayer2rgb-neon/snapshot
> +
> +BAYER2RGB_NEON_LICENSE = GPL-3.0
> +BAYER2RGB_NEON_LICENSE_FILES = COPYING
> +
> +BAYER2RGB_NEON_INSTALL_STAGING = YES
> +
> +BAYER2RGB_NEON_DEPENDENCIES += host-pkgconf host-gengetopt

+= was not needed, a simple = is sufficient here

> +
> +BAYER2RGB_NEON_CONF_OPTS = --prefix="/usr"

This is not needed, as the autotools-package infrastructure already
passes the --prefix option.

> +BAYER2RGB_NEON_AUTORECONF = YES
> +
> +BAYER2RGB_NEON_CFLAGS = $(TARGET_CFLAGS)
> +BAYER2RGB_NEON_CFLAGS += -mfpu=neon
> +
> +BAYER2RGB_NEON_CONF_ENV = CFLAGS=" $(BAYER2RGB_NEON_CFLAGS)"

This was unnecessarily complicated:

BAYER2RGB_NEON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -mfpu=neon"

is sufficient.

I've applied with those changes. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package
  2019-03-29 20:16 ` [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: " Thomas Petazzoni
@ 2019-04-02 12:46   ` Éloi Bail
  0 siblings, 0 replies; 4+ messages in thread
From: Éloi Bail @ 2019-04-02 12:46 UTC (permalink / raw)
  To: buildroot

> Hello Eloi,

> I have applied your patch, but after a fair number of changes, see
> below for the details.
Hi Thomas, 

Thanks for adding those changes before merging my patches ! 

Eloi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190402/88d46be6/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-02 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 15:34 [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: new package Eloi Bail
2019-03-14 15:34 ` [Buildroot] [PATCH 2/2] package/gst1-plugins-bayer2rgb-neon: " Eloi Bail
2019-03-29 20:16 ` [Buildroot] [PATCH 1/2] package/bayer2rgb-neon: " Thomas Petazzoni
2019-04-02 12:46   ` Éloi Bail

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.