Hi everyone! I'm just a new member in this mailing list thats why my question wouldn't be original. Did anyone try to add CUDA acceleration for dsputil acceleration, DCT and IDCT for example? CUDA is a new Nvidia hardware platform with additional development tools. Thanks for your answers.
On Thu, Dec 27, 2007 at 02:51:31PM +0300, Anatoliy wrote:
Hi everyone! I'm just a new member in this mailing list thats why my question wouldn't be original. Did anyone try to add CUDA acceleration for dsputil acceleration, DCT and IDCT for example? CUDA is a new Nvidia hardware platform with additional development tools.
Noone tried AFAIK, but if you want to try patches are certainly welcome though likely just (I)DCT will not lead to much speedup. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
Michael Niedermayer wrote:
Noone tried AFAIK, but if you want to try patches are certainly welcome though likely just (I)DCT will not lead to much speedup.
[...]
As I have seen after code reseaching there is one big structure DSPContext containing all available methods for DSP optimization. There are too much methods. Which of them mostly important for codec time optimization?
Anatoliy wrote:
As I have seen after code researching there is one big structure DSPContext containing all available methods for DSP optimization. There are too much methods. Which of them mostly important for codec time optimization?
dsputil works this way, you have an init function that happens to be called (that part should be organized a bit soon) and that overrides the default C function with your optimized function. those function will be called in any codec using them so you just have to pick which function you want to write first and make sure it doesn't have any particular coupling forcing you to implement also others in order to have the expected result (certain function ask for transposed input and mixing and matching them with the C implementation may lead to unespected results IIRC.) the /ppc directory has the function grouped in files with more or less self explaining names while the /i386 has an almost complete coverage of functions if you want to see them implemented. lu -- Luca Barbato Gentoo Council Member Gentoo/linux Gentoo/PPC http://dev.gentoo.org/~lu_zero
On Thu, Dec 27, 2007 at 11:37:01PM +0300, Anatoliy wrote:
Michael Niedermayer wrote:
Noone tried AFAIK, but if you want to try patches are certainly welcome though likely just (I)DCT will not lead to much speedup.
[...]
As I have seen after code reseaching there is one big structure DSPContext containing all available methods for DSP optimization. There are too much methods. Which of them mostly important for codec time optimization?
I do not think that adding cuda support via DSPContext will work out very well. The reason is that these functions are all working on small amounts of data at a time ... It would make more sense if you would look at the code below HAVE_XVMC. And implement CUDA support similarely. The XVMC code does the bitstream decoding in libavcodec while passing motion vectors and idct coeffs to XVMC, that way its easy to collect data for many blocks and then work on them in parallel. XVMC IIRC supports just mpeg1/mpeg2 though the design can easily be extended to mpeg4 ASP (divx4/5) and msmpeg4v3 (divx3). H.264 though is a different beast and will require a seperate (and more complex) solution. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates
Michael Niedermayer a ?crit :
On Thu, Dec 27, 2007 at 11:37:01PM +0300, Anatoliy wrote:
Michael Niedermayer wrote:
Noone tried AFAIK, but if you want to try patches are certainly welcome though likely just (I)DCT will not lead to much speedup.
[...]
As I have seen after code reseaching there is one big structure DSPContext containing all available methods for DSP optimization. There are too much methods. Which of them mostly important for codec time optimization?
I do not think that adding cuda support via DSPContext will work out very well. The reason is that these functions are all working on small amounts of data at a time ...
Agree. From what I remember of CUDA design (and GeForce 8 h/w in general), we're talking about 1000s of threads doing some very specific calculation which involves a design far different from DSPContext. It could be seen like PS3' SPUs but at a much larger scale. But again, as Rathann said, even if CUDA SDK is free (to download and use at least, not sure about open-source), it relies on nVidia proprietary driver for Xorg.
XVMC IIRC supports just mpeg1/mpeg2 though the design can easily be extended to mpeg4 ASP (divx4/5) and msmpeg4v3 (divx3). H.264 though is a different beast and will require a seperate (and more complex) solution.
However the only extension I know about comes from VIA driver but seems to be h/w specific which is bad imho. XVMC so called successor seems to be VA-API but I've already started a thread about it months ago. Ben
Michael Niedermayer wrote:
I do not think that adding cuda support via DSPContext will work out very well. The reason is that these functions are all working on small amounts of data at a time ...
In my case there is a problem for running multiple video streams on one host. May be 10, 20 or more streams. The all reason for using CUDA is to displace mostly hard encoding and decoding work from CPU to GPU. So user can run other programs with satisfying results. Thats why time minimization for one stream with CUDA support is not a target for this design. Did anyone tested current ffmpeg en(de)coder for multiple video streams?
participants (4)
-
ben@geexbox.org -
lu_zero@gentoo.org -
michaelni@gmx.at -
nenashev_as@mail.ru