Ultrasound Image Viewer - Qt + SGX
-
Upload
prabindh-sundareson -
Category
Technology
-
view
1.197 -
download
0
description
Transcript of Ultrasound Image Viewer - Qt + SGX
![Page 2: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/2.jpg)
Qt Dynamic Image Viewer based on v3dfx-base
• This implementation tests video/image streaming functionality via SGX GPU, using V3dfxGLScene, for an Ultrasound image viewer. – This application draws data into a GraphicsView with
V3dfxGLScene, and updates data in drawBackground()• This application showcases the capability of v3dfx-base,
with ARGB input, with multiple (128 layers of) blending, all with <10% CPU loading– With a regular glTexImage2D mode of texturing, this would
take 100% CPU, and lower fps rates• Every frame shows a different angle of view
![Page 3: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/3.jpg)
Qt UltraSound Image Viewer
![Page 4: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/4.jpg)
Source Code
• https://github.com/prabindh/v3dfx-base/tree/master/test/platforms/qt_ultrasound
• Introduction to v3dfx-base in following pages
![Page 5: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/5.jpg)
V3dfx-base Introduction• Allows applications to integrate video streaming with SGX
without writing platform specific code in a re-usable way– Support for imgstream AND eglimage through same API
5
v3dfx-base
device n
channel 1 channel n
device n+1
channel 1 channel n
device n+2
channel n channel n
deviceClass = new TISGXStreamIMGSTREAMDevice(); texClass = new TISGXStreamTexIMGSTREAM();deviceClass->qTexImage2DBuf(paArray);deviceClass->dqTexImage2DBuf(freeArray);
deviceClass = new TISGXStreamEGLIMAGEDevice(); texClass = new TISGXStreamTexEGLIMAGE();deviceClass->qTexImage2DBuf(paArray);deviceClass->dqTexImage2DBuf(freeArray);
![Page 6: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/6.jpg)
Is / Is Not
•Handles rapidly changing textures (RGB, YUV)
•Supports imgstream•Supports eglimage•Supports both imgstream
and eglimage with single API
•Reusable class, delivered as “v3dfx-base.a” (ARM library)
•Needs Graphics SDK with eglimage/imgstream support
•Targeted to support multi-threaded operation (WIP)
•Targeted to support cropping (WIP)
WHAT IT IS
•Does not initialise GL state, EGL state for application
•Does not do drawing (glDrawArray, glDrawElement)
•Does not do eglSwapBuffer
•Does not provide fancy GLSL shaders
WHAT IT IS NOT
6
![Page 7: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/7.jpg)
Underneath the hood – Target Execution
7
v3dfx-base (v3dfx-base.a) library archive
Customer application
GL_IMG_texture_stream2 GL_OES_EGL_image_external
User Mode SGX binary
bufferclass_ti Kernel driver
User Mode SGX binary
SGX HW
v3dfx-base.a linked in app, Qt wrapper ..
-Contiguous buffer (preferred), allocated by customer application as texture input-Customer application does drawing in its native way-Dynamically update texture buffers using qTexImage2DBuf(), signal_draw() and dqTexImage2DBuf() calls
IMGSTREAM EGLIMAGE
![Page 8: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/8.jpg)
Underneath the hood – raw API
8
v3dfx-base
device n
channel 1 channel n
device n+1
channel 1 channel n
device n+2
channel n channel n
deviceClass = new TISGXStreamIMGSTREAMDevice(); texClass = new TISGXStreamTexIMGSTREAM();deviceClass->qTexImage2DBuf(paArray);deviceClass->dqTexImage2DBuf(freeArray);
deviceClass = new TISGXStreamEGLIMAGEDevice(); texClass = new TISGXStreamTexEGLIMAGE();deviceClass->qTexImage2DBuf(paArray);deviceClass->dqTexImage2DBuf(freeArray);
GL_IMG_texture_stream2 GL_OES_EGL_image_external
User Mode SGX binary
bufferclass_ti Kernel driver
User Mode SGX binary
SGX HW
![Page 9: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/9.jpg)
Class Description – IMGSTREAM class
9
![Page 10: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/10.jpg)
Class Description - EGLIMAGE class
10
![Page 11: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/11.jpg)
Target use-cases
11
v3dfx-base library
v3dfx templates(Barn-door, Mosaic
Qt
gstreamer
QGLWidget wrapper (completed)
QGraphicsItemwrapper
![Page 12: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/12.jpg)
QGLWidget Wrapper Class for v3dfx-base
12
![Page 13: Ultrasound Image Viewer - Qt + SGX](https://reader036.fdocuments.in/reader036/viewer/2022081507/555ada18d8b42a62528b4c88/html5/thumbnails/13.jpg)
Source Code organisation– Base API implementation
• v3dfx-base/api– Provides both imgstream and eglimage implementation as raw C++ classes
– Reusable Qt classes• v3dfx-base/platforms/Qt
– (GraphicsItem based) – in progress
• v3dfx-base/platforms/qtQGL – (QGLWidget based) – completed
– Test applications• v3dfx-base/test/imgstream
– Raw (full screen, no window manager) test for imgstream based streaming
• v3dfx-base/test/eglimage– Raw (full screen, no window manager) test for eglimage based streaming
• v3dfx-base/test/platforms/qtQGL– Qt – QGLWidget based class, test for both imgstream and eglimage
• v3dfx-base/test/platforms/qt– Qt – QGraphicsItem based class, test for both imgstream and eglimage (WIP)
13