<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi Sven,</p>
<p> </p>
<p>I just comitted a second version, which is also based on a "simple image" as you put it. At 50% HD I get 88fps on windows and 19fps on Mac. Couldn't test on Linux as that machine refuses to work properly. I have not used OpenGL but TImage instead. In other tests I have never seen any actual speed improvements of OpenGL over a native canvas, unless you create memory textures and can utilize the hardware acceleration.</p>
<p> </p>
<p>The reason to stream directly form disk is that if I would like to display a longer list of images I will not be able to store them in memory. Say I have a movie clip @ 24fps for 60sec. This would require (50%HD) 24 * 60 * 1.5 = 2GB of memory. What if I would like to display 10min? No chance... Please note that I really need the full resolution images here, so converting to jpeg to reduce memory footprint is out of the question. Implementing a memory cache is also on my list, but when playing the entire loop from start to end this will not help as each frame is displayed only once of course.</p>
<p> </p>
<p>In the "fast" version I stream data from a png and this is actually pretty fast now. However I will implement native loading of the images to optimize the process. But this is only optionally as my issue is not with the setup of the file cache but more with the drawing speed. As said, on windows I get 50%HD @ 88fps and full HD @35fps. Now Mac is worrying as it draws full HD @ only 12fps. Maybe opengl can draw more efficienctly in this case? I would also like to test SDL.</p>
<p> </p>
<p>Regards, Darius</p>
<p> </p>
<p> </p>
<p> </p>
<p>On 10 feb '12, Sven Barth wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<pre>Am 09.02.2012 19:41, schrieb Darius Blaszyk:</pre>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">I've put up the test app on the CCR. All three methods draw at roughly 10fps on windows and 6fps on mac. I haven't tried linux yet. I challenge everyone to find methods to speed up the the drawing using the current implementation. May the best man win!</blockquote>
<pre>On Linux I have roughly 5 FPS with all three methods... :(
I then tried to display the pictures using the OpenGLContext. For this I
modified your code quite a bit:
* the images are converted to a "simple image" (a record consisting of
width, height and the image data as an array of a record of 3 byte
values (red, green, blue))
* the images are kept in memory (no writing to a cache on disk the use
of which I don't really understand...)
* draw the images to the OpenGLContext
With this I achieve roughly 25 FPS using the 50% HD images, but the
startup time (the conversion from the PNG image to the simple image) is
around 5 to 10 minutes... (maybe .Canvas.Pixel[...] access isn't that
good for that purpose ^^)
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
</pre>
</blockquote>
<p> </p>
<p> </p>
<div> </div>
</body></html>