[MPlayer-dev-eng] [PATCH] vo_gl small change

Arpi arpi at thot.banki.hu
Sat Dec 21 22:15:48 CET 2002


Hi,

> As I saw in documentation, my problem(near to 0.060 fps with -vo gl) is
> known...
> I experimented some with TOOLS/GL-test/gltest...
> Here are results (for BYTES_PP = 3):
> With FAST_BLIT defined, I get that 0.060 fps with binary nVidia driver
> installed.
> (I forgot to mention, that I'm using nVidia TNT2 Vanta card with 3123
> binary drivers).

you should use -vo gl2 then, it's known to be fast with nvidia.

> But when FAST_BLIT was undefined, I got...17-20 fps !
> So looking at gltest.c I wrote some code...
> 
> Use '-vo gl', or '-vo gl:f' to use old code, or '-vo gl:s' for enabling 
> my code. All the difference, it that for drawing my code uses single 
> glTexSubImage2D call, instead of per-line cycle.

actually if we want it to be optional, it should be a numeric parameter,
as slice height. the 'FAST_BLIT' version uses slice height == 1, while
the blit-whole-frame mode uses slice height == image_height.
maybe slice heiht 4 or 8 is even faster with some cards (needs experiment,
actually the slice height should be the optimal compromise between register
programming overload and the cpu time saved by DMA textured transfer)
(the idea behind this FAST_BLIT hack is that while DRI/MESA is converting
the pixels the card can do the DMA transfer of the previous line)

there should be a loop like:

  for(y0=0;y0<height;y0+=slice_height){
     for(y=0;y<slice_height;y++){
        // convert & blit lines (y0+y) .. (y0+y+slice_height-1)
     }
  }


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list