multithreading - Use of PBO and VBO -


my application (qt/opengl) needs upload, @ 25fps, bunch of videos ip camaras, , process applying:

  1. for each videos, demosaic filter, sharpening filter, lut , distortion docrretion.
  2. then need render in opengl (texture projection, etc..) picking 1 or more frames processed earlier
  3. then need show result widgets (qglwidget) , read pixels write movie file.

i try understand pros , cons of pbo , fbo, , picture following architecture want validate help:

  • i create 1 thread per video, capture in buffer (array of images). there 1 buffer video.
  • i create upload-filter-render thread aims to: a) upload frames gpu, b) apply filter gpu, c) apply composition , render texture
  • i let gui thread render in widget texture created in previous step.

for upload-frames-to-gpu process, guess best way use pbo (maybe 2 pbos) each video, load asynchronously frames.

for apply-filter-info-gpu, want use fbo seems best render-to-texture. first bind texture uploaded pbo, , render texture, filtered image. not sure use 1 fbo , change binding texture input , binding texture target according video upload, or use many fbos, videos upload.

finally, in order show result widget, use final texture rendered fbo. writing movie file, use pbo copy asynchronously pixels gpu cpu.

does seem correct?


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -