SlideShare a Scribd company logo
Open First
Better APIs for Video Codec
accelerators
Olivier Crête
Who am I ?
At Collabora since 2007
Close to 5 years on VVoIP for Nokia Maemo / Meego
GStreamer core maintainer
Multimedia Lead
Embedded Recipes 2017 2
Type of codecs
●
Software
●
Hardware
– Small CPU/GPU to parse bitstream
●
Hardware Accelerators
– Need CPU software
●
USERSPACE LIBRARY!
Embedded Recipes 2017 3
Users of codecs
●
Players
●
Encoders / streamers
●
Transcoders
●
VoIP
●
Content creation software
Embedded Recipes 2017 4
Use cases
●
Broadcast production
– High quality, high bit-rate, high expectations
●
User generated content
– Medium quality, low expectations
●
Physical security
– Low quality, high latency, low cost
Embedded Recipes 2017 5
Use cases
●
Broadcast production
– High quality, high bitrate
●
End user playback
– Mobile
– TV / STB
Embedded Recipes 2017 6
Use cases
●
Video calls
– Latency, latency, low bitrate
●
Transcoding
– Live: Latency!
– Stored: Quality per bit
Embedded Recipes 2017 7
●
Exchange formats
– Encoded
– Raw
●
Memory allocation & registration
●
Metadata
●
Long term maintainability
Embedded Recipes 2017 8
Requirements
Exchange formats: Encoded
●
Packetization
– Frame
– Subframe
●
Variants
– H.264 AVC: AVC[1-4], byte-stream
Embedded Recipes 2017 9
Exchange formats: Raw content
●
Subsampling: 4:4:4, 4:2:2, 4:2:0, etc
●
Color space: BT.601, BT.709, BT.2020, BT.2100
– Critical for HDR
Embedded Recipes 2017 10
Exchange formats: Raw memory layout
●
Planar vs packed
●
Multiple planes
– Multiple DMAbuf fds
●
Alignment requirements
●
Tiled formats
●
Opaque, possible compressed formats
●
Padding, etc
Embedded Recipes 2017 11
Memory allocation & registration
●
External vs Internal allocation
– Import vs Export
●
Types of memory
– DMAbuf
– malloc()
Olivier Crête 12
Memory pre-allocation & dynamic allocation
●
Pre-registration
– No run-time allocation
– Hard real time
●
Dynamic allocation/registration
– Dynamic pipeline modifications
Embedded Recipes 2017 13
Metadata
●
Per frame metadata
– Timestamps and timecodes
– Vertical Ancillary data (VANC): AfD, etc
●
Inter-frame data
– SCTE-35/104
●
Ad insertion points
Embedded Recipes 2017 14
Latency information
●
Algorithmic latency
●
Processing latency
●
Deadline modes
Embedded Recipes 2017 15
Processing modes
●
Push based
●
Pull based
Embedded Recipes 2017 16
Long term maintainability
●
Living, maintained project
●
Open Source code, not a specification
●
Simple C API style
●
No large library dependency
Embedded Recipes 2017 17
●
OpenMAX IL
●
libv4l
●
VA-API
●
GStreamer
Embedded Recipes 2017 18
Current solutions
OpenMAX IL
●
Android's subset
●
Minimal largely incomplete vendor implementations
●
Dead  upstream , Khronos WG has not met in years“ ”
●
Spec lacks important features leading to fragmentation
●
Forces threading and allocation model
●
Whole framework
Embedded Recipes 2017 19
libv4l
●
“Transparent  wrapper over kernel API”
●
Similar limitations to v4l API
– Tied to kernel API rules
– Still breaks dmabuf/userptr
●
Only limited maintenance
Embedded Recipes 2017 20
VA-API
●
Requires complex code to use it
– See gst-vaapi or mfx
●
Specific codecs only
●
Almost Intel only
●
Only video
Embedded Recipes 2017 21
GStreamer
●
Whole framework
●
Forces specific way of working
– Threading
– Pipeline formation
– Allocations
●
Not designed for low latency
Embedded Recipes 2017 22
Others
●
FFmpeg / libav
●
MFT (Windows)
Embedded Recipes 2017 23
Simple Plugin API (SPA)
Pipewire
Embedded Recipes 2017 24
The solution I wish I had designed
●
Designed
– for Pipewire
– by Wim Taymans, GStreamer architect
Embedded Recipes 2017 25
Design principles
●
Very inspired by LV2 audio plugin API
●
No pipeline, no framework
●
Registered buffers
– but re-registerable in pause
●
Synchronous and asynchronous
●
Externally provided thread contexts
●
Not limited to codecs
Embedded Recipes 2017 26
Thank you!

More Related Content

