Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Plugin_TheoraVideoSystem optimizing...  (Read 1747 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Plugin_TheoraVideoSystem optimizing...
« on: September 20, 2005, 01:26:42 PM »

I added this topic to start looking at theora optimizations:

:arrow: MMX - > http://lists.xiph.org/pipermail/theora/2005-August/000953.html
:arrow: Possible Pixel Shader YUV->RGB decoding:
from Ogre forums:
Quote

could be a start :
http://www.fourcc.org/fccyvrgb.php
http://www.fourcc.org/source/YUV420P-OpenGL-GLSLang.c ( Fragment shader for openGL Surprised )
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Plugin_TheoraVideoSystem optimizing...
« Reply #1 on: September 20, 2005, 08:13:04 PM »

So, I just attempted to compile the MMX Theora version on Windows.. And well, no joy. The VC6 project files are not updated to use the MMX source, and when I tried to add them to the project, boom, lots of errors.. Probably my mistake.. I think I will instead just compile it on linux... I will then use the cheerios commercial with regular theora example player (which uses SDL) and the MMX version of theora and see if there is a big difference worth updating VC project files.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Plugin_TheoraVideoSystem optimizing...
« Reply #2 on: September 21, 2005, 09:23:35 AM »

Well, after a bit of source browsing, and looking at the theora mailing list, the MMX asembly is written as gcc inline asm, which does not compile with VC. Now, there was talk about writing it as external ASM (using a seperate assebler like NASM), but, nothing's been decided/done as far as I can see. Anyway, from my tests and some numbers reported in the mailing list, only a 7% sppedup results from using this. Now, perhaps this will make a larger difference when it is more fully optimized, or for larger/quality movies.. But, I will put this aside for now.


The other things which may be able to help speed up are:
 :arrow: YUV - > RGB Pixel shader - If someone could volunteer to try this, I would be happy :)
 :arrow: And, maybe instead of doing a pixel buffer copy in the blitting routine, perhaps locking the buffer to write on might lead to less memory (and maybe speed) overhead.
Logged