Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Real time renderer with QT sporadic time
Forum Updated to NodeBB v4.3 + New Features

Real time renderer with QT sporadic time

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.2k Views 3 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.
  • A Offline
    A Offline
    Astar
    wrote on last edited by
    #1

    Hello everyone,

    I'm currently working on a real time renderer, here are some informations :

    • it works at 50p (20ms for each frame)
    • the render loop is not a QThread for technical reasons

    The problem I'm facing is that the encoding library usually encode a frame in less that 10ms, but when I run it with the QT environment each 12 frames the encoding time rise to more than 60ms (roughly every 250 ms). It is a problem because some frames are dropped by the render loop. I tried to add a callback with QApplication::processEvents() in my render loop to see if it could smooth the sporadic time every 12 frames, it didn't work.

    I don't have an extended knowledge of QT, so 2 questions :

    • Do you know what could be the reason of this encoding time increase every 12 frames, QT is responsible but I don't know what it is doing ?
    • Do you know a better approach that could help me smooth the time over the rest of the encoded frame (encoding time is ok) ?

    Thank you

    Astar

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

      Hi and welcome to devnet,

      Might be event handling from your application.

      In any case, you should consider offloading the encoding to a secondary thread even if it's not a QThread.

      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
      • A Offline
        A Offline
        Astar
        wrote on last edited by
        #3

        actually the encoding is using 14 threads, it looks like it works better if I don't use them all (like 12)

        mrjjM 1 Reply Last reply
        0
        • A Astar

          actually the encoding is using 14 threads, it looks like it works better if I don't use them all (like 12)

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          14 threads ?
          What cpu are you using ?
          often its 4 cores, 8 threads so having 14 would demand a hi end workstation
          class cpu to actually be able to run all of them at same time.
          (which might not be needed but its worth mentioning)

          1 Reply Last reply
          2
          • A Offline
            A Offline
            Astar
            wrote on last edited by
            #5

            Hi,

            yes this is a High end worstation with a Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz,14 physical cores

            mrjjM 1 Reply Last reply
            0
            • A Astar

              Hi,

              yes this is a High end worstation with a Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz,14 physical cores

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              That is some sweet hardware :)

              Regarding the raise in encoding time. its very hard to guess at with no code.
              Could be anything.

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

                Also what are you using for encoding ?
                Which size are the frames you want to encode ?

                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

                • Login

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