SlideShare a Scribd company logo
1 of 33
Download to read offline
A Vulkan Video Encoder
from Mesa to GStreamer
Hyunjun Ko / Stéphane Cerveau
2024-01-06
1
2
Agenda
1. Vulkan Video
2. Mesa - driver
3. GStreamer - application
4. Demos
3
Vulkan Video
Stateless codecs using GPU hardware acceleration
Supported codecs: H.264, H.265, AV1
Closer integration with Graphics and Displays.
Cross-platform and vendor-neutral low-level HW state(-
less) video codecs API
Each driver can operate differently depending on its
capabilities with a common API.
4
Vulkan Video Timeline
March 2018: TSG was created and driven by IHVs such
as AMD/Intel/Nvidia and open source operators
April 2021: including
the Video Decode and Encode extensions
January 2023: Video Extensions for Accelerated H.264
and H.265 Decode
December 2023: Khronos Vulkan Video
Extensions for Accelerated H.264 and H.265 Encode
Provisional extensions released
released
finalized
5
Encoding basics
6
Vulkan Video Encoding
7
The status of
Vulkan Video Encoder Support
in Mesa project
8
Contents
What is Mesa?
History of Vulkan Video development in Mesa
Drivers supporting Vulkan Video in Mesa
Development of Vulkan Video Encoding on Intel GPUs
Challenges
Plan
9
What is Mesa?
Began as an open source implementation of the
OpenGL.
Now actively implementing Vulkan specification on
various GPUs.
Intel, AMD, Qualcomm Adreno(R/E), Raspberry PI, etc..
Contributors: Igalia, Intel, Google, Collabora, Mesa
community.
https://mesa3d.org/
https://gitlab.freedesktop.org/mesa/mesa
10
History of Vulkan Video development in
Mesa
Dave Airlie started in 2022 on AMD and Intel GPU(RADV
and ANV)
With on FFmpeg.
Igalia joined on GStreamer later.
Hyunjun joined in 2023, started working on Intel
GPU(ANV)
So Dave fully dedicated to AMD GPU(RADV).
Dave's blog post
Lynne
11
The status of Vulkan Video development
in Mesa
Implemented and landed decoder first for h264 and
h265.
Now MR for h264/5 encoding are almost ready.
ANV H264 MR #20782
ANV H265 MR #22202
RADV H264/265 MR #20388
RADV MR
ANV Branch
12
Drivers supporting Vulkan
Video in Mesa
GPU H264 dec H265 dec H264 enc H265 enc
Intel(ANV) O O WIP WIP
AMD (RADV) O O Ready Ready
13
Working on Intel GPUs (1)
Dived into Intel Vulkan driver(ANV) in 2023.
Started working on H265 decoding first.
Tons of documents and source code of Intel VAAPI
drivers.
Exhausted to learn lots of Video commands.
But better than nothing :)
14
Working on Intel GPUs (2)
H265 Encoding Sequnce
15
Working on Intel GPUs (3)
Complete each command very carefully.
Otherwise you got a GPU hang or even whole system
down.
When you get a GPU hang and don't see any clue.
Dumping whole video commands encoding a frame(by
VAAPI Driver) into a file.
Compare to commands that you created
16
Working on Intel GPUs (4)
Thanks to the existing infrastrutures of ANV
Easy to handle memories and images.
Thanks to ANV maintainers.
They actively reviewed relevant merge requests.
17
Co-working with
Applications
GStreamer, VK CTS, FFMpeg...
Each uses different parameters and makes it find bugs
easily.
Different resolution, profile, SPS, PPS parameters.
18
Challenges
GPU hang.
Not enough useful tools to investigate.
Lots of generations of Intel GPUs.
Different commands, parameters, memory size,
alignment, etc...
19
Plan 2024
Land h264/h265 encoding support.
AV1 support.
Support other GPUs?
20
a 20-year-old framework for streaming media
applications.
Black boxes interconnection system
Native, multiplatform, highly-optimized framework
21
GStreamer pipeline
22
Vulkan Video support
Follow
Vulkan H.264 decoder in December 2023
Vulkan H.264/H.265 encoder .
Vulkan Video Status
merged
under review
23
State machine
24
Challenges
25
Cross platform API
Hardware crashes, Thanks Validation Layers!
Exact behavior varies by hardware vendor
Rate control and quality issues
26
Synchronization
Major issues with both decoder and encoder
Old memories from Vulkanised 2023, green screen...
Rework of GStreamer state machine with memory
barriers, fences.
GstVulkanOperation to handle commands
synchronization.
27
DPB management
Understand the correct use of Begin and Encode
reference slots.
Need to declare the reference within Begin command
and use it during the Encode command.
Various crashes in drivers not detected by the Validation
Layers when the standard H.26x parameters (SPS, slice
header) were not filled properly.
Vulkan reference slots management.
28
Vulkan tooling
Validation Layers:
Help validate we understand the specifications correctly
Do not prevent a misconfiguration of the std parameters
Mesa drivers helped to understand driver's pitfalls when
VL was clear.
GFXReconstruct, VK_LAYER_LUNARG_api_dump layer.
CTS: Help with a reference design reviewed by IHVs.
29
Demos
30
Questions ?
31
Thanks
Join us!
https://www.igalia.com/jobs
32
33

