11.07.2015 Views

2014 - ELCE - Sean Hudson - Case Study - Building a High Quality Video Pipeline Using GStreamer and V4Linux on an i.MX6_

2014 - ELCE - Sean Hudson - Case Study - Building a High Quality Video Pipeline Using GStreamer and V4Linux on an i.MX6_

2014 - ELCE - Sean Hudson - Case Study - Building a High Quality Video Pipeline Using GStreamer and V4Linux on an i.MX6_

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<str<strong>on</strong>g>Case</str<strong>on</strong>g> <str<strong>on</strong>g>Study</str<strong>on</strong>g>: <str<strong>on</strong>g>Building</str<strong>on</strong>g> a <str<strong>on</strong>g>High</str<strong>on</strong>g> <str<strong>on</strong>g>Quality</str<strong>on</strong>g><str<strong>on</strong>g>Video</str<strong>on</strong>g> <str<strong>on</strong>g>Pipeline</str<strong>on</strong>g> <str<strong>on</strong>g>Using</str<strong>on</strong>g> <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g><str<strong>on</strong>g>V4Linux</str<strong>on</strong>g> <strong>on</strong> <strong>an</strong> i.<strong>MX6</strong><str<strong>on</strong>g>Se<strong>an</strong></str<strong>on</strong>g> <str<strong>on</strong>g>Huds<strong>on</strong></str<strong>on</strong>g>Embedded Linux Architect &Member of Technical Staffmentor.com/embeddedAndroid is a trademark of Google Inc. Use of this trademark is subject to Google Permissi<strong>on</strong>s. Linux is the registered trademark of Linus Torvalds in the U.S. <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> other countries.


What’s this presentati<strong>on</strong> for?nIntended audience— Aimed at those c<strong>on</strong>sidering a Linux based video project,specifically <strong>on</strong> <strong>an</strong> i.<strong>MX6</strong> boardnWhat will be covered?— Key technologies used to build the product— What we learned (good, bad, & ugly)nPrimary goal of this presentati<strong>on</strong>— Help folks get a running start <strong>on</strong> a similar project3<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


OutlinennnnProject BackgroundHardware Comp<strong>on</strong>entsSoftware Comp<strong>on</strong>entsFinal Thoughts4<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


PROJECT BACKGROUND5<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


Project BackgroundnnnnnnnnnnServices engagement that r<strong>an</strong> from the end of 2012 – theend of 2013Replacing <strong>an</strong> older, FPGA based designA customized, portable design based <strong>on</strong> the i.<strong>MX6</strong>Device processes <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> displays video from twoindependent sensorsDevice output to a built-in OLED display or a c<strong>on</strong>nectedHDMI m<strong>on</strong>itorDisplays sensor input either singly or combinedSensor 1 input was 1280x1024 at up to 60 FPSSensor 2 input was 640x480 at up to 30 FPSDesired latency for all modes was < 100ms at 30 FPSIntended as a reusable platform for future products6<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


Starting, Known Project ChallengesnnnnnAdditi<strong>on</strong>al algorithmic processing of images would berequired, so CPU utilizati<strong>on</strong> should be kept as low aspossibleCustomer w<strong>an</strong>ted the complete software stack developedin < 12 m<strong>on</strong>thsHardware was in development <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> wasn’t scheduled to beavailable for ~3 m<strong>on</strong>thsSeveral comp<strong>on</strong>ents were new, including the sensorsSmall team, ~3 software engineers7<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


