Skip to main content
Topic: Highpass filter and DC offset click (Read 462 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Highpass filter and DC offset click

Opus has a highpass filter for removing DC offset. As tracks are normally encoded one at a time, the filter is unaware of the DC history from the previous track. A discontinuity click is created at the track boundary. Ideally, this offset should be removed on the disk image as a whole. But I may not have noticed it in continuous or quiet listening of the album. Typical users won't do it.

1) Can you somehow extrapolate the audio backwards enough for the filter to settle? Probably not reliable, because around 1/3 seconds are required for 3 hz.

2) Make the HPF defeatable?

No other encoder has an implicit HPF, or it is optionally selectable with a checkbox (ac3, itunes). What benefit does the HPF bring to encoding, and does it remain significant at transparent bitrates?

Re: Highpass filter and DC offset click

Reply #1
Sub-sonic frequencies are cheap to encode, so they're unlikely to make a big difference to the efficiency at transparent quality levels.

Anyway, the easiest solution IMO is to encode the album in one go, and split to tracks after encoding (without transcoding of course, as that'd be pointless). The accuracy of track splitting would be not ideal (at least 20 ms, unless you also use sub-optimal frame sizes when encoding), but if you optimize for full album listening, it won't matter.

Re: Highpass filter and DC offset click

Reply #2
An extra pass of splitting is inconvenient, not possible to integrate with existing encoder frontends, and I'm concerned that the split tracks might get rejected by some players. Which Opus splitter would you recommend? I prefer to pre-process the source files, which can be edited precisely, and only deal with compressed file splitters as a last resort if I don't have the uncompressed files anymore.

Clicks also occur with vinyl rumble, which is probably more common than CDs with offset. Other gapless codecs - Lame, FhG AAC, Musepack, Vorbis - encode flawlessly without clicks. Lame has a very low amplitude and duration clicks, which I wouldn't notice without focusing on the particular time position, and cranking the volume, effectively a clean encoding. Only Opus shows a problem. Filtering the vinyl sample below 10 Hz is sufficient to eliminate the clicks with Opus (3 Hz is not enough).

Integrating a filter on disk image is unfortunately not possible in Foobar2000, and a temporary file with cue sheet must be used. If I select "Don't reset DSP between tracks", then the track splits will be offset by a seemingly random amount, which looks like a bug.

I'm not providing a sample, as this is easy to replicate, and occurs any time a HPF is toggled on/off with audio running.

Re: Highpass filter and DC offset click

Reply #3

DC Rejection

The 1.1 encoder now uses a built-in DC rejection filter (3Hz cutoff) for all modes. The effect of the filter itself is inaudible, but it prevents DC energy from polluting the masking and energy analysis of the lowest frequency bands.

I think OP knows this already, so I posted it for those who (like me) didn't know this peculiarity of Opus encoder.

SimplePortal 1.0.0 RC1 © 2008-2018