I like to once again drag up this topic-thread and the discussion about GPU accelerated video decoding if I may...
More and more articles are popping up on the internet about using the GPU (Graphic Processor Unit) to accelerate almost any mathematical function, and today I was refered to an new article on tomshardware.com named "
The hidden potential in your graphics card: A supercomputer?", in where it sais that a company called Peakstream not only claim have proof of concept on this, but actually they announced they they developed a new software platform (presumably a SDK with libaries) for C/C++ which can enable any application to take advantage of the superiour floating point performance of the GPU. Peakstream as a commersial company will sell their software tools for this as closed source, making it useless for XBMC. However the cencept it very interesting and once again it spings my imagination so I did some quick googling again and this is what I found:
This one specificly could possible be interesting for Xbox/XBMC:
http://www.cse.cuhk.edu.hk/~ttwong/demo/...wtgpu.html
it includes an open source example in C++ code which implements DWT (Discrete Wavelet Transform) on a Nvidias GPU for the JPEG2000 codec library JasPer. It also includes a standalone DWT-GPU C++ Class (source code with example program) that supports both FDWT (Forward Discrete Wavelet Transform) and IDWT (Inverse Discrete Wavelet Transform). Problems might be for us though that they only made it for and tested with nVidia GeForce FX (and newer) graphics-adapters, so maybe it could be used on older nVidia GPU with some tweaking, but then again maybe not? In any case, even if it was possible then it would probebely have to be specificaly added per codec (ie. the FFmpeg libavcodec or libmpeg2 source code for each codec for the DVDPlayer and/or MPlayer that we want to support this), right?
The above application could possible be used for both accelerated video decoding and for visual effects on textures in the GUI/skin(?)
Another similar project with available C++ open source code which also might be interesting is
BrookGPU (
sourceforge.net project). Brook for GPUs is a compiler and runtime implementation of the Brook stream program language for modern graphics hardware. The goals for this project are; Demonstrate general purpose programing on GPUs, provide a useful tool for developers who want to run applications on GPUs, Research the stream language programing model, streaming applications, and system implementations.
In theory the Xbox GPU should be able to help off-load the CPU with some MPEG-2 (and possible MPEG-4) decoding tasks with its floating point (alpha blending in the pixel/vertex shader?) pipeline:
- Half-Pel Motion Compensation (1/2 pel mocomp) for MPEG-2
- Quater-Pel Motion Compensation (1/4 pel mocomp) for MPEG-4
- Precision control for motion compensation on 8-bit ALU
- DCT/iDCT
- Deinterlacing
- Frame-rate conversion
- Post-processing filters
- GPU assembly optimization
Here is another interesting example (though probebely not applicable on the Xbox for XBMC as it's designed for OpenGL?) is in this PDF:
http://www.vis.uni-stuttgart.de/ger/rese...wavelet%22
It describes a method for calculate wavelet using OpenGL (however, it contains only mathematical and some timings, not source code). Using GLSL (OpenGL shading language) one could possible make a GPU program that can calculate the wavelet of any image.
Even a Microsoft's software-engineer claims to have achieved GPU accelerated video decoding of high definition MPEG-2 (Transport Stream) and WMVHD (WMV9 HD) in real-time on the original Xbox. See the "Research Statement" and "Projects Highlight (Previous Projects)" on
http://research.microsoft.com/~jackysh/ ...hell, maybe a programmer should be so bold as to e-mail this Guobin (Jacky) Shen person, tell him about XBMC as ask him nicely for some advice or a referal to any other programmer that might be willing to assist.
He has posted an interested paper on the topic (and linked to a few others):
http://research.microsoft.com/~jackysh/publication.htm
PS! I would think that JMarshall as a mathematician would at the very least find all this a bit interesting
...well, maybe some day, one can always dream
PPS! I have of course posted about this idea previously in this (very long) topic-thread, (but no programmer ever followed through with the research or any development they did), here is a little reminder on those ideas still could still be vaid(?):
http://www.gpgpu.org
http://216.239.57.104/search?q=cache:npW...pdf+&hl=en
http://www.cs.washington.edu/homes/oskin...ro2002.pdf
http://ieeexplore.ieee.org/xpl/freeabs_a...mber=30783
http://www.tomshardware.com/hardnews/200...35943.html
http://www.tomshardware.com/hardnews/200...61353.html
FYI; after researching, one thing that does not seem possible is the previously mentioned DXVA API, that it not possible on the Xbox because Microsoft do not provide these API-libraries (or a DXVA SDK) for the Xbox.