Log in

View Full Version : Surround on stereo headphones


3dsnar
1st June 2006, 11:52
I have implemented a modified HRTF (head related transfer functions) based surround panorama simulation with the use of stereo headphones.
Our decoder can be downloaded from:
http://www.aud-x.com/content/view/12/26/

Some basic facts: What is HRTF filtering?
The basic question is why do we perceive sound direction, while having only
pair of ears (i.e. this seems to be sufficient for stereo, but why does it work for surround sound perception?).
The answer is that we in fact our ears receive only a stereo signal and than the surround perception is generated by our brain. Since our head, shoulders and ears cause some acoustic wave reflections, based on this our brain is able to ‘guess’ what is the source direction.
The idea is to emulate such reflections in digital domain (with some DSP operations), before playing with stereo headphones, so listeners brain should be able to ‘decode’ such stereo source to surround.
And indeed it works great, however only in case of very precise simulation of individual’s
shoulders, head and ears shape. So the generalized solutions tuned for an average listener usually
are pretty disappointing, and the sound is usually perceived as a linearly distorted stereo signal,
rather than surround (we differ much from each other, in terms of body shape ;) )

The algorithm that I’ve implemented affects only phase of the signal, without the linear distortions. This however significantly limits vertical direction perception, and also limits surround speakers direction perception. In order to overcome this limitation, I have added a reverb algorithm, which emulates sound propagation in a 20 square meters room (4m x 5m). This is not a normal reverb effect, because for the left surround channel, the impulse response has been emitted from the surround left speaker position, and recorded in the sweet spot with a microphone directed towards the surround left speaker. Similar procedure has been applied for the surround right (impulse generated in the right speaker position, and room response has been captured with a microphone directed towards the right surround speaker).
Based on the gathered impulse responses, a simplified IIR filter coefficients have been calculated (in order to decrease computational complexity of long FIR convolutive filtering with the use of the room impulse responses).

Front channels (FL, C and FR) have been simulated only with the use of phase adjustments, coming from the HRTF concept.
There is still a lot of room for improvements, but I think the result is very promising.

Please test it and provide some critical comments!
If you have any questions, I’d be happy to answer them.

The algorithm (embedded in our DSfilter) can be applied for any 5.1 source,
So it can be used for AC3 stream for example.

Hare is some test clip (in Aud-X MP3 5.1 format).
http://forum.videohelp.com/images/guides/p1526266/test%20-%20audx_mp3_5.1_128kbps.mp3

:thanks: , 3d

Sharktooth
1st June 2006, 13:10
:eek:
nice stuff, thanks!!!

3dsnar
1st June 2006, 17:17
Please let me know if you have any comments/suggestions,
Thanks.

Sharktooth
1st June 2006, 17:33
sure, i will try that out as soon as i get home... >)

3dsnar
1st June 2006, 17:39
One more thing.
Here is a AC3 clip, for comparison.
http://forum.videohelp.com/images/guides/p1526377/zzz_fifthelem_orig48.ac3

Please test it with
* Aud-X virtual surrond (VS) algorithm
* FFDshow HRTF algorithm (to see what I mean by linear distortions)
* AC3filter (to see the difference between the VS algorithm and a regular stereo downmix)

Sharktooth
2nd June 2006, 13:30
ok a list of problems i experienced :

- sometimes MPC and WMP crash on closing (only when aud-x is decoding).

- SRS WOW (WMP) effects do not work when audix is decoding.

3dsnar
2nd June 2006, 21:26
Yeah, I think I found the crashing problem.
This is related to AC3 decoding with Aud-X DSfilter.
--

As a temporary solution, please disable AC3 stream compatibility in Aud-X, so other DSfilter will take over AC3-> 5.1 PCM conversion.
The PCM will be directed to Aud-X and the virtual surround applied on that. And it should not crash.
---
I will let you know when the fixed version will be released.
I have to also investigate the SRS WOW bussiness
(but have to find out what it is first ;) )
Cheers, 3d.

Sharktooth
3rd June 2006, 02:54
uhm, it crashes also when decoding standard stereo mp3s and 5.1 mp3s...
however disabling ac3 decoding workaround seems to work.

Avish
4th June 2006, 12:12
Yeah, I think I found the crashing problem.
This is related to AC3 decoding with Aud-X DSfilter.
--

As a temporary solution, please disable AC3 stream compatibility in Aud-X, so other DSfilter will take over AC3-> 5.1 PCM conversion.Hi 3dsnar,

I hope u remember that me too reported the crashes in this thread http://forum.doom9.org/showthread.php?p=835510#post835510

And 90% of the videos I tested were with mp3 audio. So I think it is not related to AC3 decoding only.

3dsnar
4th June 2006, 14:58
Yeah. I remember. However I could not crash the decoder
on mp3s, so we will remove the AC3 bug first, and than will see
if it changes the other bugs. If not, the investigation will continue ;)

BTW. did you have the same problems with previous version of Aud-X?
(1.21) or this is something new?

Cheers, 3d

Avish
4th June 2006, 15:06
Yeah. I remember. However I could not crash the decoder
on mp3s, so we will remove the AC3 bug first, and than will see
if it changes the other bugs. If not, the investigation will continue ;)

BTW. did you have the same problems with previous version of Aud-X?
(1.21) or this is something new?

Cheers, 3d:D Haha. Okz. & This is the first time I did this much testing with Aud-X. So don't know about the previous versions. :D

3dsnar
4th June 2006, 15:20
Hmm. OK, this would have been a valuable information...

Avish
4th June 2006, 17:59
Hmm. OK, this would have been a valuable information...If you could provide me the previous version...

3dsnar
4th June 2006, 20:41
OK, please provide me with your email,
and I'll send it.
Thank you!!

Sharktooth
5th June 2006, 02:58
Another problem.
when using aud-x as decoder the avisynth directshowsource() filter returns an error message: "the filter graph manager won't talk to me".
that could be a problem for programs (like sng, behappy, megui ...) that use DirectShowSource() for input.

3dsnar
5th June 2006, 08:13
OK, thanks for this bug report.
Maybe it is due to the fact that the DSfilter
needs to be conected to DirectSound output
(this is a limitation of the filter).

Sharktooth
5th June 2006, 12:28
aud-x sounds good and more "clean" but much less "surround" than HRTF.

3dsnar
5th June 2006, 19:25
OK, thanks for the test.
Interestingly, I had opposite experiance,
but it is a subjective matter :)
Cheers, 3d.

Sharktooth
5th June 2006, 20:29
maybe it depends on the headset too.
i'll try with a different one.

IgorC
5th June 2006, 21:42
http://forum.videohelp.com/images/guides/p1526377/zzz_fifthelem_orig48.ac3

This file encoded at 128 by aud-x 1.22 encoder sounds like mono on stereo phones. Decoder last 1.22 version. 5.1 simulation.
At 192 it sounds better but still has very lossy spatial image.

No problem with this sample encoded by Vorbis and last Nero AAC - both 5.1 128 kbit/s.

3dsnar
6th June 2006, 06:29
Did our DSfilter indicate that the 128 kbps
file was Aud-X?
Or PCM mono?
(probably it was decoded as a regular mp3 somewhere before
it was directed to our DSfilter).
What player did you use?