More Related Content

Similar to Implementing a Vulkan Video Encoder From Mesa to GStreamer

turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...IMTC
 
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...“A New, Open-standards-based, Open-source Programming Model for All Accelerat...
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...Edge AI and Vision Alliance
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boardsLF Events
 
CUDA by Example : Getting Started : Notes
CUDA by Example : Getting Started : NotesCUDA by Example : Getting Started : Notes
CUDA by Example : Getting Started : NotesSubhajit Sahu
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitIgalia
 
DCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs
 
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsightlaparuma
 
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono..."The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...Edge AI and Vision Alliance
 
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDocker, Inc.
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvementswonderu
 
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Intel® Software
 
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon SelleyPT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon SelleyAMD Developer Central
 
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs   from fiction t...Embedded Recipes 2018 - Upstream multimedia on amlogic so cs   from fiction t...
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...Anne Nicolas
 
ScalaMatrix gpu accelerated video display
ScalaMatrix gpu accelerated video displayScalaMatrix gpu accelerated video display
ScalaMatrix gpu accelerated video displayscalawox
 
3D Video Programming for Android
3D Video Programming for Android3D Video Programming for Android
3D Video Programming for AndroidYoss Cohen
 

Similar to Implementing a Vulkan Video Encoder From Mesa to GStreamer (20)

turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...
Development of a 4K Main 10 Profile HEVC Encoder for Great Improvements in Co...
 
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...“A New, Open-standards-based, Open-source Programming Model for All Accelerat...
“A New, Open-standards-based, Open-source Programming Model for All Accelerat...
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boards
 
CUDA by Example : Getting Started : Notes
CUDA by Example : Getting Started : NotesCUDA by Example : Getting Started : Notes
CUDA by Example : Getting Started : Notes
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
 
Google tv
Google tvGoogle tv
Google tv
 
DCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs Company Presentation
DCC Labs Company Presentation
 
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight
[03 2][gpu용 개발자 도구 - parallel nsight 및 axe] gateau parallel-nsight
 
Video cards
Video cardsVideo cards
Video cards
 
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono..."The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
 
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
 
DRIVE PX 2
DRIVE PX 2DRIVE PX 2
DRIVE PX 2
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvements
 
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
 
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon SelleyPT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
 
Arm
ArmArm
Arm
 
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs   from fiction t...Embedded Recipes 2018 - Upstream multimedia on amlogic so cs   from fiction t...
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...
 
ScalaMatrix gpu accelerated video display
ScalaMatrix gpu accelerated video displayScalaMatrix gpu accelerated video display
ScalaMatrix gpu accelerated video display
 
3D Video Programming for Android
3D Video Programming for Android3D Video Programming for Android
3D Video Programming for Android
 

More from Igalia

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Igalia
 
Async page flip in DRM atomic API
Async page flip in DRM  atomic APIAsync page flip in DRM  atomic API
Async page flip in DRM atomic APIIgalia
 

More from Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...
 