HARDWARE COMPONENTS8<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> - SOCnnnnnnQuad-core Cortex A9ARM NEON SIMD with each core3D Graphics Processing Unit (GPU)2x Image Processing Units (IPU)Additi<strong>on</strong>al device <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> bus supportHad existing software support9<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> Hardware Availability StrategynnIn order to account for the initial, scheduled delay of thehardware, we opted to use Sabre Lite boards to beginworking <strong>on</strong> the software stack.This proved to be quite valuable due to additi<strong>on</strong>al delaysin the actual hardware being available.nTake Away: If you are building a custom, i.<strong>MX6</strong> designfor your video processing product, getting a referenceboard, e.g. the Sabre-Lite, c<strong>an</strong> allow some softwaredevelopment to c<strong>on</strong>tinue when the hardware is invariablylate.10<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> – IPUnnExpectati<strong>on</strong>:— IPU hardware accelerated c<strong>on</strong>versi<strong>on</strong> of sensor input <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> tr<strong>an</strong>sferof data framesOutcome:— The sensor selecti<strong>on</strong>s prevented the hardware from being useddirectly for some import<strong>an</strong>t frame c<strong>on</strong>versi<strong>on</strong> operati<strong>on</strong>s,specifically, the input frame format was not understood by theIPUs <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> so a raw data mode was used to tr<strong>an</strong>sfer data from thebus into the video pipeline, however, frame c<strong>on</strong>versi<strong>on</strong> wasrequired in software that wasn’t expected.— Worked great for some things like re-sizing frames, but were inlimited supply <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> had to be carefully allocated to ensure thatc<strong>on</strong>tenti<strong>on</strong> over the IPU wouldn’t occur11<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> – NEONnnnExpectati<strong>on</strong>:— NEON instructi<strong>on</strong>s would run in parallel with ARM core instructi<strong>on</strong>s(offload)— NEON would provide signific<strong>an</strong>t computati<strong>on</strong>al resources that wouldhelp fill the requirement for additi<strong>on</strong>al algorithmsOutcome:— The ARM core is tightly couple to NEON <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> c<strong>an</strong> not be utilizedseparately— This reduced the expected parallel computing capabilities of theplatform <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> increased c<strong>on</strong>tenti<strong>on</strong> for resources— We found that the NEON SIMD were well suited to the computati<strong>on</strong>srequired, however, we r<strong>an</strong> into issues with c<strong>on</strong>tenti<strong>on</strong> due to thenumber of operati<strong>on</strong>s required of themTakeaway— M<strong>an</strong>aging the specific hardware resources assigned to a taskbecomes critically import<strong>an</strong>t to meeting perform<strong>an</strong>cetargets. (See later slide <strong>on</strong> how we enforced this)12<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


SensorsnnnExpectati<strong>on</strong>:— The sensors were c<strong>on</strong>nected via well defined interfaces <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>would be able to utilize the IPU to tr<strong>an</strong>sfer the frame, c<strong>on</strong>vert theformat for internal use, <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> resize, as necessary.Outcome:— Both sensors output frames in a format that the IPU could noth<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>le directly.— “Raw Mode” tr<strong>an</strong>sfers enabled the DMA tr<strong>an</strong>sfer of the frames— Additi<strong>on</strong>al work was required to c<strong>on</strong>vert these frames into theproper format for use in the <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> pipeline— IPU worked well to resize frames as well, but <strong>on</strong>ly afterc<strong>on</strong>versi<strong>on</strong>Takeaway— The frame c<strong>on</strong>versi<strong>on</strong>s dominated the work <strong>on</strong> thisproject. They also c<strong>on</strong>sumed a signific<strong>an</strong>t amount of thelatency budget.13<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> Platform – GPUnnExpectati<strong>on</strong>:— GPU would provide a raw computati<strong>on</strong> resource— openGL support, which was available, would provide efficient accessto the GPU processing capabilitiesOutcome:— When the IPU frame c<strong>on</strong>versi<strong>on</strong> was not possible, the GPU wasselected to perform that operati<strong>on</strong>— Sensor 1 output was in a Bayer BGGR format that required a“demosaic” operati<strong>on</strong> to get to a RGB format— Initial algorithm selected had a reference GLSL shaderimplementati<strong>on</strong> for the GPU— Unfortunately, the data tr<strong>an</strong>sfer rates into the GPU were not enoughto sustain the target frame rate. We discovered that the frame ratedropped linearly with the size of the data frame tr<strong>an</strong>sferred— With several weeks lost to the effort, we made the decisi<strong>on</strong> to movethe processing to the NEON processor14<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


SOFTWARE COMPONENTS15<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


Mentor Embedded Linux (MEL)nnnnnMEL is based directly <strong>on</strong> The Yocto ProjectProvides a reference rootfs image <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> kernelC<strong>on</strong>tains the Freescale BSP bitsIntegrates with additi<strong>on</strong>al MGC tools, which becameimport<strong>an</strong>t laterSeriously, I work for Mentor, is it <strong>an</strong>y surprise that’s whatwe used?16<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


Freescale i.<strong>MX6</strong> BSPnnFreescale publishes their BSP via a public, Yocto ProjectlayerThe BSP c<strong>on</strong>tains V4L drivers for their IPU sensorinterfaces that include DMA tr<strong>an</strong>sfer supportn The BSP versi<strong>on</strong> used c<strong>on</strong>tained kernel 3.0.35nnIt also c<strong>on</strong>tained <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> plugins compatible with<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> base 0.10.36.One of these plugins, mfw_v4lsrc, provided sensor framesto the <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> pipeline17<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


