---

Wednesday, 3 August 2011GUI Slowness

Today someone made a nice comment today that made me think. They said: "there is no hardware video accel, so it's slow". Then someone's response was "slow is a relative term". Both of which are very true. What IS fast or slow in a GUI context? Do we have any real definitions? I keep seeing people trying to make their games run faster than 60FPS in an attempt to go on about how much better it is, when reality is, their eyes won't percieve more frames than that (we can debate center of vision vs peripheral if you want to get into details), but the point here is that in reality for most people ther *IS* something considered fast for a GUI,and then slow. This will vary from person to person, BUT there will be general ballparks.

So what are these ballparks. What is fast? What is Slow? So I propose the following standard (median framerate):

  • over 60FPS - Pointless
  • 60FPS - Fast
  • 50FPS - Good
  • 40FPS - Average
  • 30FPS - Bareable
  • 20FPS - Bad
  • 10FPS - Fail
  • under 10FPS - Don't even bother

I know this over simplified things. What is your screen refresh rate? Really humans see about 45-50FPS in the center of vision and maybe 75FPS in peripheral vision. You can get away With 50FPS being fast, if that is your screen refresh rate. But the point of this little ditty is, that we can get a common language for what Fast is when it comes to a GUI. One should always strive to try get "60FPS" (manage to render at refresh rate - if refresh rate is 50FPS like in PAL, then aim for 50FPS). Make sure you produce an updated frame regularly every refresh (if there is something to update).

Friday, 11 February 2011Linux EFL and Phones

So today Nokia did something "interesting". The became a Windows house. More specifically they announed a strategic partnership with Microsoft that makes Windows Phone 7 now thier primary and premier smartphone OS. Symbian seems relegated to being a "franchise OS" (given a low key position) and, Nokia's attempts to finally have an OS of relevance and innovation, MeeGo, is dropped to the status of a "Toy experiment" OS. It is for "trying new ideas". It will not become their main focus.

Now What does this mean for Qt? Well Nokia claim Qt will have no place in their Windows centric Smartphone universe. Where does this leave Linux and Qt? Well... at best as a sideline micro-amusement, and probably more likely, downsized and put on nothing more than life-support.

Now why talk about this? Well I'm here at Samsung. I am a principal eningeer, so I talk with some level of authority in saying that Samsung has been working on its own Linux based OS for a while now, with significantly less fanfare than Nokia and MeeGo. Not only is is solidly being worked on and not relegated to irrelevance, but as part of the work, Enlightenment and EFL have become a central focus. Samsung is putting real resources behind EFL and using it to make a production-ready OS. The OS not only is Linux based, It uses all the other infrastructure from Linux (DBus, Glibc, Xorg, and much much much more). It is also going to be Open Source (GPL, LGPL etc.) and with Opensource upstream gaining contributions back from Samsung.

This is a real effort and not just some research experiment. Stay tuned. Things will only improve from here. If you were hoping for a slew of MeeGo handsets, then maybe you should also keep an eye out for something from Samsung (actual product details not available yet - if it be a tablet, handset or TV or anything else for that matter).

Saturday, 4 December 2010Moved again

So I haven't written anything in a little while. I've been busy. I've moved countries... again! As of end of June I'm living in Seoul, Korea. Well that's a change. I also, as of this move, work for Samsung proper (Samsung HQ in the DMC Mobile Software group). I'm a principal Engineer at Samsung and well... I do stuff.

So Korea - it's the kind of country that grows on you slowly. When you first visit you go "meh". But as you visit more and spend more time - it grows on you. It has its good, and bad points. Like all places, but it's good points don't instantly jump out at you. I'm enjoying it here now I've gotten over the "moving here and settling in" hump. What I could do with is more sleep.

And Samsung... Well. Some may say "Samsung? Are you nuts? They don't do Open source or play nice! Why would you want to go there?". You may have a point. At least thats history and a not totally unfounded view of Samsung. But things are changing - rapidly actually. Samsung is not the same place. Remember though - Samsung Electronics is a massive company. It's literally almost its own city. At least its own suburb.

I can't speak for all of Samsung and its offices, divisions and groups, but I can say that I work for the Mobile Platform R&D group and we do Linux. That means regular Linux, X11, Glibc, Dbus, Busybox, EFL, GTK+, Gstreamer, Webkit and more. We work with LiMo and are actually VERY heavily using open source. Not just using.. but giving back. The forerunners of this is withing Enlightenment/EFL. You will already see a stream of patches and contributions from Saumsung and that have actually been going on more quietly over the past 2 years or so. It's now ramping up to be a primary drive. Play nice with Open Source. Follow the licenses. Contribute back. Be Open. Engage the community. It may be hard to believe - but it's true. It's the reason I joined. Samsung is heading the right way and I'm helping with that. Samsung may be a bit late to the party, but it's got its sequins an party-hat on and is ready to join in.