Async page flip in DRM atomic API
Async page flip in DRM  atomic APIAsync page flip in DRM  atomic API
Async page flip in DRM atomic API
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Implementing a Vulkan Video Encoder From Mesa to GStreamer

  • 1. A Vulkan Video Encoder from Mesa to GStreamer Hyunjun Ko / Stéphane Cerveau 2024-01-06 1
  • 2. 2
  • 3. Agenda 1. Vulkan Video 2. Mesa - driver 3. GStreamer - application 4. Demos 3
  • 4. Vulkan Video Stateless codecs using GPU hardware acceleration Supported codecs: H.264, H.265, AV1 Closer integration with Graphics and Displays. Cross-platform and vendor-neutral low-level HW state(- less) video codecs API Each driver can operate differently depending on its capabilities with a common API. 4
  • 5. Vulkan Video Timeline March 2018: TSG was created and driven by IHVs such as AMD/Intel/Nvidia and open source operators April 2021: including the Video Decode and Encode extensions January 2023: Video Extensions for Accelerated H.264 and H.265 Decode December 2023: Khronos Vulkan Video Extensions for Accelerated H.264 and H.265 Encode Provisional extensions released released finalized 5
  • 8. The status of Vulkan Video Encoder Support in Mesa project 8
  • 9. Contents What is Mesa? History of Vulkan Video development in Mesa Drivers supporting Vulkan Video in Mesa Development of Vulkan Video Encoding on Intel GPUs Challenges Plan 9
  • 10. What is Mesa? Began as an open source implementation of the OpenGL. Now actively implementing Vulkan specification on various GPUs. Intel, AMD, Qualcomm Adreno(R/E), Raspberry PI, etc.. Contributors: Igalia, Intel, Google, Collabora, Mesa community. https://mesa3d.org/ https://gitlab.freedesktop.org/mesa/mesa 10
  • 11. History of Vulkan Video development in Mesa Dave Airlie started in 2022 on AMD and Intel GPU(RADV and ANV) With on FFmpeg. Igalia joined on GStreamer later. Hyunjun joined in 2023, started working on Intel GPU(ANV) So Dave fully dedicated to AMD GPU(RADV). Dave's blog post Lynne 11
  • 12. The status of Vulkan Video development in Mesa Implemented and landed decoder first for h264 and h265. Now MR for h264/5 encoding are almost ready. ANV H264 MR #20782 ANV H265 MR #22202 RADV H264/265 MR #20388 RADV MR ANV Branch 12
  • 13. Drivers supporting Vulkan Video in Mesa GPU H264 dec H265 dec H264 enc H265 enc Intel(ANV) O O WIP WIP AMD (RADV) O O Ready Ready 13
  • 14. Working on Intel GPUs (1) Dived into Intel Vulkan driver(ANV) in 2023. Started working on H265 decoding first. Tons of documents and source code of Intel VAAPI drivers. Exhausted to learn lots of Video commands. But better than nothing :) 14
  • 15. Working on Intel GPUs (2) H265 Encoding Sequnce 15
  • 16. Working on Intel GPUs (3) Complete each command very carefully. Otherwise you got a GPU hang or even whole system down. When you get a GPU hang and don't see any clue. Dumping whole video commands encoding a frame(by VAAPI Driver) into a file. Compare to commands that you created 16
  • 17. Working on Intel GPUs (4) Thanks to the existing infrastrutures of ANV Easy to handle memories and images. Thanks to ANV maintainers. They actively reviewed relevant merge requests. 17
  • 18. Co-working with Applications GStreamer, VK CTS, FFMpeg... Each uses different parameters and makes it find bugs easily. Different resolution, profile, SPS, PPS parameters. 18
  • 19. Challenges GPU hang. Not enough useful tools to investigate. Lots of generations of Intel GPUs. Different commands, parameters, memory size, alignment, etc... 19
  • 20. Plan 2024 Land h264/h265 encoding support. AV1 support. Support other GPUs? 20
  • 21. a 20-year-old framework for streaming media applications. Black boxes interconnection system Native, multiplatform, highly-optimized framework 21
  • 23. Vulkan Video support Follow Vulkan H.264 decoder in December 2023 Vulkan H.264/H.265 encoder . Vulkan Video Status merged under review 23
  • 26. Cross platform API Hardware crashes, Thanks Validation Layers! Exact behavior varies by hardware vendor Rate control and quality issues 26
  • 27. Synchronization Major issues with both decoder and encoder Old memories from Vulkanised 2023, green screen... Rework of GStreamer state machine with memory barriers, fences. GstVulkanOperation to handle commands synchronization. 27
  • 28. DPB management Understand the correct use of Begin and Encode reference slots. Need to declare the reference within Begin command and use it during the Encode command. Various crashes in drivers not detected by the Validation Layers when the standard H.26x parameters (SPS, slice header) were not filled properly. Vulkan reference slots management. 28
  • 29. Vulkan tooling Validation Layers: Help validate we understand the specifications correctly Do not prevent a misconfiguration of the std parameters Mesa drivers helped to understand driver's pitfalls when VL was clear. GFXReconstruct, VK_LAYER_LUNARG_api_dump layer. CTS: Help with a reference design reviewed by IHVs. 29
  • 33. 33