Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: The Equaliser DSP does odd things when added to the conversion chain (Read 1939 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

The Equaliser DSP does odd things when added to the conversion chain

Foobar2000 v1.3.10, WinXP SP3.

Hi.
The Equaliser DSP (foo_dsp_eq.dll) seems to be messing with the audio in ways it shouldn't when used as a DSP in the conversion chain. I assume if it's set to "flat" it should pass the audio through unmolested and even if the EQ is active it shouldn't change the audio duration.

While testing DSPs as part of the solution to a "converting to wave, one file at a time" problem, I noticed some Equaliser DSP oddness. To properly test it I first converted four MP3s to WavePack (I'll call that Group One). I then converted them three more times after adding the Equaliser DSP to the conversion chain with the EQ flat to compare durations and MD5s (tests A, B & C). Dither was always disabled.

Test A: The WavePack encoder was configured to convert in multiple threads. The resulting files had the same durations as their Group One counterparts but none of the MD5s matched.

Test B: The WavePack encoder was configured not to use multiple threads. The first file in Test B had the same duration as in Group One, but a different MD5, while the other three files were slightly longer (roughly 90ms).

Test C: The WavePack encoder was allowed to use multiple threads again, but "Don't reset DSP between tracks" was checked in the Processing section of the converted setup. The first file was truncated by 168ms compared to Group One, and the second by 43ms. The third and fourth files were 52ms and 59ms longer respectively.

For the record, I ran the three tests again after adding the "downmix channels to stereo" DSP to the conversion chain instead of the EQ, and there were no inconsistencies. Durations and MD5s always matched.

Thanks.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #1
It's not Equalizer doing weird things but the "don't reset DSP" setting. It gives weird results with at least all DSPs that have a buffer.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #2
I only used "don't reset DSP" for the third test though, yet the Equaliser DSP never passed the audio through unchanged. Even the first test, where the durations remained the same, the MD5s were different.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #3
Oh my mistake. Somehow I got the impression from your other thread where you mentioned the issue that it was only related to the DSP reset setting. The DSP indeed seems to be having some issues.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #4
It seems natural to me that an active equalizer might change the duration of a track. An equalizer cannot perform its job on a single audio sample, it always needs a sequence of audio samples. Your test only shows that even when set to "Flat" the equalizer is active and not bypassed. As long as it only adds or removes silence I do not see a problem.
It would be a problem though if you find changes in the frequency distribution.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #5
If a DSP was going to change the duration of a track though, it seems logical to me it'd do it consistently. Why would it change the duration of some tracks when converting more than one file at a time and when foobar2000 is configured to only use one thread for conversion (and not just via the "don't reset DSP" setting), but not when it's converting in multiple threads? Maybe that's a buffering issue I don't understand, although I think it's only natural to assume if you're converting using the same settings each time you should get the same result each time.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #6
It seems natural to me that an active equalizer might change the duration of a track. An equalizer cannot perform its job on a single audio sample, it always needs a sequence of audio samples. Your test only shows that even when set to "Flat" the equalizer is active and not bypassed. As long as it only adds or removes silence I do not see a problem.
It would be a problem though if you find changes in the frequency distribution.

Thinking about it some more, it seems logical that if a DSP needs a sequence of audio samples to do it's job, it should be able to buffer them until it has enough to work with. If a DSP had to wait until it'd been fed "x" amount of samples, would it make sense that it'd simply drop all the samples up to that point? I don't know as I don't know how they work.

Anyway.... I tried a few more tests with different DSPs and none of them behaved the same as the Equaliser DSP.
I can see the "Don't Reset DSP" option can cause DSPs to change the length of the audio a little when converting more than one file if the DSP is active, so that can't be blamed on the Equaliser DSP itself. However....

When the encoder itself is configured to use more than one thread, the Equaliser DSP is the only DSP that changes the MD5 even when theoretically it shouldn't be active (other DSPs tested also with settings "flat").

When the encoder itself is configured to only use a single thread (converting multiple files), the Equaliser DSP is the only one to change the audio duration.

I also tested some DSPs while making sure they were active. They always produced the same MD5 whether the encoder was configured for multiple threads or a single thread (the encoder configuration, not the "don't reset DSP" option) and either way the duration was always identical to the source. DSPs tested:
Advanced Limiter
Downmix Channels To Mono
EBU R128 Compressor (3rd party DSP)
Graphic Equaliser (3rd party DSP)
Matrix Mixer (3rd party DSP)

I'm fairly confident the Foobar2000 Equaliser DSP is misbehaving, at least by comparison.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #7
Looks like a solid test with various equalizers. Unless the person who implemented the equalizer chimes in, we will never know whether this is a flaw or a feature  ;)

 

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #8
Good find, thanks for reporting.

This bug is truly ancient, must have been there for the last 10 years at least. Fixed for the next update.

Thread counts do not affect it directly. Reuse of Equalizer DSP instances does, and it's indirectly affected by how many threads you have + how many files you are converting at a time.
Microsoft Windows: We can't script here, this is bat country.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #9
Fixed in 1.3.11 beta 5.
Microsoft Windows: We can't script here, this is bat country.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #10
Cheers.

The Equaliser DSP no longer messes with the audio duration, although I'd be interested to know why the MD5 changes when the it's in the conversion chain (as opposed to when it's not) when it's set "flat". Should it be altering the audio at all?

Thanks.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #11
Non bitperfect output will be looked into for the next update; though it is not a serious bug like the length problem was. I guess it just runs the whole synth process with null parameters instead of specifically disabling all processing when the EQ is flat, and least significant bit differences creep up.
Microsoft Windows: We can't script here, this is bat country.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #12
Should now be bit perfect in 1.3.12.
Microsoft Windows: We can't script here, this is bat country.

Re: The Equaliser DSP does odd things when added to the conversion chain

Reply #13
Awesome. Thanks!