From 2be1214cab336f4d71b86c0763091c4a822ca0c2 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 22 May 2017 11:23:33 +0200 Subject: [PATCH] add 'zynqultrascaleplus' as OMX target Adding support for the 'Zynq UltraScale+' as a new OMX target. See https://www.xilinx.com/products/silicon-devices/soc/zynq-ultrascale-mpsoc.html for details about the platform. https://bugzilla.gnome.org/show_bug.cgi?id=783097 --- config/Makefile.am | 2 +- config/meson.build | 2 ++ config/zynqultrascaleplus/Makefile.am | 6 ++++++ config/zynqultrascaleplus/gstomx.conf | 17 +++++++++++++++++ config/zynqultrascaleplus/meson.build | 1 + configure.ac | 9 +++++++-- meson.build | 2 ++ meson_options.txt | 2 +- 8 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 config/zynqultrascaleplus/Makefile.am create mode 100644 config/zynqultrascaleplus/gstomx.conf create mode 100644 config/zynqultrascaleplus/meson.build diff --git a/config/Makefile.am b/config/Makefile.am index 3b467a2804..bffcbb37b3 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -1 +1 @@ -SUBDIRS = bellagio rpi +SUBDIRS = bellagio rpi zynqultrascaleplus diff --git a/config/meson.build b/config/meson.build index fda967049b..1dcabe97b7 100644 --- a/config/meson.build +++ b/config/meson.build @@ -2,4 +2,6 @@ if omx_target == 'rpi' subdir ('rpi') elif omx_target == 'bellagio' subdir ('bellagio') +elif omx_target == 'zynqultrascaleplus' + subdir ('zynqultrascaleplus') endif diff --git a/config/zynqultrascaleplus/Makefile.am b/config/zynqultrascaleplus/Makefile.am new file mode 100644 index 0000000000..01671c2583 --- /dev/null +++ b/config/zynqultrascaleplus/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = gstomx.conf + +if USE_OMX_TARGET_ZYNQ_USCALE_PLUS +configdir = $(sysconfdir)/xdg +config_DATA = gstomx.conf +endif diff --git a/config/zynqultrascaleplus/gstomx.conf b/config/zynqultrascaleplus/gstomx.conf new file mode 100644 index 0000000000..5231e46fbb --- /dev/null +++ b/config/zynqultrascaleplus/gstomx.conf @@ -0,0 +1,17 @@ +[omxh264enc] +type-name=GstOMXH264Enc +core-name=/usr/lib/libOMX.allegro.core.so.1 +component-name=OMX.allegro.h264.encoder +in-port-index=0 +out-port-index=1 +rank=257 +hacks=no-disable-outport + +[omxh264dec] +type-name=GstOMXH264Dec +core-name=/usr/lib/libOMX.allegro.core.so.1 +component-name=OMX.allegro.h264.decoder +in-port-index=0 +out-port-index=1 +rank=257 +hacks=no-disable-outport diff --git a/config/zynqultrascaleplus/meson.build b/config/zynqultrascaleplus/meson.build new file mode 100644 index 0000000000..dc99c08bc1 --- /dev/null +++ b/config/zynqultrascaleplus/meson.build @@ -0,0 +1 @@ +install_data (['gstomx.conf'], install_dir : omx_conf_dir) diff --git a/configure.ac b/configure.ac index 55d4b36ef9..b99c20af29 100644 --- a/configure.ac +++ b/configure.ac @@ -178,7 +178,7 @@ AC_ARG_ENABLE(Bsymbolic, LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"]) AC_ARG_WITH([omx-target], - AS_HELP_STRING([--with-omx-target],[Use this OpenMAX IL target (generic, bellagio, rpi)]), + AS_HELP_STRING([--with-omx-target],[Use this OpenMAX IL target (generic, bellagio, rpi, zynqultrascaleplus)]), [ac_cv_omx_target="$withval"], [ac_cv_omx_target="none"]) ac_cv_omx_target_struct_packing="none" @@ -195,13 +195,17 @@ case "${ac_cv_omx_target}" in bellagio) AC_DEFINE(USE_OMX_TARGET_BELLAGIO, 1, [Use Bellagio OpenMAX IL target]) ;; + zynqultrascaleplus) + AC_DEFINE(USE_OMX_TARGET_ZYNQ_USCALE_PLUS, 1, [Use Zynq UltraScale+ OpenMAX IL target]) + ;; none|*) - AC_ERROR([invalid OpenMAX IL target, you must specify one of --with-omx-target={generic,rpi,bellagio}]) + AC_ERROR([invalid OpenMAX IL target, you must specify one of --with-omx-target={generic,rpi,bellagio,zynqultrascaleplus}]) ;; esac AM_CONDITIONAL(USE_OMX_TARGET_GENERIC, test "x$ac_cv_omx_target" = "xgeneric") AM_CONDITIONAL(USE_OMX_TARGET_BELLAGIO, test "x$ac_cv_omx_target" = "xbellagio") AM_CONDITIONAL(USE_OMX_TARGET_RPI, test "x$ac_cv_omx_target" = "xrpi") +AM_CONDITIONAL(USE_OMX_TARGET_ZYNQ_USCALE_PLUS, test "x$ac_cv_omx_target" = "xzynqultrascaleplus") AC_ARG_WITH([omx-struct-packing], AS_HELP_STRING([--with-omx-struct-packing],[Force OpenMAX struct packing, (default is none)]), @@ -363,6 +367,7 @@ tools/Makefile config/Makefile config/bellagio/Makefile config/rpi/Makefile +config/zynqultrascaleplus/Makefile examples/Makefile examples/egl/Makefile m4/Makefile diff --git a/meson.build b/meson.build index d99d275185..042bf6026f 100644 --- a/meson.build +++ b/meson.build @@ -233,6 +233,8 @@ elif omx_target == 'rpi' endif elif omx_target == 'bellagio' cdata.set('USE_OMX_TARGET_BELLAGIO', 1) +elif omx_target == 'zynqultrascaleplus' + cdata.set('USE_OMX_TARGET_ZYNQ_USCALE_PLUS', 1) else error ('Unsupported omx target specified. Use the -Dwith_omx_target option') endif diff --git a/meson_options.txt b/meson_options.txt index 3274c0a399..5270645f3c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,3 @@ option('with_omx_header_path', type : 'string', value : '', description : 'An extra include directory to find the OpenMax headers') -option('with_omx_target', type : 'combo', choices : ['none', 'generic', 'rpi', 'bellagio'], value : 'none', description : 'The OMX platform to target') +option('with_omx_target', type : 'combo', choices : ['none', 'generic', 'rpi', 'bellagio', 'zynqultrascaleplus'], value : 'none', description : 'The OMX platform to target') option('with_omx_struct_packing', type : 'combo', choices : ['0', '1', '2', '4', '8'], value : '0', description : 'Force OpenMAX struct packing')