POT
SIP servers on embedded systems: Powering SoHo communications
PDF
Developing rich SIP applications with SIPSIMPLE SDK
PDF
Adaptive Streaming of Traditional and Omnidirectional Media
PDF
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
PPT
JPEG2000 Alliance IBC 2009
PDF
Encoding at Scale for Live Video Streaming
PDF
Codethink elce 2017_maintaining_a_linux_kernel_for_13_years_you_must_be_kiddi...
PDF
VoIP Monitoring and Troubleshooting
SIP servers on embedded systems: Powering SoHo communications
Developing rich SIP applications with SIPSIMPLE SDK
Adaptive Streaming of Traditional and Omnidirectional Media
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
JPEG2000 Alliance IBC 2009
Encoding at Scale for Live Video Streaming
Codethink elce 2017_maintaining_a_linux_kernel_for_13_years_you_must_be_kiddi...
VoIP Monitoring and Troubleshooting

Similar to Embedded Recipes 2017 - Proper APIs to HW video codec accelerators - Olivier Crete (20)

PPTX
Mission Impossible: Boosting Video Streaming Quality While Reducing Bandwidth
PDF
In Need For A Linux Kernel Maintained For A Very Long Time? CIP Linux Kernel ...
PDF
Automating network configurations with open standards and tools by Victor Kua...
PPTX
Industrial Technology Multimedia Video Theory Prelim Course
DOC
Prashant Resume
PDF
A Study on FFmpeg Multimedia Framework
PDF
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
PDF
7 reasons why video conferencing world will never
PPT
Video Streaming - 4.ppt
PPTX
The next generation of protocols and APIs that could change streaming video
PDF
Genomics Deployments - How to Get Right with Software Defined Storage
PDF
Multi Streaming Player
PDF
MPEG Standards. Know What Video Format to Choose MPEG-2 or MPEG-4.pdf
PPTX
Managing the Customer Experience for Media – Web, Mobile, and Video
PDF
12 11 aug17 29may 7301 8997-1-ed edit satria
PPTX
FutureComm 2010: Video Quality Analysis and Measurement
PDF
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
PDF
Cincom Smalltalk 2017 Roadmap
PPTX
Монетизация сетевой инфраструктуры
Mission Impossible: Boosting Video Streaming Quality While Reducing Bandwidth
In Need For A Linux Kernel Maintained For A Very Long Time? CIP Linux Kernel ...
Automating network configurations with open standards and tools by Victor Kua...
Industrial Technology Multimedia Video Theory Prelim Course
Prashant Resume
A Study on FFmpeg Multimedia Framework
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
7 reasons why video conferencing world will never
Video Streaming - 4.ppt
The next generation of protocols and APIs that could change streaming video
Genomics Deployments - How to Get Right with Software Defined Storage
Multi Streaming Player
MPEG Standards. Know What Video Format to Choose MPEG-2 or MPEG-4.pdf
Managing the Customer Experience for Media – Web, Mobile, and Video
12 11 aug17 29may 7301 8997-1-ed edit satria
FutureComm 2010: Video Quality Analysis and Measurement
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
Cincom Smalltalk 2017 Roadmap
Монетизация сетевой инфраструктуры
Ad

More from Anne Nicolas (20)

PDF
Kernel Recipes 2019 - Driving the industry toward upstream first
PDF
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
PDF
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
PDF
Kernel Recipes 2019 - Metrics are money
PDF
Kernel Recipes 2019 - Kernel documentation: past, present, and future
PDF
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
PDF
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
PDF
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
PDF
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
PDF
Embedded Recipes 2019 - Making embedded graphics less special
PDF
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
PDF
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
PDF
Embedded Recipes 2019 - Testing firmware the devops way
PDF
Embedded Recipes 2019 - Herd your socs become a matchmaker
PDF
Embedded Recipes 2019 - LLVM / Clang integration
PDF
Embedded Recipes 2019 - Introduction to JTAG debugging
PDF
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
PDF
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
PDF
Kernel Recipes 2019 - Suricata and XDP
PDF
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Ad

Recently uploaded (20)

PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
August Patch Tuesday
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
The various Industrial Revolutions .pptx
PPTX
Modernising the Digital Integration Hub
DOCX
search engine optimization ppt fir known well about this
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Getting Started with Data Integration: FME Form 101
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
O2C Customer Invoices to Receipt V15A.pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
August Patch Tuesday
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
WOOl fibre morphology and structure.pdf for textiles
A novel scalable deep ensemble learning framework for big data classification...
The various Industrial Revolutions .pptx
Modernising the Digital Integration Hub
search engine optimization ppt fir known well about this
Getting started with AI Agents and Multi-Agent Systems
Getting Started with Data Integration: FME Form 101
1 - Historical Antecedents, Social Consideration.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Assigned Numbers - 2025 - Bluetooth® Document
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Enhancing emotion recognition model for a student engagement use case through...
Benefits of Physical activity for teenagers.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A comparative study of natural language inference in Swahili using monolingua...

Embedded Recipes 2017 - Proper APIs to HW video codec accelerators - Olivier Crete