[FFmpeg-devel] [PATCH] avfilter: add arbitrary audio FIR filter

Muhammad Faiz mfcc64 at gmail.com
Sun May 7 01:32:09 EEST 2017


On Sun, May 7, 2017 at 2:49 AM, Paul B Mahol <onemda at gmail.com> wrote:
> On 5/6/17, Muhammad Faiz <mfcc64 at gmail.com> wrote:
>> On Sat, May 6, 2017 at 2:33 AM, Paul B Mahol <onemda at gmail.com> wrote:
>>> On 5/5/17, Muhammad Faiz <mfcc64 at gmail.com> wrote:
>>>>>>> Is pts handled correctly here? Seem it is not derived from input pts.
>>>>>>>
>>>>>>
>>>>>> It can not be derived in any other way.
>>>>>
>>>>> Probably, at least, first pts should be derived from input pts.
>>>>> Also, is time_base always 1/sample_rate?
>>>>>
>>>>> Thank's.
>>>>
>>>> Probably, like in asetnsamples filter.
>>>
>>> Done. Have an idea where artifacst come out for some IRs?
>>
>> I have no idea what's wrong here? I currently don't understand
>> partitioned convolution.
>>
>> My test case:
>> ./ffplay -f lavfi "aevalsrc='if(lt(t,1), if(n,0,1), sin(1000*t*t))',
>> aformat= channel_layouts=mono, asplit [afir_in0], firequalizer=
>> zero_phase=on:gain_entry='entry(0, 0); entry(100, -4); entry(1000,
>> -30); entry(5000, -50); entry(6000, -10); entry(10000, -5)', aformat=
>> channel_layouts=mono,a
>> split [merge1], atrim= end_sample=883 [afir_in1]; [afir_in0][afir_in1]
>> afir, aformat=channel_layouts=mono, [merge1] amerge,
>> asplit[out0],showspectrum=s=1024x512[out1]"
>>
>> Note that your old patch didn't generate artifact.
>
> Artifacts are gone if you use bigger IR size, >2048.
>
> UPOLS should be rather trivial to understand and to implement.

Still happens at 8821 (44100 Hz with 0.1s delay):
./ffplay -f lavfi "aevalsrc='if(lt(t,1), if(n,0,1), sin(1000*t*t))',
aformat=channel_layouts=mono, asplit [afir_in0], fir
equalizer=zero_phase=on:gain_entry='entry(0, 0); entry(100, -4);
entry(1000, -30); entry(5000, -50); entry(6000, -10); entry(10000,
-5)':delay=0.1, aformat=channel_layo
uts=mono,asplit [merge1], atrim=end_sample=8821 [afir_in1];
[afir_in0][afir_in1] afir, aformat=channel_layouts=mono, [merge1]
amerge, asplit[out0],showspectrum=s=1024x5
12[out1]"


More information about the ffmpeg-devel mailing list