Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Jpeg rendering
Forum Updated to NodeBB v4.3 + New Features

Jpeg rendering

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 5.5k Views 1 Watching
  • 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
    nopsoft.dk
    wrote on last edited by
    #1

    I'm writing an application to, among other tings, decode jpeg-files on the fly.
    Unfortunately, the Qt jpeg plugin performs less than optimal when compared to other decoders around.
    Besides performance, it's important that the decoder can be compiled and embedded directly in the distribution set, as deployment must be as simple as possible for all platforms of the project (win32, Linux).

    I would like to use libjeg (https://sourceforge.net/projects/libjpeg/) as the default engine, with ambitions of using libjpeg-turbo (https://sourceforge.net/projects/libjpeg-turbo/) when possible.

    Is this known territory in the forum?

    /Dan, nopsoft.dk

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Qt builds against it's own private copy of libjpeg if there is no system libjpeg. You can compile Qt yourself and tell it to use another jpeg lib (see "configure -help" output). But I doubt that you gain very much speed out of that (some fancy compiler optimizations may improve things a bit).

      As long as it's source compatible, libjpeg-turbo should work.

      On systems where it is already installed, Qt uses the system libjpeg.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nopsoft.dk
        wrote on last edited by
        #3

        Thanks for the answer.

        I've tried to make a small test program; It loads a jpeg 1000 times using first QImage(file) and libjpeg(file). The difference in decoding speeds is quite noticable, being about 20%. (I've made sure that caching is not an issue!)

        This seems to contradict your observations. Are you doing something "additional", such as manipulation LD_LIBRABRY_PATH (think I read something about this somewhere - but this wouldn't work in win32 anyway..)

        BR

        /Dan, nopsoft.dk

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          No, there is no additional library magic.

          But your are comparing apples and oranges. A QImage is a format agnostic container for pixel images. Qt has to decode the image data (using libjpeg in your case), transfer the data to its own structures, keep some internal data around, setup the implicit sharing and the like. If you just use libjpeg you have to stick to its data structures, no QImage is involved then.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nopsoft.dk
            wrote on last edited by
            #5

            I will update my test program, see if I can prove your point!

            BR

            /Dan, nopsoft.dk

            1 Reply Last reply
            0

            • Login

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