Monday, 8 March 2010Enlightenment Libraries on the N900

Well I would get to it sooner or later, so here's EFL (Evas, Elementary) on the N900, and yes - an OpenGL-ES2.0 rendering engine is used too for most of the videos. For comparison elementary also is shown with a software rendering engine. It all works. no worse than anything else I'd say and probably better in most ways considering how much is actually being done. Below they are for your enjoyment.

Wednesday, 24 February 2010Evas OpenGL and OpenGL-ES improvements

Well the world turns and things move on... and that's true of Evas. Not only did it get 3D - it has had an OpenGL engine for a while. Recently this has been revamped. It's a full OpenGL AND OpenGL-ES2.0 engine - it does both with the same codebase (and a few minimal #ifdefs). It's entirely built around shaders and is very complete. This is in addition to the already very optimised Evas software engine and the myriad of others. There are already ports to WebOS on the Palm Pre, and it should all work on any Linux system, Desktop, Laptop or embedded (ARM, x86 etc. etc.). (Android excluded as it's not Linux - not Linux as ins the normal usage of the word meaning Linux plus the whole userspace ecosystem than comes with it).

Not only is the OpenGL engine of Evas able to work, it ALSO supports texture-from-pixmap - which means... I just added a simple compositor module to E17 that uses this. It can either composite with software or with OpenGL and shortcut to zero-copy via texture-from-pixmap. It even all works with OpenGL-ES2.0. On Desktop it works nicely with NVIDIA drivers, though others may have mileage that varies, but in my experience most other drivers are not as complete or stable as NVIDIA's closed ones (even they have a few issues).

So what else is great about this? Well I also found some nice speedups. It's now at the point where I can run E17 + compositor (OpenGL-ES2.0) on an SoC at 480x800 AND keep silky smooth framerates with Evas based apps (like Elementary) while scrolling around AND compositing. I'm seeing composited framerates beat 100FPS. That is - the app can render at 100FPS.. or more... and still have its window be composited. I know there are even excess copies in the pipeline driver-side that are still to be fixed/improved. This baby is on fire.

Don't forget... this is also all running under X11. There will be some overhead but not much. It's a myth that X11 makes things slow - it's bad drivers that do that, and badly written X11 apps or toolkits. So let it be known that Evas has for many years supported OpenGL as a rendering path, as well as software, but now also fully supports OpenGL-ES2.0 ,and it's getting love and attention. This means that you can without any change in your apps, use either software or OpenGL - or a myriad of other engines, and get the best out of your hardware, if it has working and stable OpenGL drivers libraries or not.

Here is the performance data for this ARM based SoC - 480x800 screen, 32bpp. Yes, it has an OpenGL-ES2.0 Hardware core (SGX based). Numbers are in frames per second.

Test Software OpenGL-ES2.0
Widgets File Icons 17.50 19.13 (+9.3%)
Widgets File Icons 2 46.90 66.42 (+41.6%)
Widgets File Icons 3 32.87 17.26 (-47.5%)
Widgets File Icons 4 45.72 86.58 (+89.4%)
Image Blend Unscaled 16.72 49.29 (+194.8%)
Image Blend Solid Middle Unscaled 12.02 27.56 (+129.3%)
Image Blend Fade Unscaled 8.84 30.92 (+249.8%)
Image Blend Fade Power 2 Unscaled 8.84 30.92 (+249.8%)
Image Blend Solid Unscaled 80.31 78.54 (-2.2%)
Image Blend Solid Fade Unscaled 13.52 30.88 (+128.4%)
Image Blend Solid Fade Power 2 Unscaled 13.52 30.94 (+128.8%)
Image Blend Nearest Scaled 6.61 43.50 (+558.1%)
Image Blend Nearest Solid Scaled 69.48 64.72 (-6.9%)
Image Blend Smooth Scaled 1.59 36.71 (+2208.8%)
Image Blend Smooth Solid Scaled 31.15 64.74 (+107.8%)
Image Blend Nearest Same Scaled 34.20 77.97 (+128.0%)
Image Blend Nearest Solid Same Scaled 104.67 87.20 (-16.7%)
Image Blend Smooth Same Scaled 34.01 60.17 (+76.9%)
Image Blend Smooth Solid Same Scaled 121.32 86.62 (-28.6%)
Image Blend Border 2.05 36.00 (+1656.1%)
Image Blend Solid Middle Border 25.16 38.28 (+52.1%)
Image Blend Solid Border 33.04 46.62 (+41.1%)
Image Blend Border Recolor 1.71 18.66 (+991.2%)
Image Map Rotate 4.17 71.79 (+1621.6%)
Image Map Solid Rotate 4.73 121.01 (+2458.4%)
Image Map Nearest Rotate 14.84 82.85 (+458.3%)
Image Map Nearest Solid Rotate 25.13 120.54 (+379.7%)
Image Map Color Rotate 3.75 50.77 (+1253.9%)
Image Map Color Solid Rotate 4.20 119.53 (+2746.0%)
Image Map Color Nearest Rotate 8.16 50.94 (+524.3%)
Image Map Color Nearest Solid Rotate 10.52 120.06 (+1041.3%)
Image Map Color Alpha Rotate 3.67 50.76 (+1283.1%)
Image Map Color Alpha Solid Rotate 3.70 50.75 (+1271.6%)
Image Map Color Alpha Nearest Rotate 7.77 50.89 (+555.0%)
Image Map Color Alpha Nearest Solid Rotate 7.86 50.90 (+547.6%)
Image Map 3D 1 35.07 75.81 (+116.2%)
Image Map 3D 2 21.42 83.48 (+289.7%)
Image Map 3D 3 19.16 62.44 (+225.9%)
Image Map 3D 4 11.04 62.39 (+465.1%)
Image Map 3D 5 37.66 137.53 (+265.2%)
Image Map 3D 6 60.70 177.48 (+192.4%)
Image Map 3D Flow 15.43 23.65 (+53.3%)
Image Quality Scale 23.66 191.34 (+708.7%)
Image Data ARGB 121.94 27.85 (-77.2%)
Image Data ARGB Alpha 33.01 19.57 (-40.7%)
Image Data YCbCr 601 Pointer List 61.12 33.08 (-45.9%)
Image Data YCbCr 601 Pointer List Wide Stride 48.79 53.40 (+9.4%)
Image Crossfade 68.51 135.38 (+97.6%)
Text Basic 62.73 56.12 (-10.5%)
Text Styles 5.10 5.22 (+2.4%)
Text Styles Different Strings 4.06 4.60 (+13.3%)
Text Change 43.11 45.51 (+5.6%)
Textblock Basic 54.10 53.64 (-0.9%)
Textblock Intl 180.16 94.14 (-47.7%)
Rect Blend 8.03 26.90 (+235.0%)
Rect Blend Power 2 8.05 26.93 (+234.5%)
Rect Solid 73.41 79.09 (+7.7%)
Rect Blend Few 689.16 187.13 (-72.8%)
Rect Blend Power 2 Few 663.81 187.10 (-71.8%)
Rect Solid Few 967.81 203.34 (-79.0%)
Image Blend Occlude 1 Few 520.61 155.05 (-70.2%)
Image Blend Occlude 2 Few 178.36 122.45 (-31.3%)
Image Blend Occlude 3 Few 119.99 144.50 (+20.4%)
Image Blend Occlude 1 372.49 60.59 (-83.7%)
Image Blend Occlude 2 89.63 48.63 (-45.7%)
Image Blend Occlude 3 30.46 69.11 (+126.9%)
Image Blend Occlude 1 Many 150.62 23.74 (-84.2%)
Image Blend Occlude 2 Many 36.58 19.72 (-46.1%)
Image Blend Occlude 3 Many 12.25 31.17 (+154.4%)
Image Blend Occlude 1 Very Many 13.86 2.13 (-84.6%)
Image Blend Occlude 2 Very Many 3.54 2.29 (-35.3%)
Image Blend Occlude 3 Very Many 2.02 4.16 (+105.9%)
Polygon Blend 15.70 12.81 (-18.4%)
EVAS SPEED 78.40 66.03 (-15.8%)

Wednesday, 16 December 2009The Day Democracy Died

So... on Tuesday, the 15th of December, 2009, democracy was killed in Australia. A democracy exists to represent the desires of the majority of the people in a nation. Regardless how it is implemented (as a representative democracy where you vote for someone to represent you), or some other way, the POINT is to represent the people and their desires. This no longer is the case. Not by a long shot.

The communications minister, Stephen Conroy, has decided to unilaterally ignore not just expert reports on the dangers of compulsory filtering (discussed here in a sydney morning herald article), but more importantly, the desires of the people of Australia:

95% of people responding say NO to the filtering, but... go ahead it shall. I am not going to get into the sideshow of child porn and who controls the list of filtered sites, and that it's easy enough to get around. It's the principle of democracy simply failing miserably. We can argue that the people voting in this poll are a skewed subset of Australians... but that's just trying to push an agenda anyway - even if it was skewed.. 95% implies its a majority of people that oppose no matter what.

It is a sad day to be an Australian. It is a sad day for democracy. It is a sad day for freedom of speech. From this day on there is now an on-line censorship mechanism that, mark my words, future governments will use to not "protect the children" but to censor disagreement with their views. Countries like China do this already. Australia is now following. Good job Conroy! NOT!

Saturday, 31 October 2009Evas does 3D

So.. evas now can do "3D" (it's 2.5D - fake-ish 3D, but good enough so you won't notice in real life). All objects can have a "Map" applies. This is a mapping of the 2 points that make up the objects corner points and each point can be assigned an X, Y an Z coordinate, as well as "texture" U and V coordinates from the original object to be transformed using the map.

This map now works with all objects. Including smart objects. That means Edje objects too, widgets from Elementary, and more. Of course, here is the obligatory screenshot:

Hello Map

Some notes. It's not complete yet. It's not efficient. It's horribly efficient right now as it re-renders any transformed object (except images) to a temporary surface on any re-draw, then uses that surface for the draw with the map to the parent surface (yes. it can nest). There is only code for the software engine right now. I cactually made sure the code there is fast and wel optimised. It can do both sampled (nearest) and smooth (linear filtered) rendering. It's very good considering its software. Adding code to the GL engine will be easy enough, so it's not a focus right now. Software is and should always be the first to work and work decently.

Also there are some matters of there now being 2 geometries to deal with (original and now mapped geometry), translating coordinates between mapped and parent coordinate spaces for events, being able to request smooth or non-smooth mapping, more utility calls for doing transforms to a map (sofar rotate and zoom calls are in).

I also want to add color to each point so it can interpolate RGBA values and use them to "multiply" the texture pixels. This can be used for things like lighting ans shading etc. This would allow for an apparently "real" 3D engine. I will cook up a demo or 2 to show this when it's done.

Also I need to have the surfaces be cached to avoid re-renders for mapped objects, allow hints as to the storage of such surfaces etc. etc. There needs to be a balance between memory used and speed. I need to only queue redraws of the right regions when children change, and a few other things.

What this does do though, is open up a path to another long-desired feature for Evas - filtering. For example - blurring all objects that are in the map. Now the infrastructure is in place for it.

Monday, 26 October 2009Enlightenment+EFL on a s3c6410 Device

On the weekend I played a bit with my SmartQ 5. This is a Chinese Web Tablet, with a Samsung s3c6410 ARM SoC inside, 128M of ram, 1GB of Flash, a 800x480 4.3" LCD and Wifi. I put Mer on it (Mer is an Ubuntu 9.04 based distribution for wbe dablets and devices). I used 0.16 testing 6 on it for reference. This isn't a bad gadget. It's faster than the Openmoko GTA02 (Freerunner) by a massive shot. In fact this (with a smaller screen and a phone) is what the GTA03 should have been (next phone after GTA02), but thanks to bumbling and the collapse of Openmoko (no fingers will be pointed, but I know they point away from me), this will never exist.

Interestingly, I compared the memory footprint of Enlightenment (E17) vs the Mer GUI built with GTK+ and matchbox. Taking away base system footprint, Enlightenment 0.17 with a wallpaper etc. set up uses about 16M of RAM as a footprint. Mer's GTK+/Matchbox GUI uses... 43M of RAM. That's a big difference. I never knew it was so big. Well... that's interesting. (Note these included xinit and the server footprint, which would be the same for both, and the base system footprint below these desktops was about 14M)

Anyway, so here comes the content. Here is the new Evas 3D Mapping feature running on this device

Of course I couldn't resist. I dug out an old 3D engine i wrote years ago and ran it ther. I fact the 3D code in Evas is based on this algorithm. So it's an indicator of what you can do with Evas now... if you tried. I'll have to cook up a good demo some time.

Friday, 2 January 2009Performance testing of several embedded systems

So I thought I'd do some tests since I got my new Beagleboard (thanks Thomas!). What is this? well you can go follow the link - but it's an OMAP3530 based devel board with pretty much nothing much on it other than the CPU. You need to plug in serial to get the console - there is no input or screen on it... but it does have DVI out and a usb OTG port (which so far has been utterly useless to me as my supposed USB-A to USB-Mini-A doesn't work for OTG :( ). Anyway. This little CPU (SoC - System on a Chip) is not too shabby. it's not even running at the 600Mhz rated that the 3530 can do (mind you that's overdrive - but I'd expect to use that normally as the other power case is 0 clock so while on and doing things - do them fast, otherwise sleep as much as you can). Also the RAM could be clocked up much higher (it's at 133Mhz on this board).

So that covers the hardware. Software wise I'm using expedite below. This is the Software-X11 engine. Output is 16bpp RGB565 (except the Desktop which is RGB32). The Desktop of course will have multiple threads rendering. It also gets MMX and SSE assembly. The ARM systems get the plain C routines. So thus far I have yet to put in any ASM for ARM in the software routines - but I intend to throw in some preload (pld) calls as well... but... what I really need to do is put in some NEON (OMAP3'x equivalent of MMX/SSE that actually doesn't suck). I have NOT done any of this - so the below numbers are RAW as-is. the PXA270 might have some room for optimising with Wireless MMX. The s3x2442 I think is pretty much not going to go anywhere as it's ARMv4, so a lost cause. So take the numbers for the PXA270 as "could be a little better". From what I have read of the 3530's NEON - it could get a fair bit better if not 50% or more on the FPS numbers below (yes the numbers are in frames per second, rendering to a QVGA sized window in all cases).


Treo650 Openmoko GTA02 BB (RevB) Desktop x86

PXA270 @ 312Mhz S3c2442 @ 400Mhz OMAP3530 @ 500Mhz Core2D @ 3Ghz

32M RAM 128M RAM 128M RAM 4096M RAM

FB X11 Glamo X11 FB X11 NV8600GT X11





Image Blend Unscaled 2.83 3.43 13.73 274.99
Image Blend Solid Unscaled 19.69 15.86 63.37 1054.19
Image Blend Nearest Scaled 1.97 2.11 6.41 144.23
Image Blend Nearest Solid Scaled 20.98 15.01 66.84 1171.3
Image Blend Smooth Scaled 0.65 0.47 1.33 26.28
Image Blend Smooth Solid Scaled 13.74 9.28 33.82 552.79
Image Blend Nearest Same Scaled 4.97 5.34 20.29 378.42
Image Blend Nearest Solid Same Scaled 26.56 21.91 82.72 1203.65
Image Blend Smooth Same Scaled 1.56 1.14 4.1 60.03
Image Blend Smooth Solid Same Scaled 14.78 10.65 38.1 436.62
Image Blend Border 0.78 0.56 1.49 33.1
Image Blend Solid Border 15.33 10.76 38.85 482.57
Image Blend Border Recolor 0.68 0.47 1.36 42.68
Image Quality Scale 21.14 12.93 47 1155.77
Image Data ARGB 27.41 17.72 89.24 1966.35
Image Data ARGB Alpha 15.22 2.55 24.96 341.48
Image Data YCbCr 601 Pointer List 16.92 13.1 49.99 1228.43
Image Data YCbCr 601 Pointer List Wide Stride 18.96 13.14 50.94 1107
Image Crossfade 21.75 15.78 66.57 1705.74
Text Basic 13.83 11.33 39.12 477.44
Text Styles 1.63 1.42 3.58 36.94
Text Styles Different Strings 2.12 1.75 4.79 49.94
Text Change 12.02 10.3 33.37 409.65
Textblock Basic 14.77 12.29 38.72 327.28
Textblock Intl 10.86 18.63 67.42 424.31
Rect Blend 2.52 2.35 8.25 411.9
Rect Solid 24.21 16.33 76.55 1220.57
Rect Blend Few 116.42 106.76 448.06 6609.17
Rect Solid Few 135.7 124.04 556.87 7809.12
Image Blend Occlude 1 Few 44.19 35.23 144.58 2749.2
Image Blend Occlude 2 Few 21.7 21.48 91.69 1743.54
Image Blend Occlude 3 Few 21.3 22.37 91.73 1839.74
Image Blend Occlude 1 14.78 12.18 50.21 760.61
Image Blend Occlude 2 10.39 9.58 39.77 680.6
Image Blend Occlude 3 5.71 6.2 25.11 457.63
Image Blend Occlude 1 Many 5.67 4.89 20.44 273.9
Image Blend Occlude 2 Many 4.71 4.52 18.42 270.16
Image Blend Occlude 3 Many 2.4 2.7 10.68 197.47
Image Blend Occlude 1 Very Many 0.5 0.51 2.43 20.84
Image Blend Occlude 2 Very Many 0.47 0.48 2.35 21.42
Image Blend Occlude 3 Very Many 0.38 0.44 1.92 25.46
Polygon Blend 4.51 4.14 14.81 293.42
AVERAGE 17.06 14.34 59.33 963.71

---

Copyright © Carsten Haitzler | raster@rasterman.com | +61 413 451 899 | My CV/Resume