i.<strong>MX6</strong> Platform – MEL w/FSL BSPnnExpectati<strong>on</strong>:— MEL would provide solid base to begin work <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> also as basis forfuture platformOutcome:— MEL base worked as expected— Allowed <strong>an</strong> update in the middle of the project of the FSL BSPrelease with minimal effort <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> impact— Allowed work to c<strong>on</strong>tinue <strong>on</strong> Sabre-Lite when hardware wasdelayed— Allowed work to begin <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> complete <strong>on</strong> the BSP for the newproject without impacting work that was underway for the rest ofthe stack— MEL/FSL platform <strong>on</strong> i.<strong>MX6</strong> is now being c<strong>on</strong>sidered for additi<strong>on</strong>alproducts at that customer18<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>Video</str<strong>on</strong>g>4Linux (V4L)nnnAPI <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> driver framework that is part of the kernel <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>provides support to video devicesProvides st<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>ard way for video devices to communicateto userspaceStable API that has been around for a whilenFor more informati<strong>on</strong> <strong>on</strong> V4L:— http://linuxtv.org/downloads/v4l-dvb-apis/index.html— http://www.linuxtv.org/wiki/index.php/Developer_Secti<strong>on</strong>19<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>Video</str<strong>on</strong>g>4Linux (V4L)nnnThe FSL BSP provided V4L drivers that c<strong>on</strong>nected directlyto the st<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>ard sensor inputs of the i.<strong>MX6</strong>.These drivers largely worked as expected <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> providedthe frames, in raw mode, from the sensors with almost noeffort <strong>on</strong> our part.— One signific<strong>an</strong>t bug was found in a local timer/scheduler whenGstreamer threads were created/destroyed rapidly under systemstressHooking these up to the pipeline was accomplished usinga plugin provided by the FSL BSP that wrapped the V4Lsource with some FSL specifics, called mfw_v4lsrc.20<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g>nnnnnnFrom Gstreamer.freedesktop.org:— “<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> is a library for c<strong>on</strong>structing graphs of media-h<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>lingcomp<strong>on</strong>ents.”It has a well defined API for the pluginsIt allows for comp<strong>on</strong>ents to be re-ordered, inserted, <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>dropped, dynamically<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> was chosen due to the flexibility of thearchitecture <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> immediate availability in MELIn the end, the <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> plugin work took most of theavailable scheduleTakeaway— Make sure you know what the quality level is of <strong>an</strong>y openplugins that you pl<strong>an</strong> to use. Also, pl<strong>an</strong> to have to rewriteor modify some regardless of their quality.21<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – Good, Bad, & Uglynnn<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> plugins are collected into three broadcategories:— Good - plug-ins that have good quality code, correct functi<strong>on</strong>ality,<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> preferred licensing— Bad – plug-ins that aren't up to par compared to the rest— Ugly - plug-ins that have good quality <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> correct functi<strong>on</strong>ality,but distributing them might pose problemsDuring development a “good” plugin, videomixer, wassubst<strong>an</strong>tially reworked to enh<strong>an</strong>ce stability <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>perform<strong>an</strong>ce for merging video streams togetherTakeaway— Make sure you know what the quality level is of <strong>an</strong>y openplugins that you pl<strong>an</strong> to use. Also, pl<strong>an</strong> to have to rewriteor modify some regardless of their quality.22<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – Thread c<strong>on</strong>trolnnnnGstreamer, as of the versi<strong>on</strong> we used, did not give directc<strong>on</strong>trol to the threadingThreads were created internally to the base frameworkThreads are created/destroyed quickly depending <strong>on</strong> yoursystem <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> creates a fair amount of overhead by itselfWe discovered that by inserting a “queue” element intothe pipeline, we could force <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> to create a newthreadnTakeaway— Make sure you know what the quality level is of <strong>an</strong>y openplugins that you pl<strong>an</strong> to use. Also, pl<strong>an</strong> to have to rewriteor modify some regardless of their quality.23<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – Resource C<strong>on</strong>tenti<strong>on</strong>nnnWe found that <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> threads would m<strong>an</strong>y timesstarve each other due to unnecessary resource c<strong>on</strong>tenti<strong>on</strong>Our hardware budgeting/allocati<strong>on</strong> needed to have a wayto force operati<strong>on</strong>s to occur <strong>on</strong> a specific coreWe modified the “queue” element to accept a CPU affinityparameter that allowed us to accomplish this task24<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – DMA buffersnnnnThe Freescale <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> plugins were *very* finickyabout using DMA buffersWe discovered that certain plugin combinati<strong>on</strong>s would notuse a DMA-able buffer <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> the final tr<strong>an</strong>sfer to the displaywould require <strong>an</strong> additi<strong>on</strong>al copy of the frameThis *killed* perform<strong>an</strong>ce quicklyTo overcome this issue, we wrote a new element that“fooled” the elements into using the correct, DMA buffers25<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – gst-launchnnn<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> provides a comm<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> line tool to launch apipelineWhile useful for testing, it quickly becomes cumbersomeLearn how to use it, but be ready to figure out how tocreate the same thing in codeusr/bin/gst-launch --gst-debug-no-color videomixer2 name=mixer background=4 sink_1::alpha=0.5 sink_0::alpha=1 \! queue name=output cpu=4max-size-buffers=1min-threshold-buffers=1\! mfw_v4lsink sync=falseqos=false\mfw_v4lsrc name=TI fps-n=30fps-d=1device=/dev/video0 pixel-format=3cpu=4\ ! 'video/x-rawgray,bpp=8,width=640,height=480,framerate=30/1'\! gray2rgb crop-left=2crop-right=6\! 'video/x-raw-rgb,bpp=24,depth=24,framerate=30/1'\! mgc_hwbpool pool-size=8\! mfw_ipucsc crop-top=8crop-bottom=8\! 'video/x-raw-rgb,bpp=24,depth=24,width=800,height=600'! mgc_hwbpool pool-size=8\ ! mixer. \mfw_v4lsrc pixel-format=2device=/dev/video1 fps-n=60fps-d=1cpu=2num-buffers=4000 \! 'video/x-raw-bayer,format=bggr,width=1280,height=960'\! frameavg omit-avg=false\! queue name=bayer cpu=3max-size-buffers=1min-threshold-buffers=1\! bayerne<strong>on</strong>2 crop-left=2crop-right=6\! 'video/x-raw-rgb,bpp=24,depth=24,framerate=30/1'\! queue name=qTV cpu=2max-size-buffers=1min-threshold-buffers=1\! mgc_hwbpool pool-size=8buffer-size=3686400\! mfw_ipucsc crop-top=8crop-bottom=8\! 'video/x-raw-rgb,bpp=24,depth=24,width=800,height=600'! mgc_hwbpool pool-size=8\ ! mixer.26<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – Perform<strong>an</strong>ce <strong>an</strong>alysisnnGstreamer c<strong>an</strong> report some statistics, but not all pluginsh<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>le that data correctly <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> not all plugins report thatdata correctlyIn order to <strong>an</strong>alyze the perform<strong>an</strong>ce of the pipeline, weinstrumented the <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> pipeline <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> put it through avisualizati<strong>on</strong> tool to help us identify issues27<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> – Perform<strong>an</strong>ce <strong>an</strong>alysis28<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


