[asterisk-dev] GPU Audio Codec Transcoding within Asterisk PBX

Joseph Benden joe at thrallingpenguin.com
Thu Jan 1 22:33:29 CST 2009


On Jan 1, 2009, at 10:28 PM, Felipe Bergo wrote:

> The project started with transcoding g.711u to signed linear and the
> reverse. It was thought that performing other transcoding operations
> would be reasonably represented by this.
>
> Huh ?
>
> G711.u / G711.a <=> signed linear transcoding is a trivial table  
> lookup with no arithmetic workload whatsoever. It does not represent  
> the CPU-intensive transcoding operations such as G729 / iLBC /  
> speex, which could benefit from GPU implementations, nor any video  
> codec.
>
> A GPU implementation of G711<=>linear transcoding is probably  
> wasting more instructions to transfer data from and to the GPU board  
> than required to perform the transcoding in loco.


The purpose was not to look at vectorizing g.711u, but rather to find  
the architectural issues surrounding CUDA for advanced audio/video  
transcoding. The amount of work required to properly support CUDA API  
is quite large. By re-reading the quick outline of CUDA API  
requirements in the original message, you'll see what I'm referring  
to. If CUDA is a potential candidate for addition to Asterisk, these  
architectural issues will have to be pursued.

The research shows that audio transcoding gains the most current  
benefit, by using SIMD CPU instructions. This is because SIMD does not  
require the architectural changes; however, SIMD may require a  
differing codec algorithm. SIMD requires operating on vectors of  
floating-point or integer data, in a similar way that CUDA does - so,  
rewriting codecs using SIMD offers an easier route to CUDA in the  
future.

Side note: I am working on x86 and x86_64 SSE2 SIMD support within  
DAHDI for usage by conferencing and echo cancelers. The initial  
results are very promising, but further testing needs to be done.

Comments, suggestions, or ideas are welcomed,
-Joseph Benden
Thralling Penguin LLC





More information about the asterisk-dev mailing list