[FFmpeg-cvslog] avfilter/af_sofalizer: set delays when interpolation is disabled

Paul B Mahol git at videolan.org
Sun Dec 23 22:43:24 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 23 21:40:07 2018 +0100| [ee64b64c0227e0e7f231e7d07f4bb2964dd7015d] | committer: Paul B Mahol

avfilter/af_sofalizer: set delays when interpolation is disabled

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee64b64c0227e0e7f231e7d07f4bb2964dd7015d
---

 libavfilter/af_sofalizer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 7812e25557..c30f99c810 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -627,6 +627,13 @@ static int getfilter_float(AVFilterContext *ctx, float x, float y, float z,
                                  nearest, neighbors,
                                  s->sofa.fir, delays);
     } else {
+        if (s->sofa.hrtf->DataDelay.elements > s->sofa.hrtf->R) {
+            delays[0] = s->sofa.hrtf->DataDelay.values[nearest * s->sofa.hrtf->R];
+            delays[1] = s->sofa.hrtf->DataDelay.values[nearest * s->sofa.hrtf->R + 1];
+        } else {
+            delays[0] = s->sofa.hrtf->DataDelay.values[0];
+            delays[1] = s->sofa.hrtf->DataDelay.values[1];
+        }
         res = s->sofa.hrtf->DataIR.values + nearest * s->sofa.hrtf->N * s->sofa.hrtf->R;
     }
 



More information about the ffmpeg-cvslog mailing list