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. Displaying RGB frame effectively
Forum Update on Monday, May 27th 2025

Displaying RGB frame effectively

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 684 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.
  • V Offline
    V Offline
    Venkateswaran
    wrote on last edited by
    #1

    Hi All,

    I have an RGB video frame in my c++ buffer. How do I display it in Qt5 effectively?

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

      Hi,

      How are you getting these frame ?
      Where do they come from ?
      How big are they ?

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

        Frames are decoded using ffmpeg and it's an RGB AVFrame structure(1280*720/ 8 bitdepth). I've seen some examples in stackoverflow, but those are doing copy paste of every pixel value from AVFrame to Qimage. Is there any way to directly feed AVFrame data [] pointer to Qimage.?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Venkateswaran said in Displaying RGB frame effectively:

          Is there any way to directly feed AVFrame data [] pointer to Qimage.?

          Simply take a look at the various QImage ctors

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

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

            Depending on the lifetime of the AVFrame and the QImage, you may not have a choice with regard to the copy.

            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
            1

            • Login

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