[FFmpeg-devel] [PATCH] avfilter: add hrtfm filter

Michael Niedermayer michael at niedermayer.cc
Sat Mar 24 01:29:55 EET 2018


On Fri, Mar 23, 2018 at 02:45:06PM +0100, Aurelien Jacobs wrote:
> On Fri, Mar 23, 2018 at 10:18:47AM +0100, Paul B Mahol wrote:
> > On 3/22/18, Aurelien Jacobs <aurel at gnuage.org> wrote:
> > > On Mon, Mar 19, 2018 at 10:49:28PM -0800, Lou Logan wrote:
> > >> On Fri, Mar 16, 2018, at 11:44 AM, Paul B Mahol wrote:
> > >> > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > >> > ---
> > >> >  doc/filters.texi         |  60 ++++++
> > >> >  libavfilter/Makefile     |   1 +
> > >> >  libavfilter/af_hrtfm.c   | 486
> > >> >  +++++++++++++++++++++++++++++++++++++++++++++++>
> > >> > libavfilter/allfilters.c |   1 +
> > >> >  4 files changed, 548 insertions(+)
> > >> >  create mode 100644 libavfilter/af_hrtfm.c
> > >> >
> > >> > diff --git a/doc/filters.texi b/doc/filters.texi
> > >> > index bd43a7ac6e..c298054325 100644
> > >> > --- a/doc/filters.texi
> > >> > +++ b/doc/filters.texi
> > >> > @@ -3218,6 +3218,66 @@ Change highpass width.
> > >> >  Syntax for the command is : "@var{width}"
> > >> >  @end table
> > >> >
> > >> > + at section hrtfm
> > >> > +
> > >> > +Apply simple Head Related Transfer Function Model to audio stream.
> > >> > +
> > >> > +hrtfm filter creates virtual loudspeakers around the user for
> > >> > binaural> +listening via headphones (audio formats up to 9 channels
> > >> > supported).> +
> > >> > +This is very simple implementation which does not use any HRIRs.
> > >> > +
> > >> > +It accepts the following parameters:
> > >> > +
> > >> > + at table @option
> > >> > + at item hradius
> > >>
> > >> You didn't like the head_radius option name suggestion?
> > >>
> > >> > +Set head radius of listener. In meters. Default value is
> > >> > @code{0.0891}.
> > >> Why meters instead of cm?
> > >
> > > Because if you want to specify centimeters, you can use the option
> > > like this: -hradius 8.91c
> > 
> > Shouldn't it be 8.91cm?
> 
> Ideally it should yes.
> But currently the option system does not support units. It would be
> great to specify that this option is representing a length so that the
> parser could validate the unit and take it into account.

> But for now, options are unit-less numbers.
> You can't use "-bitrate 128kb/s", but you are instead limited to
> "-bitrate 128k" without specifying unit. Same for hradius for which
> you can use 8.91c but not 8.91cm.

AVOption does have a unit field.
Its currently used for named constants only. But i guess this could be
extended

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180324/b1199369/attachment.sig>


More information about the ffmpeg-devel mailing list