А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014

  • 327 views
Uploaded on

 

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
327
On Slideshare
325
From Embeds
2
Number of Embeds
1

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 2

http://www.slideee.com 2

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Sound Processing in Consumer Electronics and in PulseAudio Alexander Patrakov
  • 2. About Myself ● Author of some sound processing code – Dcaenc: a Free DTS-compatible encoder – Wine resampler ● Dayjob:
  • 3. Hardware LG 47LM640T Onkyo TX-NR626
  • 4. Common effects ● Equalizer presets – Sound Mode, Listening Modes ● Virtual Surround – Theater-Dimensional Mode ● Dynamic Range Compression – Late-Night Mode
  • 5. ● User EQ ● ClearVoice II ● Bass, Tremble ● Speaker Distance Compensation ● Bass Management ● Digital room Correction
  • 6. 5.1 Speaker Setup Delay is needed!
  • 7. Instead of the equalizer
  • 8. It Just Works!
  • 9. PulseAudio
  • 10. DSP-related functionality ● Equalizer ● Resampler ● Channel Remixer ● Virtual Surround ● Bass Management ● Encoders & Decoders ● LADSPA Effects ● Echo Cancellation
  • 11. In this talk ● Equalizer ● Resampler ● Channel Remixer ● Virtual Surround ● Bass Management ● Encoders & Decoders ● LADSPA Effects ● Echo Cancellation
  • 12. module-equalizer-sink Author: Jason Newton
  • 13. Spectrum * Filter
  • 14. Spectrum * Filter ?
  • 15. Convolution t
  • 16. FIR filter design ● Given the desired frequency response – Take IFFT – Shift the signal to positive time values – Truncate the signal to a suitable length – Apply a windowing function http://www.dspguide.com/ch17/1.htm
  • 17. Divide and Conquer FFT-based magic
  • 18. Circular convolution t
  • 19. Convolution t
  • 20. Tricks Against Circular Convolution ● Overlap-Save ● Overlap-Add
  • 21. Overlap-Save Corrupted fragment The input signal is split into overlapping segments Corrupted fragments are thrown away (the previous segment contains a non-corrupted version)
  • 22. Overlap-Add Space for growth Pad the input signal fragments with zeroes Perform circular convolution Result: overlapped segments of output signal Resolve the overlap by summation
  • 23. module-equalizer-sink ● Where is this? – Take IFFT – Shift the signal to positive time values – Truncate the signal to a suitable length – Apply a windowing function
  • 24. module-equalizer-sink ? Latency = ?
  • 25. module-equalizer-sink /* FIXME: Please clean this up. I see more commented code lines * than uncommented code lines. I am sorry, but I am too dumb to * understand this. */ fftwf_malloc(); …; free(); Buffer Overflow
  • 26. module-equalizer-sink EPIC FAIL
  • 27. module-ladspa-sink + mbeq + veromix
  • 28. module-virtual-surround-sink 5.1 recording Stereo Headphones Author: Niels Ole Salscheider
  • 29. Amplitude difference Woof! Woof!
  • 30. Delay Woof..!...Woof!
  • 31. Spectral features
  • 32. module-virtual-surround-sink ● Convolution with HRIR (Head Related Impulse Response) – HRIR has to be downloaded separately
  • 33. Virtual Surround on Speakers ● Ambiophonics – Speaker crosstalk cancellation – Same technology as in soundbars – Not in PulseAudio yet
  • 34. HRIR (left ear)
  • 35. HRIR (left ear) Cutoff at 64 samples (to save CPU time)
  • 36. HRTF (left ear)
  • 37. HRTF (left ear) This sounds cheap
  • 38. Conclusions
  • 39. Open Tasks ● See GSOC thread: http://goo.gl/7fVwTk
  • 40. Other Relevant Projects ● Speex: contains a denoiser ● Vlevel: dynamic range compressor ● BruteFIR: a fast convolution engine ● DRC-FIR: digital room correction