On 10.01.2007 19:13, Pablo Martin wrote:
> Indeed, if the video is PO2 it is rendered, 

Depending on the actual values, one of the dimensions may be mapped to
the next lower power of two, and a Blit() would hence blit an area
bigger than the texture, which will cause glTexSubImage (the underlying
API) to fail.

If a video is to be used in a map, using PO2 is adviseable anyway. If
it's to be used for showing some video (a la cinematics), you can try to
get a RECT texture and/or request that the texture is resized towards
the next bigger power of two (so you avoid blitting an area exceeding
the texture).

> but i noticed the method of
> blitting from the texture handle is quite slower than changing the
> texture target (20 fps against 120 with a 256x256 video). Is this
> normal? 

Make sure the textures are uncompressed ("nocompress" class). Also try
disabling mipmaps.

> Otherwise seems to me using the other method might help also the
> mng textures (which usually slow down scenes considerably). This might
> be depending on video card though, but the perfomance drop is pretty
> harsh to consider (note blitting from texture handle would be better for
> me as it might help with some r<->b switch).

If red and blue are flipped, either upload the pixels as BGRA8888 or ask
ffmpeg to provide the data in a more appropriate format.
('PIX_FMT_RGBA32' seems to resolve to storage as BGRA. The ffmpeg docs
prolly help with picking the right format:
http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/avutil_8h.html#33d341c4f443d24492a95fb7641d0986.)

-f.r.

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Crystal-main mailing list
Crystal-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to