[FFmpeg-devel] [PATCH] [RFC] libavfilter HRTF/room acoustics filter [1/2]

Yue Shi Lai ylai at users.sourceforge.net
Tue Aug 2 16:16:34 EEST 2016

Dear all,

The following proposed filter is a follow up from an inquiry I received
now almost 3 years ago, to relicense MPlayer's HRTF filter
(libaf/af_hrtf) for FFmpeg. In the mean time, I have developed a much
improved version that somehow never got followed up on the MPlayer dev
list, which I would like to submit to the perhaps more active FFmpeg list.

The main features in version, which I believe is still unique at the
moment among FOSS implementations:

- Uses IIR filterbank (partially due to the fact many years ago, there
was no FFT in FFmpeg/MPlayer), where the HRTF is encoded in 8 1/1 octave
filter impulse amplitude/delays, taking a cue from CELP codecs.

- Properly equalized, a major problem when directly applying HRTF

- Simulates not just HRTF, but reflection off the wall of a room (and
contains a small library of acoustically optimized rooms)

- Also has late reverberation, that approximates the tail of the 3D
ray-traced early reflection, when the latter becomes too computationally

Attached is a first attempt to port this filter to FFmpeg, potentially
with many coding inconsistencies to be addressed - given the large code
size. To keep the patch size down, I removed two features vs. the
version I posted on the MPlayer-dev-eng list:

- 2nd order coefficients (will quadruple the size of the patch to ~ 4 MB)

- integrated matrix decoder (probably better suited as a separate filter)

I would be grateful for vigorous tests, and any feedback/criticism
regarding both the coding and acoustics.

Best wishes,

Yue Shi Lai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-HRTF-filter-ported-from-MPlayer-1-2.patch
Type: text/x-patch
Size: 715667 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160802/4670821d/attachment.bin>

More information about the ffmpeg-devel mailing list