[haiku-development] Re: Optimizing Painter::_DrawBitmapBilinearCopy32

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 21 Jun 2009 16:04:41 +0200

On 2009-06-21 at 14:13:00 [+0200], Christian Packmann 
<Christian.Packmann@xxxxxx> wrote:
> Half an hour ago, Haiku rendered a movie using the MMX/SSE code for the 
> first time, playing The Life of Brian in VLC:
> 
> http://www.elenthara.de/Haiku/Haiku_VLC_SSE.jpg

So does that mean the movie managed to pull you in for half an hour before 
you realized what was happening? :-D

> The colors are /supposed/ to be that way, I set the red channel to full 
> in my code to make sure app_server uses the proper code path.
> 
> This is far from release-ready, I just hacked the code in for a first 
> test. There are still many problems with overlapping windows, mouse 
> movement leaving artifacts, etc.
> 
> CPU usage drops significantly, even though there is still quite a high 
> load (Haiku uses 2 VCPUs on my Q9550, which runs at 3.33 GHz at the 
> moment).
> 
> Stephan, are there any other performance-critical functions used for 
> movie playback in app_server? Color conversion. data copying, etc. If so, 
> I could take a look at the next optimization targets to tackle after 
> integration of this is done.

Awesome news, Christian! Actually, there are a few things we could improve, 
but these are not so "obvious" as with the scaling. We would have to 
discuss those a bit. I would propose to integrate your work before 
discussing any other candidates for optimizations in the app_server. There 
is nothing further to be done to accelerate playing movies. Color space 
conversion happens client side and VLC most likely already uses an 
optimized routine for that. Maybe we can have a look at the alpha blending 
in app_server later. What also bothers me is that colors get darker because 
of that imprecise " >> 8" in many places. But like I said, first of all I 
would love to enjoy the fruits of your hard labor! :-D

Best regards,
-Stephan

Other related posts: