Difference between revisions of "User:Bluddy"

From ScummVM :: Wiki
Jump to navigation Jump to search
 
(14 intermediate revisions by the same user not shown)
Line 17: Line 17:
== Working On ==
== Working On ==
* PSP Optimization
* PSP Optimization
** Rendering speedup - done
** Rendering speedup: done and makes vsync super accurate (better than PC)
*** Made the wait for vsync not slow down the main thread, by using callbacks. Turns out the callback mechanism that's tied to the GU is unable to call waitForVblank, but the regular callback mechanism can. This reduced the wait from 15ms on average to 3ms, part of which is due to the fact that by notifying the callback I think we switch context to another thread. Not a huge deal.
** MP3 using Media Engine: done
** Timidity
*** Turn into thread for better efficiency (allowing music more processing time without slowdown)
*** A lot of work. May improve speed over midi, but it'll be the last optimization.
*** But will threading really help? It's pretty complicated. What about syncing?
** MP3 using Media Engine
*** Correct small bug with seeking (already corrected in mainstream mp3 decoder). Clean up messy code.
*** I made a hack that'll do it, but unfortunately nobody knows how to use it for 22kHz mp3s, which is all of our MP3s. This means I need to reverse engineer the PSP FW in order to figure out how to do this properly (the PSP FW knows how to use the ME for 22 kHz files). So this is going to be hard too.
** Video Speedup
** Video Speedup
*** Smush can be sped up for aligned platforms, and VFPU cache can be used in PSP
*** Actually harder than expected: it's hard to find codecs that do the kind of work that the VFPU will improve
*** Check other codecs for possible speedups using VFPU
*** Check other codecs for possible speedups using VFPU/alignment
** Other speedups
** Tests: done
*** Tests
*** how much reading is done by MP3 rendering/movie playback? How much will we need to cache? done. Reads chunks of 15-25KB preceded by small 4KB reads. Whole MP3 loads are a problem (200KB+).
**** cached vs uncached access
*** How often do we read from the memory stick when we're going fast (movies)? Can we use a thread to do async reading? Is there enough time between reads?
**** how long does changing priority take?
** Improve memcpy: alignment, rotation
**** how long do different length MS reads take?
*** Memcpy is done. Not sure how to improve it with VFPU.
**** how much reading is done by MP3 rendering/movie playback? How much will we need to cache?
*** Memmove can also be improved -- needs reverse memcpy.
*** Improve memcpy: alignment, rotation
** No More SDL: done.
**** Possibly use VFPU's cache for even better performance.
** Threads for audio: consumer and producer
*** Improve SDL audio output
*** Again, is this really helpful? It may allow lowering of priority, but only temporarily? What about syncing?
**** SDL blocks when outputting audio. This is the thread we do most work in, so don't block. Done.
* Aspect Ratio: done
**** Also, SDL creates threads that ALL have VFPU bit set. That's not efficient when switching contexts.
* Replace stdio with PSP functions: done.
**** Additionally, change priority so that MP3/MIDI rendering is in same priority and is fairer while getting called back is higher priority.
** Turns out it's a huge speed boost!
**** Maybe add a task switch in the Mixer to allow main thread to do stuff if there's a lot of mixing (and it's all from memory).
* Timidity
*** Caching of MS is sorely needed
** A lot of work. May improve speed over midi and sound better.
**** Implement cache that reads while other threads don't (mutex) and fills up memory with file data.


== To Do ==
== To Do ==
* PSP
* PSP
** MP3 playback with Media Engine
** Groovie video is slow
** Optimize speed in general
*** Seems like problem is in Groovie engine. Sounds start out fine and then get crackly.
** Optimize video playback speed
** Use libTimidity for music
** Use libTimidity for music
* Generic virtual keyboard: take my keyboard and make it available to all. Involves switching from bitmaps to vectors.
* Generic virtual keyboard: take my keyboard and make it available to all. Involves switching from bitmaps to vectors.
* Generic ELF loader
* Generic ELF loader
** Already done in GSOC. Solve issue with loading one plugin at a time.
* MP3 header processing for faster seeking and getting the file length.
* Image Viewer
== Ideas ==
* PSP may some day be unable to load ScummVM plugins as they are, because it's shifting towards accepting only PRX files (ie. PIC code). Some solution will be needed to adapt the current plugin code for PIC in the main executable.
** Idea: dump the symbol table of the main executable into another file. When loading plugins, load this into memory. Create a symbol in memory using ld script that will indicate where in memory the main executable was loaded. Finally, relocating the plugins will obviously be more work since we don't have ld to do some of the job for us. We might need 2 MipsPlugins: MipsComplete and MipsIncomplete.
** Alternatively instead of dumping the table, just copy the executable into the plugin directory and rename it base.plg.

Latest revision as of 20:01, 11 October 2010

Bluddy
Name Yotam Barnoy
Team Member since 2009-09-22
Working on PSP platform
PSP Optimization
Personal webpage/BLOG -
Email -

Worked On

  • PSP
    • Suspend/resume support
    • Plugin support (ELF loader)
    • Console-oriented virtual keyboard
    • D-pad directional support
    • Eliminating the evil undead flickering bug (it was a tough one)
    • Refactoring, redesign and cleanup

Working On

  • PSP Optimization
    • Rendering speedup: done and makes vsync super accurate (better than PC)
    • MP3 using Media Engine: done
      • Turn into thread for better efficiency (allowing music more processing time without slowdown)
      • But will threading really help? It's pretty complicated. What about syncing?
      • Correct small bug with seeking (already corrected in mainstream mp3 decoder). Clean up messy code.
    • Video Speedup
      • Actually harder than expected: it's hard to find codecs that do the kind of work that the VFPU will improve
      • Check other codecs for possible speedups using VFPU/alignment
    • Tests: done
      • how much reading is done by MP3 rendering/movie playback? How much will we need to cache? done. Reads chunks of 15-25KB preceded by small 4KB reads. Whole MP3 loads are a problem (200KB+).
      • How often do we read from the memory stick when we're going fast (movies)? Can we use a thread to do async reading? Is there enough time between reads?
    • Improve memcpy: alignment, rotation
      • Memcpy is done. Not sure how to improve it with VFPU.
      • Memmove can also be improved -- needs reverse memcpy.
    • No More SDL: done.
    • Threads for audio: consumer and producer
      • Again, is this really helpful? It may allow lowering of priority, but only temporarily? What about syncing?
  • Aspect Ratio: done
  • Replace stdio with PSP functions: done.
    • Turns out it's a huge speed boost!
  • Timidity
    • A lot of work. May improve speed over midi and sound better.

To Do

  • PSP
    • Groovie video is slow
      • Seems like problem is in Groovie engine. Sounds start out fine and then get crackly.
    • Use libTimidity for music
  • Generic virtual keyboard: take my keyboard and make it available to all. Involves switching from bitmaps to vectors.
  • Generic ELF loader
    • Already done in GSOC. Solve issue with loading one plugin at a time.
  • MP3 header processing for faster seeking and getting the file length.
  • Image Viewer

Ideas

  • PSP may some day be unable to load ScummVM plugins as they are, because it's shifting towards accepting only PRX files (ie. PIC code). Some solution will be needed to adapt the current plugin code for PIC in the main executable.
    • Idea: dump the symbol table of the main executable into another file. When loading plugins, load this into memory. Create a symbol in memory using ld script that will indicate where in memory the main executable was loaded. Finally, relocating the plugins will obviously be more work since we don't have ld to do some of the job for us. We might need 2 MipsPlugins: MipsComplete and MipsIncomplete.
    • Alternatively instead of dumping the table, just copy the executable into the plugin directory and rename it base.plg.