2014-01-01, 13:49
Hello XBMC community ,
since a few weeks I 'm already thought why there is no convolution engine in XBMC for audio output.
It would be really great if we have an equalizer, digital room correction ... etc. in XBMC. So I wanna have such functionality like BruteFIR in XBMC.
Hence the question: is there someone working on an implementation of an convolution engine for XBMC?
To better understand the partitioned convolution algorithm of BruteFIR, I have done a test implementation using MATLAB and CUDA (GPU programming). Of course, at the moment it is not finished and it needs to be done a lot, but I'll keep working on it and would like to create a library that allows partitioned convolution for use with CUDA . Surely, I will implement the same algorithms on the CPU, so that PCs can be used that do not have a NVIDIA graphics card.
Another goal might be to replace CUDA by OpenCL, but at the moment I have no programming experience with OpenCL.
Surely you introduce yourself the question why he takes CUDA for partitioned convolution. The Answer is quite simple, because my PC in my living room is an NVIDIA ION and CPU is not really fast, but the GPU has a lot of processing power
I have searched a bit in the code of the audio engine to find a good place for the calculation of the convolution. While I don't understand the whole structure of the audio engine of XBMC (it is simply too powerful;-)), but I think a good place could be the method "Output Sample (...)" in the "ActiveAESink.cpp" file (see code snippet below). Is this a good place for testing?
So now it's your turn! What do you think about my plan?
since a few weeks I 'm already thought why there is no convolution engine in XBMC for audio output.
It would be really great if we have an equalizer, digital room correction ... etc. in XBMC. So I wanna have such functionality like BruteFIR in XBMC.
Hence the question: is there someone working on an implementation of an convolution engine for XBMC?
To better understand the partitioned convolution algorithm of BruteFIR, I have done a test implementation using MATLAB and CUDA (GPU programming). Of course, at the moment it is not finished and it needs to be done a lot, but I'll keep working on it and would like to create a library that allows partitioned convolution for use with CUDA . Surely, I will implement the same algorithms on the CPU, so that PCs can be used that do not have a NVIDIA graphics card.
Another goal might be to replace CUDA by OpenCL, but at the moment I have no programming experience with OpenCL.
Surely you introduce yourself the question why he takes CUDA for partitioned convolution. The Answer is quite simple, because my PC in my living room is an NVIDIA ION and CPU is not really fast, but the GPU has a lot of processing power
I have searched a bit in the code of the audio engine to find a good place for the calculation of the convolution. While I don't understand the whole structure of the audio engine of XBMC (it is simply too powerful;-)), but I think a good place could be the method "Output Sample (...)" in the "ActiveAESink.cpp" file (see code snippet below). Is this a good place for testing?
So now it's your turn! What do you think about my plan?
Code:
switch (m_convertState)
{
....
convolutionEngine (...);
while (frames> 0)
{
MaxFrames = std :: min (frames, m_sinkFormat.m_frames);
written = m_sink-> AddPackets (buffer, MaxFrames, true, true);
...