FINAL THOUGHTS29<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


Final ThoughtsnnnnSensor frame input format took a lot of unexpected workto address, pay close attenti<strong>on</strong> to the formats needed todisplay versus the format the sensors produceDMA support is critical for the pipeline to work efficiently(zero-copy). Expect to spend time making elements of a<str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> video chain h<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>le DMA buffers correctly.The FSL BSP has revved since this work, it now c<strong>on</strong>tains a3.10.17 kernel <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> a <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g> 1.0 versi<strong>on</strong>.— Reportedly m<strong>an</strong>y improvements in later versi<strong>on</strong> of <str<strong>on</strong>g>GStreamer</str<strong>on</strong>g>around buffer h<str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g>ling <str<strong>on</strong>g><strong>an</strong>d</str<strong>on</strong>g> thread c<strong>on</strong>trolEven with the moderately c<strong>on</strong>servative pl<strong>an</strong> I put in placeearly in the process, we had to push very hard to hit thefinal milest<strong>on</strong>e <strong>on</strong> time.30<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded


QUESTIONS?31<str<strong>on</strong>g>ELCE</str<strong>on</strong>g> <str<strong>on</strong>g>2014</str<strong>on</strong>g> – Dusseldorf, Germ<strong>an</strong>ymentor.com/embedded

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!