[Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue

Denis Shienkov denis.shienkov at gmail.com
Tue Nov 3 18:20:31 CET 2015


Hi Qt developers.

I have veeery slow video performance with Qt 5.5.1 and the video camera 
(frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video 
stream writes via HDMI interface to the monitor.

My stuff is:

* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
* Logitech c920 USB camera (supports 1920x1080 @ 30 Hz) [2]

I compiled Qt with this C++ flags:

{quote}
DISTRO_OPTS += hard-float

QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
                 /usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf

TEGRA_TK1_CFLAGS        = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS           += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS         += $$TEGRA_TK1_CFLAGS
{quote}

with the GStreamer v1.0 , the GL and the EGL (2.0, 3.0) support:

{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
  {quote}

Resulting configuration are following:

{quote}
Support enabled for:
   Accessibility .......... yes
   ALSA ................... yes
   CUPS ................... no
   Evdev .................. no
   FontConfig ............. no
   FreeType ............... qt
   Glib ................... no
   GStreamer .............. yes (1.0)
   GTK theme .............. no
   HarfBuzz ............... no
   Iconv .................. yes
   ICU .................... no
   Image formats:
     GIF .................. yes (plugin, using bundled copy)
     JPEG ................. yes (plugin, using bundled copy)
     PNG .................. yes (in QtGui, using bundled copy)
   journald ............... no
   libinput................ no
   mtdev .................. no
   Networking:
     getaddrinfo .......... yes
     getifaddrs ........... yes
     IPv6 ifname .......... yes
     libproxy.............. no
     OpenSSL .............. no
   NIS .................... no
   OpenGL / OpenVG:
     EGL .................. yes
     OpenGL ............... yes (OpenGL ES 2.0+)
     OpenVG ............... no
   PCRE ................... yes (bundled copy)
   pkg-config ............. yes
   PulseAudio ............. no
   QPA backends:
     DirectFB ............. no
     EGLFS ................ yes
       EGLFS i.MX6....... . no
       EGLFS KMS .......... yes
       EGLFS Mali ......... no
       EGLFS Raspberry Pi . no
       EGLFS X11 .......... yes
     LinuxFB .............. yes
     XCB .................. no
   Session management ..... yes
   SQL drivers:
     DB2 .................. no
     InterBase ............ no
     MySQL ................ no
     OCI .................. no
     ODBC ................. no
     PostgreSQL ........... no
     SQLite 2 ............. no
     SQLite ............... no
     TDS .................. no
   tslib .................. no
   udev ................... yes
   xkbcommon-x11........... no
   xkbcommon-evdev......... no
   zlib ................... yes (system library)
{quote}

I tried to launch the QtMultimedia's Camera example (which does not use 
QML) via SSH connection
to the Tegra's device, like:

= using LinuxFB =

{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}

= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_x11|
$ startx &
$ ./camera -platform eglfs
{quote}

= using EGLFS via KMS =

{quote}
$ export DISPLAY=
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_kms|
$ ./camera -platform eglfs
{quote}

Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps 
as I spoke before).

Use of EGLFS via KMS gives folloving error:

{quote}
Could not find DRM device
Aborted
{quote}

I found out in the google yours blog [3] from Laszlo Agocs in which 
Tegra Jetson is mentioned,
but there are no details about building, running and so on.

So, my question is:

* do you have any trics and recommendations how to properly compile Qt 
on Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of 
video?


BR,
Denis

===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3] 
https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151103/23a835a7/attachment.html>


More information about the Interest mailing list