directshow: framerate of sample 'Bouncing Ball' - directshow

Bouncing Ball is one of the sample in windows sdk, and it derives from CSourceStream.
I use GraphEdit and build this simple graph:
Bouncing Ball -> ColorSpace Converter -> Video Mixing Renderer 9
When graph is running, I see the fps is about 50 in property page of Video Mixing Renderer 9,
it's expected, however, if I unselected "use clock" option, the fps is 60.
According to document, the graph run as fast as possible when not using reference clock, so the fps should be more than 60 I think. How do I change the sample code that the fps will be more than 60 when not using reference clock?

Related

Maptiler Pro Demo 12 Core using only 12%

Using MapTiler Pro Demo. Testing zoom levels 1-21 for Google Maps export from a tiff image (about 21mb file covering polygons over 2000km).
At the moment its been running an hour with constant usage at 12% of 12 vcores (about 1.5 of 12) maxed to about 2.5ghz. No tiles has been exported yet, only the html's associated.
Am I too quick to judge performance?
Edit: Progressbar at 0%
Edit2: Hour 8 still 0%. Memory usage increased from 400mb to 2gb
You are trying to generate from your input 21 MBytes file about 350 GBytes of tiles (approx. 10 billion of map tiles at zoom level 21) by the options you have set in the software. Is this really what you want to do?
It sounds like a nonsense to render the very low-res image (2600 x 2000 pixel) covering a large area (such as the South Africa) down to zoom level 21!
The software has suggested you the default maxzoom 6. If your data are coverage maps or similar dataset it makes sense to render it maybe down to zoom level 12 or similar, definitely not deeper than 14. For standard input data (aerial photo) the native suggested maxzoom +1 or +2 is the max which really makes sense. Deeper zoom levels do not add any visual advantage.
The user can always zoom deeper - but the upper tiles can be displayed on the client side - so you don't really need to generate and save all these images at all...
MapTiler automatically provides you with a Google Maps V3 viewer, which is doing the client-side over zooming out of the box.
See a preview here:
http://tileserver.maptiler.com/#weather/gmapsmaptiler.embed
If you are interested in the math behind the map tiles, check:
http://tools.geofabrik.de/calc/#type=geofabrik_standard&bbox=16.44,-34.85,32.82,-22.16
Thanks for providing the report (with http://www.maptiler.com/how-to/submit-report/) to us. Your original email to our support did not contain any technical data at all (not even the data you write here on the stackoverflow).
Please, before you publicly rant on the performance of a software - double check you know what you do. MapTiler Pro is a powerful tool, but the user must know what he does.
Based on your feedback - we have decided to implement for a future version of the MapTiler software an estimated final output size - and warn the user in the graphical user interface if he chooses options which are probably unwanted.

Big performance difference between WinForms and Wpf examples

I notice a very important performance difference (in FPS) between the CefSharp.WinForms.Example and CefSharp.Wpf.Example when using http://www.vsynctester.com
When turning off VSync in my video card control panel and in the settings in CefExample Init()
settings.CefCommandLineArgs.Add("disable-gpu-vsync", "0");
For CefSharp.WinForms.Example I get around 500 FPS (steady)
For CefSharp.Wpf.Example I barely get 30 FPS
I understand that Wpf uses offscreen rendering, but what explains the big performance difference for the same web page?
I'm using a MacBook Pro with Win 8.1 with NVidia GT 750M Graphics.
CefSharp version is 8755a9496ffbd5f21bc6ef062bce687a22d83938 (March 1st 2015) and Cef version 3.2171.1979
The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint will be called for a windowless browser. The actual fps may be lower if the browser cannot generate frames at the requested rate. The minimum value is 1 and the maximum value is 60 (default 30).
Direct quote from the CEF documentation see http://magpcss.org/ceforum/apidocs3/projects/%28default%29/_cef_browser_settings_t.html#windowless_frame_rate
The entire process is more CPU bound that it is GPU bound. The slow part is the bitmap buffer is copied in memory, before it's displayed. CEF also supports DirtyRects which is currently not implemented, so even a small graphical change forces a complete screen redraw.
When the upstream CEF issue 1006 is resolved we can then look at making some more improvements.
https://code.google.com/p/chromiumembedded/issues/detail?id=1006&q=label%3AOSR

CADisplayLink on iPhone 3GS and iPhone 4 drops from 60 to 40 FPS randomly

I am using CADisplayLink to perform a function called gameLoop at 60 FPS and at first the application runs perfectly. Then at a random time (could be 5 seconds or 1 minute the fps drops to around 40 FPS.
After days of searching forums, debugging, optimizing my rendering, profiling, and analyzing my app, I decided to remove everything from the gameLoop function except for a few lines which calculate how long it has been since the last call to gameLoop. I cannot figure out why CADisplayLink calls gameLoop at 60 FPS for a while then calls it at 40 FPS thereafter when gameLoop does almost nothing.
I implemented a pause/unpause function which invalidates the display link and restarts it. When I restart the display link, the app runs at 60 FPS again until it drops randomly.
Thanks in advance to anyone who can give me some insight as to why this is happening.
I decided to try OpenGL ES 2.0 and the GLKit API to see if that would fix the issue. After reading the apple docs and some tutorials I ported the code and tested it with the Xcode analyzer and the Performance Detective. The GLKViewController's Update and drawInRect functions get called at 60 FPS and everything runs perfectly.
If you're on iOS 5 make sure to set your view's opaque paramater to YES. I'm guessing something with compositing the screen with other CoreAnimation layers is causing the slow down. And I'm guessing the GLKIT API does this in it's setup.
http://www.cocos2d-iphone.org/forums/topic/app-often-but-not-always-runs-at-40-fps-at-startup-rather-than-60-fps/

Open GL performance on QT

I am using the QT 4.8 with Open GL ES 2.0 (created my set of shaders etc...)
Running the entire application from within QGraphicsView that owns a QGraphicsScene, I get relatively low fps although I am rendering a simple model (around 30 fps).
The scene render itself is triggered by a timer that fires at 50Hz (that can be changed).
What would be the most time consuming sections to attend in order to improve the frame rate?
Also, I noticed (using gDebugger) that the functions and states associated with the GL_STENCIL_TEST and GL_SCISSOR_TEST are killer consumers here (over 30% of the time goes on that). Is there anyway to bypass that?
Thanks.

How to Save an Image of a Large Flex Component (EX: 25000px by 3000px # 72dpi)

My application consists of displaying a large custom tree like structure to the user that can eventually grow to massive proportions like the dimensions listed in the question. I allow them to export the image with the following line of code tied to a button click event:
var image:ImageSnapshot = ImageSnapshot.captureImage(this, 72, new PNGEncoder(), false);
I've managed to export images close to the dimensions listed but around there it start to get the error message listed below after spinning for close to 15 seconds:
Error: Error #1000: The system is out of memory.
at flash.utils::ByteArray/writeBytes()
at mx.graphics::ImageSnapshot$/mergePixelRows()[E:\dev\4.x\frameworks\projects\framework\src\mx\graphics\ImageSnapshot.as:511]
at mx.graphics::ImageSnapshot$/captureAll()[E:\dev\4.x\frameworks\projects\framework\src\mx\graphics\ImageSnapshot.as:482]
at mx.graphics::ImageSnapshot$/captureImage()[E:\dev\4.x\frameworks\projects\framework\src\mx\graphics\ImageSnapshot.as:318]
at vertical/saveChart()[C:\devel\workspace\vertical\src\CustomObject.mxml:501]
at vertical/__saveImageBtn_click()[C:\devel\workspace\vertical\src\CustomObject.mxml:574]
Is the flashplayer plugin for my browser running out of memory? I noticed in my task manager it got up to about 1.2GB of memory usage(I have 4GB on my system). If that is the case is it possible to limit the memory usage for a given function like the ImageSnapshot.captureImage() call above?
Is there maybe a way to generate the component into 2 or 4 ImageSnapshot objects and piece them together afterward?
Any advice would be greatly appreciated.
I believe the latest Flash Player 11 has a new feature to solve this issue:
"Enhanced high resolution bitmap support — BitmapData objects are no longer limited to a maximum resolution of 16 megapixels (16,777,215 pixels), and maximum bitmap width/height is no longer limited to 8,191 pixels, enabling the development of apps that utilize very large bitmaps." from this PDF
If you are using BitmapData, it makes a difference which FlashPlayer you are targetting:
versions VS maximum bitmapsize
flashplayer -9 : 2880x2880 px
flashplayer 10 : 4096x4096 px
flashplayer 11 : unlimited
I don't know what you exactly are trying to do with this huge capture, but I would recommend using tiles. Break it down to chunks of relative small bitmaps. Create them separately, so you don't have to open/create that huge amount of data in your memory.
Anyway, it would be nice to know if it is possible to encode that big-ass sized image, without Error #1000 out of memory errors.

Resources