multi-threaded video rendering comp400 project – 2006 yohan launay
TRANSCRIPT
![Page 1: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/1.jpg)
Multi-Threaded Video Rendering
COMP400 Project – 2006
Yohan Launay
![Page 2: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/2.jpg)
Agenda
Basic System Description + Demo Quick Multi-threaded Programming Guide Video Channel Description Graphical Engine Description Results
![Page 3: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/3.jpg)
Basic System Description
Client system connected to a video server MPEG4 Streaming Multivision System (1 screen – X cameras) Client: OpenGL graphical engine + GTK GUI Existing system audited, re-designed & optimized:
Optimization for multi-core systems 100% Thread safe design MT Programming Guide Performances Gain
Live Demo !Live Demo !
![Page 4: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/4.jpg)
MT Programming Guide (1)
Modular System Mandatory 1 thread = 1 module (Core) Set of rules for safe MT programming (see
report) 1 mutex per core handled by the core itself
not externally Consequence: Extensive use of Controller &
Façade Pattern
![Page 5: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/5.jpg)
Graphical Engine Architecture Overview
![Page 6: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/6.jpg)
MT Programming Guide (2)
Mutex Class: Lock/Unlock (Existing) Guarantee exclusive access to resources
Synchronize Class (Optimization) Lock/Unlock – ExclusiveLock/ExclusiveUnlock Read/Write Access
AutoMutex Class (Ease of coding) Uses variable scope to lock/unlock Mutex
![Page 7: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/7.jpg)
Video Channel Description
Connect to the video stream Fetch picture Ask for display:
Use of flags and IDs – Avoid memory copy Try to save space (pictures are big > 1MB)
![Page 8: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/8.jpg)
Graphical Engine Description (1) OpenGL + GTK : need specific design Widget System
Widget (Abstract) WidgetContainer WidgetTexture
Chain of command: horizontal & vertical hierarchy
OpenGL: 1 Thread = 1 Rendering Context: Use of message pump / Command pattern
![Page 9: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/9.jpg)
Widgets Architecture
![Page 10: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/10.jpg)
Graphical Engine Description (2) Texture Register:
Avoid textures duplication in Graphical Card Manage texture loading and release Manage texture update
Extensive use of display lists Use of glTexSubImage: partial update On-demand display of channels
![Page 11: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/11.jpg)
Video Rendering Process
![Page 12: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/12.jpg)
Results
![Page 13: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/13.jpg)
Results
Optimized for dual-core systems Unlimited number of cameras on the screen,
performances limited by the hardware. 400 FPS multivisions ! (hardware related) Future Plans:
OpenGL Game Mode (no more window + GTK)
![Page 14: Multi-Threaded Video Rendering COMP400 Project – 2006 Yohan Launay](https://reader036.vdocuments.net/reader036/viewer/2022062423/5697c0211a28abf838cd2b5b/html5/thumbnails/14.jpg)
Contact InformationYohan Launay
Mail : [email protected] McGill : [email protected] MSDL: http://msdl.cs.mcgill.ca/people/yohan Past Work: http://hellaynnea.free.fr
Thank You For Your Attention!