[MPlayer-dev-eng] [PATCH] vo_gl opt. and support for np2 textures

Ralovich Kristof tade at sch.bme.hu
Sat Nov 12 17:32:22 CET 2005


> Hi,
> On Fri, Nov 11, 2005 at 11:07:37PM +0100, Ralovich Kristof wrote:
>> I have created a patch for the libvo/vo_gl.c source file!
>> The patch adds the following:
>> -Checks for GL_ARB_texture_non_power_of_two extension during
>>  initialization, if available and enabled(see below), sets
>>  the texture size to the size of the movie( d_width, d_height
>>  in initGL() ).
>> -If no np2 support was found, or is disabled, it enables a non
>>  (always)square, but still power of two dimensioned texture.
>> -Disabling the np2 extension usage can be made by passing the
>>  'notexnp2' command line option. (example: /$mplayer -vo
>>  gl:notexnp2 somefile.avi'). By default it is enabled.
>
> First, making this default is IMHO not a good idea, because with almost
> all
> implementations this is slower.
> Second, you really should have checked out CVS first, the rectangle
> suboption already implements this.
>
>> In general the advantages of the optimization:
>> -For example, there is given a movie with dimensions of 640x304.
>>  The unpatched code would create a 1024x1024 texture (the smallest
>>  power of two sized square bigger than 640x304). My code creates
>>  a texture of size 1024x512 (the smallest power of two sized
>>  rectangle bigger then 640x304). Uploading the 1024x1024 sized
>>  texture requires about twice the bandwidth of uploading the
>>  1024x512 texture.
>
> This is nonsense, MPlayer never uploads the whole texture.
>
>> 2) If you use the gl vo, you probably want to pass 'slice-height=0'
>> too. GL wise it provides some speedup, theoretically.
>
> Did you actually test this? Because in practice it is more likely to
> cause (depending on video size) up to 20% slowdown.
>
> Greetings,
> Reimar Döffinger

Hello Reimar Döffinger,

sorry for the inconvenience. You are right I didn't checked out the CVS
version, I was living in the past. After reading the cvs file, I don't see
any reason to merge my patch. Once again, sorry for the inconvenience,

Kristof Ralovich




More information about the MPlayer-dev-eng mailing list