Modular Composition
Modular Composition
23.05.2014
S.C. Cracana
Outline
Context
Background
Existing work
Problems to be solved
Current work
Identified problems
Performance modeling
Experiments
Future work
Project background
Barco
Active markets
Entertainment
Defense & aerospace
Industrial
Health-care: Interactive patient care
Products
Integrated solution for interactive patient care that includes devices for
patients aimed at information delivery and entertainment
Current practice
General
Characteristics
Image display
[1]
System components
Software
User Interface
Image Processing
Pipeline
Custom Algorithms
Hardware
IMX 6
Atom N270
...
Identified problems
Use case
Input video stream formats to be
supported
Multicast UDP
RTP
1366x768
1920x1080
Hardware
Example
Medical Video Player
Network
Demux
Scaling
Player
Subtitles
Decoding
Buttons
Video/Audio
H264
Play/Pauze
Channel Select
[2]
qt-quickstreamer
Image Processing
Pipeline
C Wrapper for Matlab
Custom Algorithms
IMX 6
Atom N270
...
qt-quickstreamer
Pipeline Configuration
Image Processing
Pipeline
Performance Analysis
Custom Algorithms
IMX 6
Atom N270
...
Requirements
Expected Performance
qt-quickstreamer
Image Processing
Pipeline
Performance Analysis
Custom Algorithms
IMX 6
Atom N270
...
Requirements
R1
qt-quickstreamer
Image Processing
Pipeline
Performance Analysis
Custom Algorithms
IMX 6
Atom N270
...
Requirements
R2
Questions
A. How to model a GStreamer pipeline?
B. What are the steering parameters of a model?
C. How to evaluate the performance of a pipeline
on hardware?
D. What are the configurations that a pipeline
has?
E. How to integrate the modeling in the system?
Gstreamer
General
Provides
Pipeline architecture
Various processing elements
Tools for testing and profiling
Verbose debugging
GStreamer Pipeline
[3]
[1]
pads
[3]
[1]
Communication Content
Control:
Events: messages used for controlling media processing e.g. QOS, EOS,
Latency
Content:
[4]
[2]
Queues
[5]
Reference Pipeline
Takes a encoded video (h264) from a file, decodes it and displays it on the
screen
file src filter decoder colorspace ximage sink
To analyze the behavior and the throughput of each element queues are
placed in between elements
file src Q_filt filter Q_dec decoder Q_csp colorspace Q_sink ximage sink
Element
Configuration
File Src
Chunk
Queue
Maximum Size
Back pressure policy
Decoder
Sink
Maximum lateness
Runtime
Input stream
1920x1080
X264 encoding
Bitrate 20 Mbit/s
100 fps, 10 seconds
Running environment
Intel i7: #Cores 4, #Threads 8
OS: Ubuntu 12.04 64bits
Gstreamer-0.10
Nice: -20
Schedulling: SCHED_NORMAL
Performance of pipelines
Throughput = the amount of data data passes through
an element per second
End2end Latency = the time it takes to a buffer from the
first element of the pipeline until it's sent to the display
driver
Element latency = the time it takes to a buffer to be
processed by an element in a pipeline
Experiments ...
Measurements
SDF components
Actors: functionality, code, that must be executed
Rates: no of tokens produced while firing
Tokens: data units
Initial tokens: initial state
Channels: data dependencies/execution order
Firing rules: number of tokens that must be present on actors' input
for execution
[3]
Analysis
Consumption/production rate
Expected performance
Topology
Algorithms
Execution Time
Requirements
Size configuration
Determining
production/consumption rate
Runs for different video sequences would return different production rate
for the decoder
Filesrc plugin has a default size of 4Kb for each block it reads
4Kb blocks are then transformed into Buffers of 4Kb size and passed
further on the pipeline
Therefore, depending on the size of the file a different number of buffers
will be produced and fed into the decoder but the decoder will produce the
same amount of buffers (corresponding to the number of rendered frames)
Solution
Change the block size of the Filesrc for each file so that a input buffer
contains enough data for decoding a frame => (1 to 1
production/consumption)
Future steps
With branches
Bibliography
[1] CRitical SYSTem Engineering AcceLeration Use Case Definition D405.010
[2]
[3]
[4]
[5]
[6]