Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. JPEG parameter mismatch in TX1

JPEG parameter mismatch in TX1

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NTNman
    wrote on last edited by VRonin
    #1

    Dear.

    I have a problem and question.
    I tested the QT5.7/Qt5.9/QT5.9 by my program in TK1 and TX1.
    But I always get the same results.

    In Jetson TX1 :
    JPEG prarameter struct mismatch: library thinks size is 584, caller expects 704.

    So I have a test to below comments.

    In Qtcreator, I called camera example.
    Build and action is all okay.

    But if I added opencv package, I could see the error results.

    camera.pro file in CAMERA Example.(qt5.9/qtmultimedia/examples/multimediawidgets/camera)

    unix: CONFIG += link_pkgconfig
    unix: PKGCONFIG += opencv
    

    I didn't modify the other files.

    I think, there is a mismatch issue between jpeg library of QT and jpeg library of OPENCV.

    I'd like to find the SOLUTION.
    If you have any question or opinion, let me know it.
    Thank you very much.

    NTNman.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NTNman
      wrote on last edited by
      #2

      My project is about deep learning.
      So I use CUDA and Caffe with opencv.

      Please refer to upper comments.
      Thanks.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        The only solution I'm aware of is to build both libraries with the same version of libjpeg.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        N 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          The only solution I'm aware of is to build both libraries with the same version of libjpeg.

          N Offline
          N Offline
          NTNman
          wrote on last edited by
          #4

          @SGaist
          Thanks for kind reply.

          BUt I think that jpeg library version is same in host PC and TX1. (libjpeg.so.8.0.2)
          I'm using cross-compile for QT 5.9 in TX1.
          So, I copied jpeg library file to tx1 rootfs in Hostpc from TX1.

          And when I use configure option for QT install.
          ./configure -opengl es2 -make libs -make tools -qt-xcb -qpa xcb -system-libjpeg - sysroot ~/tx1/64-TX1-Linux-for_Tegra_tx1/rootfs -device linux-jetson-tx1-g++ -device-option CROSS_COMPILE=~/linara-aarch64-linux-gnu-5.3.1/bin/aarch64-linux-gnu- -prefix /usr/local/qt50-tx1 -opensource -nomake examples -nomake tests -confirm-license -v

          I used -system-libjpeg option.

          Is it right? I don't have any idea for this issue.
          I must use absolutely opencv for caffe.

          Please help again.
          Thanks for kind help.
          NTN man.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            The library should be found on the root file system (did you install the corresponding dev packages ?)

            Enable the -v option of configure and check that it's indeed the library you want to use that is found.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • N Offline
              N Offline
              NTNman
              wrote on last edited by
              #6

              Dear SGaist.
              Thanks for reply.

              yes. As you can see the upper comments, I use rootfs for TX1 in host PC
              (location : ~/TX1/64_TX1/Linux_for_Tegra_tx1/roofs)

              And when I use QT configuration, the comments are :

              Build options:
              Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 c++14 c++1z clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus doubleconversion egl eglfs egl_x11 enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gstreamer-1.0 harfbuzz iconv icu inotify ipv6ifname kms large-config largefile libudev linuxfb medium-config minimal-config mremap neon nis no-qml-debug opengl opengles2 openssl png poll_ppoll posix_fallocate qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib threadsafe-cloexec use_gold_linker xcb xcb-glx xcb-plugin xcb-qt xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender
              Build parts ............ libs tools
              Mode ................... release
              Using sanitizer(s)...... none
              Using C++ standard ..... c++1z
              Using gold linker....... yes
              Using new DTAGS ........ yes
              Using PCH .............. no
              Using LTCG ............. no
              Target compiler supports:

              Qt modules and options:
              Qt D-Bus ............... yes (loading dbus-1 at runtime)
              Qt Concurrent .......... yes
              Qt GUI ................. yes
              Qt Widgets ............. yes
              Large File ............. yes
              QML debugging .......... no
              Use system proxies ..... no

              Support enabled for:
              Accessibility .......... yes
              ALSA ................... yes
              CUPS ................... no
              DoubleConversion........ yes (bundled copy)
              Evdev .................. yes
              FontConfig ............. yes
              FreeType ............... yes (system library)
              Glib ................... yes
              GStreamer .............. yes (1.0)
              GTK platformtheme ...... no
              HarfBuzz ............... yes (bundled copy)
              Iconv .................. yes
              ICU .................... yes
              Image formats:
              GIF .................. yes (plugin, using bundled copy)
              JPEG ................. yes (plugin, using system library)
              PNG .................. yes (in QtGui, using system library)
              libinput................ no
              Logging backends:
              journald ............... no
              syslog ............... no
              mtdev .................. no
              Networking:
              getaddrinfo .......... yes
              getifaddrs ........... yes
              IPv6 ifname .......... yes
              libproxy.............. no
              OpenSSL .............. yes (loading libraries at run-time)
              NIS .................... yes
              OpenGL / OpenVG:
              EGL .................. yes
              OpenGL ............... yes (OpenGL ES 2.0+)
              OpenVG ............... no
              PCRE ................... system
              pkg-config ............. yes
              PulseAudio ............. no
              QPA backends:
              DirectFB ............. no
              EGLFS ................ yes
              EGLFS i.MX6 ........ no
              EGLFS i.MX6 Wayland. no
              EGLFS EGLDevice .... no
              EGLFS GBM .......... no
              EGLFS Mali ......... no
              EGLFS Raspberry Pi . no
              EGLFS X11 .......... yes
              LinuxFB .............. yes
              Mir client............ no
              XCB .................. yes (bundled copy)
              EGL on X ........... yes
              GLX ................ yes
              MIT-SHM ............ yes
              Xcb-Xlib ........... yes
              Xcursor ............ yes (loaded at runtime)
              Xfixes ............. yes (loaded at runtime)
              Xi2 ................ yes
              Xrandr ............. yes (loaded at runtime)
              Xrender ............ yes
              XKB ................ yes
              XShape ............. yes
              XSync .............. yes
              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........... yes (bundled copy, XKB config root: /usr/share/X11/xkb)
              xkbcommon-evdev......... no
              zlib ................... yes (system library)

              Please refer to upper comments.
              Thanks.
              NTNman.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                I did see your upper comments. The thing I'd like you to check when using -v is that it's indeed the libjpeg you want to use that is found when the tests are run.

                Another point, did you build OpenCV yourself or do you use the one from the distribution on your rootfs ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                N 1 Reply Last reply
                0
                • SGaistS SGaist

                  I did see your upper comments. The thing I'd like you to check when using -v is that it's indeed the libjpeg you want to use that is found when the tests are run.

                  Another point, did you build OpenCV yourself or do you use the one from the distribution on your rootfs ?

                  N Offline
                  N Offline
                  NTNman
                  wrote on last edited by
                  #8

                  @SGaist
                  Thanks for kind reply.

                  When I execute QT configuration, I always use '-v' option. But I couldn't find any information for libjpeg.

                  I use two method.

                  1. Download version (both 2.4.13 and 3.1.0) and compiled in TX1 and TX1. And then I copied them to host PC rootfs from TK1 and TX1.

                  2)Using opencv4tegra through Nvidia JetPack (JetPack-L4T-2.3.1-linux-x64.run)

                  But results is always same.
                  This issue is occured in TX1 and TK1.

                  Plesase refer to upper comment.
                  And if you have more question or information, let me know it.
                  Thank you for very kind help.

                  NTNman.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Then I'd check the presence of several versions of the jpeg library on your system e.g. an optimised version bundled with OpenCV.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kuzulis
                      Qt Champions 2020
                      wrote on last edited by
                      #10

                      I had similar issue, but on TK1 board. You should use libjpeg from NVidia. Usually, this library is in /lib/nvidia (or in something else directory). Just use, e.g. LD_LIBRARY_PATH=<path/to/nvidia/libjpeg> directly, before starting of your application.

                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved