Log in

View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 [377] 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508

huhn
24th March 2015, 09:21
If a system has problems with bass when a LFE channel is not present then that system is a piece of crap...

Almost all content, besides the audio on bluray do not have an LFE channel. So when listening to music or watching videos on youtube there would no bass... but of course there is. The bass is either reproduced by the left and right speakers or fed into to the subwoofer at the crossover frequency. The purpose of an LFE channel is to isolate specific sound effects from the other sounds, so the subwoofer reproduces them instead of the other speakers (since it does a better job). LFE can contain frequencies up to 120hz. An LFE channel can allow you have a higher crossover frequency if your main speakers cannot reproduce low frequency sounds. Headphones do not need this feature as they can reproduce the audible range of tones, but some speakers might. Quality systems focus on a specific frequency response for each speaker.

Basically, any quality headphone has 2 drivers, you should know this. What hifi gear have you seen with 8 drivers that costs $80. That makes no sense when a proper headphone with 2 drivers costs more. Any decent headphone can reproduce bass without a dedicated subwoofer driver/cone. Notice how standalone subwoofers have huge cones? You need them to produce the low frequencies at audible volumes. A half inch subwoofer inside a headphone isn't going to provide much benefit compared to the main drivers.

The surround sound aspect does not make much sense either. Notice how a proper surround system has the surround sound speakers on the opposite sides of the other speakers? The auditory system is good in positioning, but it doesn't make up for the fact that the surround speakers are right next to the other ones in a headphone. Any proper headphone will have a good enough sound stage and imaging capabilities to mimic what multiple drivers do in such a confined space.

tldr: Why should software support badly designed hardware that sells purely on marketing?

i don't use hardware like this and i have personally no need for such a feature with my beyerdynamics T5p...

that doesn't change the fact that people buy logitech speaker on mass. and a system without digital processing can't do the cross over by it self so a cross over is needed.

if you run an sub with an analog connection without digital processing a crossover is needed it's that simple. and this can happen with a more expensive system too.

luckly some soundcards can do this be them self.

nevcairiel clearly said this is not going to happen so no need to discuss about this here.

nevcairiel
24th March 2015, 10:40
The next nightly of LAV will feature the libdcadec (https://github.com/foo86/dcadec) DTS decoder.
It supports full bitexact DTS-HD decoding of up to 96/24, as well as much broader support for DTS extensions than the ffmpeg decoder.

Most prominently (things the ffmpeg decoder didn't do):
- DTS 96/24 (96 kHz support for lossy DTS streams, and DTS-HD HRA)
- Bitexact DTS-HD MA up to 7.1, 96 kHz, 24-bit

The only missing features I'm aware of right now is support for 192kHz DTS-HD MA, which I hope will be added soon, and DTS Express, which may take a bit longer (but is also much less important).

kalston
24th March 2015, 11:50
Awesome! :) Can't wait to try it.

FireFreak111
24th March 2015, 12:05
Good to hear its coming along rapidly. Can't wait to ditch Arcsoft, use something that isn't a black box, and is guaranteed to work as it should.

192khz is important but thankfully its not used much, and I only heard of DTS Express last week.

Will the data of the DTS-HD MA stream be properly reported outside of the Status tab now? Is that a thing? Or will it still report 5.1 for 7.1 streams?

nevcairiel
24th March 2015, 12:07
The splitter will also properly report stream properties now.
One note, the current version will fail to decode 192kHz streams entirely (ie. not even the core). I thought about adding a fallback to core decoding, but I decided to simply wait until the decoder supports 192kHz. If it takes too long, I can still add the fallback later.

kalston
24th March 2015, 12:26
I don't think I have any 192khz DTS files anyway :p But really this is great, even more so knowing that the splitter will properly report it too :)

nevcairiel
24th March 2015, 12:29
They are very rare. Mostly used for a few classical music Blu-rays.

Snowknight26
24th March 2015, 13:46
Most prominently (things the ffmpeg decoder didn't do)

Which is funny because ffmpeg uses a libdcadec wrapper so it should have the same capabilities.

nevcairiel
24th March 2015, 13:48
You do realize that I wrote this wrapper, don't you? :P And it only exist since last week, because thats when I submitted it to ffmpeg, so that LAV (any anyone else) can use it transparently without needing extra code.
And when someone refers to "the ffmpeg decoder", it generally always refers to the native decoder present inside ffmpeg, ie. ffdca or however people like to call it, not an external library that is routed through ffmpeg. If I wanted to discuss the capabilities of an external library, I would call it by name.

Liandri
24th March 2015, 15:18
And to be clear, I'm going completely off what you're posting. I don't know how your headset performs, but it seems to me it's causing more trouble than it's worth. You're losing the benefit of the extra speakers for movies, and the bass is weak in content without a dedicated LFE stream. The configuration in your player is basically doing what ffdshow/ac3filter would do, which is either downmixing to 2.1 or upmixing 2.0 to 2.1 for the headset to use the subwoofer/manage the bass properly.
I'll try harder next time with 5.1 content.
But also I just currently watch mostly stereo content, so there is little reason to mix into 5.1, also LFE still doesn't work in LAV for that case. Seeing my messages, you can tell my request was somewhat incorrect - what I effectively wanted was LFE redirection, not just 2.1 option. I'm not sure if that can be considered upmixing.

I learned that AC3filter can do this (tested and it works, but somehow I found it performing worse in other matters so maybe I need to tweak more settings). Found a good set of information about LFE on its homepage too. From what I understand, without a dedicated LFE stream everything will get processed through usual speakers, but if the source itself has low frequencies outside of speakers' limitations, it's a good idea to redirect those if there is another speaker that can handle those (sw).

Arm3nian
24th March 2015, 18:47
i don't use hardware like this and i have personally no need for such a feature with my beyerdynamics T5p...

that doesn't change the fact that people buy logitech speaker on mass. and a system without digital processing can't do the cross over by it self so a cross over is needed.

if you run an sub with an analog connection without digital processing a crossover is needed it's that simple. and this can happen with a more expensive system too.

luckly some soundcards can do this be them self.

nevcairiel clearly said this is not going to happen so no need to discuss about this here.

What kind of system uses only a direct analog connection from a PC? Sound cards provide less than a watt of power, my sub requires 100+ watts. Yes there are lower powered subs but we are talking order of magnitudes. The sub has to have an amplifier, which will also drive the other 2 speakers, so just put low pass filter in there. No proper system would REQUIRE a dedicated subwoofer channel to deliver bass, even though it might improve it. Not everything you listen to is through mpchc :). A software mixer would not solve the problem.

I'll try harder next time with 5.1 content.
But also I just currently watch mostly stereo content, so there is little reason to mix into 5.1, also LFE still doesn't work in LAV for that case. Seeing my messages, you can tell my request was somewhat incorrect - what I effectively wanted was LFE redirection, not just 2.1 option. I'm not sure if that can be considered upmixing.

I learned that AC3filter can do this (tested and it works, but somehow I found it performing worse in other matters so maybe I need to tweak more settings). Found a good set of information about LFE on its homepage too. From what I understand, without a dedicated LFE stream everything will get processed through usual speakers, but if the source itself has low frequencies outside of speakers' limitations, it's a good idea to redirect those if there is another speaker that can handle those (sw).

Everything without a dedicated LFE stream will be processed through the left and right IF there is no passive low pass filter and nothing is done in software. You can test if your headset has this by seing if the subwoofer driver does something when no LFE stream is present but your content has deep bass. I mentioned why LFE is useful in my previous post.

As mentioned lav is a decoder, but also provides common options that are needed for optimal playback. Requiring an LFE channel for bass is rare. If there is no bass without an LFE stream then that's obviously a problem. The actual LFE content will be hard to reproduce on such a tiny driver/cone, so what you might be experiencing is the sub working vs not working with an LFE channel as all bass is redirected there.

huhn
24th March 2015, 19:05
What kind of system uses only a direct analog connection from a PC? Sound cards provide less than a watt of power, my sub requires 100+ watts. Yes there are lower powered subs but we are talking order of magnitudes. The sub has to have an amplifier, which will also drive the other 2 speakers, so just put low pass filter in there. No proper system would REQUIRE a dedicated subwoofer channel to deliver bass, even though it might improve it. Not everything you listen to is through mpchc :). A software mixer would not solve the problem.

there are analog running amps out there yep not everything is digital to day how can a system without full range speaker redirect the LFE to the sub without digital processing.
and what kind of system? maybe the these headphones that started this hole topic to start with?

not all people can buy a system with full range speaker so sorry they can't get a proper system... just ignore them i guess. all soundcards should remove there LFE redirection/LFE crossover there is no proper system that need these option any way, so why are they even there?

Arm3nian
24th March 2015, 19:20
there are analog running amps out there yep not everything is digital to day how can a system without full range speaker redirect the LFE to the sub without digital processing.
and what kind of system? maybe the these headphones that started this hole topic to start with?

not all people can buy a system with full range speaker so sorry they can't get a proper system... just ignore them i guess. all soundcards should remove there LFE redirection/LFE crossover there is no proper system that need these option any way, so why are they even there?

That was my point, you don't need software to do the crossover and processing. Hardware does it digitally or by analog, and hardware should do it because not every program that outputs audio has the capabilities of lav or all the direct show filters. A low pass filter or simple DSP chip can do it for pennies, and all systems that have a sub should have one built in.

My home theater speakers aren't full range either, the front speakers start at 80hz and the center starts at 120hz, but my receiver has the proper hardware to send bass at the crossover frequency that is not found in the LFE stream to the sub. You don't need a receiver for this capability. What is the point of LFE redirection if the system has proper bass management by sending frequencies at a certain point to the sub. Its the same thing. Full range speakers don't need a sub, that's why they're full range, and non full range speakers already have the capability for content with no LFE stream. If there is no proper bass management to begin with, then content with no LFE stream will have the bass produced by the other speakers, making it sound terrible.

huhn
24th March 2015, 20:09
most soundcards can't do that that's why software is needed.

and a lot of AVR run in problem when used analog because they don't know if that input signal is 5.1 or 2.0 and not doing blindly a LFE crossover.

and true multi channel non virtual sourround 5.1 headsets can't do this at all they need a signal with an extra LFE channel to sound properly.

e-t172
24th March 2015, 21:04
most soundcards can't do that that's why software is needed.

The problem is, what nev is trying to do is to avoid feature bloat. Part of that is making sure that the only features that are added are features that make sense to have in a decoder. Bass redirection is not the decoder's job - in fact, one might argue that even the mixing options in LAV Audio are already out of scope. Normally, bass redirection should be done as close to the speakers as possible - preferably in the AVR, or in the sound card if there's no AVR, or in a system-wide audio effect (sAPO) if the hardware doesn't support it, or at the extreme, in the DirectShow audio renderer (not decoder).

The reason why it's not a good idea to move this processing upstream is because the more upstream you move it, the fewer sources benefit from it. If you do it in the AVR, then it's enabled for all sources connected to the AVR, not just the PC. If it's done in the soundcard, it's enabled for all applications, including WASAPI/ASIO etc. If it's done in an sAPO, it's enabled for all "normal" applications. But if you do it in DirectShow, then only your player benefits. That's why it doesn't make sense to have this stuff in the DirectShow pipeline. This functionality should be provided by the audio equipment downstream of the DirectShow player, and if it doesn't, then you should change your equipment for something that does.

huhn
24th March 2015, 21:44
The problem is, what nev is trying to do is to avoid feature bloat. Part of that is making sure that the only features that are added are features that make sense to have in a decoder. Bass redirection is not the decoder's job - in fact, one might argue that even the mixing options in LAV Audio are already out of scope. Normally, bass redirection should be done as close to the speakers as possible - preferably in the AVR, or in the sound card if there's no AVR, or in a system-wide audio effect (sAPO) if the hardware doesn't support it, or at the extreme, in the DirectShow audio renderer (not decoder).

The reason why it's not a good idea to move this processing upstream is because the more upstream you move it, the fewer sources benefit from it. If you do it in the AVR, then it's enabled for all sources connected to the AVR, not just the PC. If it's done in the soundcard, it's enabled for all applications, including WASAPI/ASIO etc. If it's done in an sAPO, it's enabled for all "normal" applications. But if you do it in DirectShow, then only your player benefits. That's why it doesn't make sense to have this stuff in the DirectShow pipeline. This functionality should be provided by the audio equipment downstream of the DirectShow player, and if it doesn't, then you should change your equipment for something that does.

i'm not trying to change nev mind at all. there are audio processor that can do this and this is fine. i don't even have a use for this personally.

replacing hardware is not an option for everyone this still cost money.

STaRGaZeR
25th March 2015, 00:30
That's why it doesn't make sense to have this stuff in the DirectShow pipeline. This functionality should be provided by the audio equipment downstream of the DirectShow player, and if it doesn't, then you should change your equipment for something that does.

And you have the guts to tell other people they are ridiculous? Talk about being delusional :eek:

Arm3nian
25th March 2015, 02:54
He is correct that the equipment should do the bass management, for two reasons.

1. Your computer is not the only thing connected to speakers. Cable/satellite box, bluray player, basically anything that isn't a computer or professional gear doesn't have capabilities like down mixing or up mixing to 2.1, only traditional formats like stereo or 5.1.
2. You can't use lav or directshow filters with every program. Watching videos on the internet, games, applications, might not support 2.1.

Down mixing to stereo (headphones) exists in pretty much everything, and all standalone speakers or surround configurations require an amplifier which usually also has bass management through passive or active filters. If you want to design a system that doesn't follow the common configurations, you better make sure it works on its own, and does not rely on 3rd party help to make it function.

If you can't get a dedicated LFE stream working, then just set the crossover to 120hz. If you can't set it then hope the default filter is set to a figure that allows your sub to reproduce most of the LFE content, it most likely is, and the system itself is most likely optimized to reproduce the LFE content without a dedicated LFE stream. If your subwoofer doesn't even work without an LFE stream and your other speakers can't deliver bass then you've made the wrong purchase. Even if software supports upmixing or downmixing to 2.1, everything else will sound terrible if the system doesn't already have bass management.

JohnLai
25th March 2015, 05:53
@nevcairiel

Recently, I have been using LAVvf as Directshow source filter for Staxrip.
However, whenever DXVA Native is selected, it will fall back to software decoding. DXVA Copy-back is working, but there is performance penalty in memory copyback.
Any possible solution to make the dxva native decoding works with avisynth/Staxrip?

Note: NikoD and stax76 suggested me to ask in this thread XD.

Asmodian
25th March 2015, 06:42
@nevcairiel

Recently, I have been using LAVvf as Directshow source filter for Staxrip.
However, whenever DXVA Native is selected, it will fall back to software decoding. DXVA Copy-back is working, but there is performance penalty in memory copyback.
Any possible solution to make the dxva native decoding works with avisynth/Staxrip?

Note: NikoD and stax76 suggested me to ask in this thread XD.

DXVA native leaves the decoded video in the GPU's memory. Getting it into the system memory is the "copy-back". DXVA Native cannot work with Avisynth/Staxrip.

omarank
25th March 2015, 08:57
The next nightly of LAV will feature the libdcadec (https://github.com/foo86/dcadec) DTS decoder.
It supports full bitexact DTS-HD decoding of up to 96/24, as well as much broader support for DTS extensions than the ffmpeg decoder.

Hi, I tried the new DTS decoder using the latest nightly build and it works perfectly. Thanks Nevcairiel for this great addition to LAV and also to the developer of the libcadec decoder.

I found that the new DTS decoder also doesn't low-pass the LFE channel of DTS MA streams at 120 Hz, like the Arcsoft decoder. Will you be considering to add an option to low pass the LFE channel of DTS MA streams, especially when they are downmixed to stereo and LFE is included in the mix?

kalston
25th March 2015, 09:02
Just installed the nightly build, will try it when I get back home this afternoon :)

JohnLai
25th March 2015, 09:35
DXVA native leaves the decoded video in the GPU's memory. Getting it into the system memory is the "copy-back". DXVA Native cannot work with Avisynth/Staxrip.

NikoD gonna be sad about this :(

How about quicksync native mode? Current lavfilter quicksync implementation still using copyback.

Developer of handbrake is able to get quicksync decoding natively.
Possible for implementation?

nevcairiel
25th March 2015, 09:37
If you want to use QuickSync without copy-back for decoding+encoding, you need to implement this in one fixed pipeline. You cannot use DirectShow for that.

NikosD
25th March 2015, 09:48
If QS decoder from Eric Gur, which is using MSDK, wasn't implemented with a copy-back mechanism and kept everything in GPU's memory, couldn't be used inside LAV Video and combined with an MSDK HW encoder ?

Liandri
25th March 2015, 10:01
1. Your computer is not the only thing connected to speakers. Cable/satellite box, bluray player, basically anything that isn't a computer or professional gear doesn't have capabilities like down mixing or up mixing to 2.1, only traditional formats like stereo or 5.1.
2. You can't use lav or directshow filters with every program. Watching videos on the internet, games, applications, might not support 2.1.
..
Even if software supports upmixing or downmixing to 2.1, everything else will sound terrible if the system doesn't already have bass management.
I don't undertstand your point. My PC is the only thing that is connected to both speakers and headphones, and I'm not planning to change that in years to come. And I'm not requiring that all the sound will come with proper bass. In fact, my 2.1 system work fine with any software, I just tend to watch video content mostly with my headphones for unrelated reasons.

You say that everything sounds bad on a system when user made a wrong purchase? And that nobody should care because it all would sound terrible anyway? Then how come I find it all sounds perfectly fine? Videos, music, youtube, games and other stuff without directshow etc. I was not complaining that something sounds bad, I was asking for a feature to additionally improve experience on my system. In fact, previously I was using LAV Audio for some time without realizing it doesn't do this. AC3filter and 2 other video players (ironically both of which are banned on this forum) can do that for me, so I guess I'll live with it not being part of LAV Audio feature set.

If something should not be a job for a software then why not provide a hardware requirements for it? Remove an option for mixing into mono and stereo, say that user should buy 5.1 system for optimal experience instead, because why not? What's all the fuss about DXVA decoding when we should all just buy a better CPU?

Still, I found explanation and advice from Telion fair so I may aswell try that.

I'm sorry to sound harsh, I appreciate all the replies, but I just don't understand why you should have such an attitude. A PC is never a perfect (still best of course) platform and everyone should only be grateful if something can be improved or added through software.

nevcairiel
25th March 2015, 10:03
If QS decoder from Eric Gur, which is using MSDK, wasn't implemented with a copy-back mechanism and kept everything in GPU's memory, couldn't be used inside LAV Video and combined with an MSDK HW encoder ?

No, DirectShow doesn't support anything other than software video buffers or DXVA2-Native buffers. If you want anything special like this, gotta implement it yourself without DirectShow - which is probably going to be easier anyway.

NikosD
25th March 2015, 10:14
For the record, I didn't said to JohnLai to write to this thread about that matter, because more or less I had the same opinion about it like you, but thanks for the clarification.

I have proposed to rigaya, the developer of QSVEncC, to convert his encoder to a transcoder, implementing the decoder in HW too, from the first time that I got involved with his app.

Only one fixed pipeline solution implemented with MSDK has a large possibility to become a real app, like HandBrake and QSTranscode.

e-t172
25th March 2015, 11:16
I found that the new DTS decoder also doesn't low-pass the LFE channel of DTS MA streams at 120 Hz, like the Arcsoft decoder. Will you be considering to add an option to low pass the LFE channel of DTS MA streams, especially when they are downmixed to stereo and LFE is included in the mix?

I second this. Leaving LFE untouched is generally a bad idea, because everyone expects it to be low-passed, and sometimes production houses make mistakes and leave high frequency content in the LFE channel, which goes unnoticed because even their own monitoring systems remove it on playback. In fact I believe someone reported this sort of issue at some point in this thread some time ago, where it was fought LAV Audio was corrupting audio, while it was in fact caused by high-frequency garbage in the source LFE channel.

madshi
25th March 2015, 11:37
I'm confused. Isn't lossless decoding supposed to be lossless? Why would we suddenly want the DTS decoder to "process" the LFE channel?

andyvt
25th March 2015, 12:18
If QS decoder from Eric Gur, which is using MSDK, wasn't implemented with a copy-back mechanism and kept everything in GPU's memory, couldn't be used inside LAV Video and combined with an MSDK HW encoder ?

There are sample filters in the MSDK which demonstrate how to leverage QS to transcode content via DirectShow. It should be relatively easy to modify the decoder with Eric's format-a-bitstream code and make it robust enough for production use.

That said, I don't think that DirectShow is the best place to transcode. It works OK if the application doesn't need to support editing, but once that is requirement it is more difficult to keep everything sync'd properly than in an application where the pipeline is entirely self managed.

kalston
25th March 2015, 12:22
And are you guys sure the ArcSoft DTS decoder applied a 120hz low-pass filter for that matter? This reminds me of what I posted before: https://www.doom9.org/showthread.php?p=1702731#post1702731 (check the following replies, nev said that the distortion was barely audible when he applied a filter which would contradict omarank)

nevcairiel
25th March 2015, 12:26
The point is that neither the ArcSoft decoder, nor libdcadec, apply a low-pass, but some users would like to have one to avoid distortions from badly authored LFE channels.
You wouldn't hear those distortions if you use an actual subwoofer, as they are simply incapable of playing those frequencies, but if you mix into stereo (including the LFE), you will hear them.

Its not something libdcadec should do, but something further down in the processing. Not sure I want LAV to be that part, though.

QBhd
25th March 2015, 12:26
I'm confused. Isn't lossless decoding supposed to be lossless? Why would we suddenly want the DTS decoder to "process" the LFE channel?

Agreed....

QB

FireFreak111
25th March 2015, 12:59
New DTS-HD MA decoder is amazing. Works perfectly, sounds great. Based on the source code we know its proper lossless, as is passed down the chain.

For quality output to the Windows mixer, which does all its mixing in 32 bit float since Vista, should we output 32 bit float the whole way? Like send it from LAV to Reclock and then to the Audio engine (effects, etc in the windows pipeline) as a 32 bit float? Mathematical perfection?

kalston
25th March 2015, 13:34
New DTS-HD MA decoder is amazing. Works perfectly, sounds great. Based on the source code we know its proper lossless, as is passed down the chain.

For quality output to the Windows mixer, which does all its mixing in 32 bit float since Vista, should we output 32 bit float the whole way? Like send it from LAV to Reclock and then to the Audio engine (effects, etc in the windows pipeline) as a 32 bit float? Mathematical perfection?

It doesn't matter at all in this case, the only difference is whether LAV or Windows (or Reclock etc.) raises the bit depth. LAV simply decodes the audio and outputs it as is (and DTS-HD is always 16 or 24bit afaik)

e-t172
25th March 2015, 14:22
I'm confused. Isn't lossless decoding supposed to be lossless? Why would we suddenly want the DTS decoder to "process" the LFE channel?

Well, it's... complicated. Genelec (manufacturer of pro audio equipment that's used in production houses) has a good write-up on the subject (http://www.genelec.com/faq/multichannel/101-what-is-the-lfe-1-channel/). Looking at the table in that article, you can see it's kind of a mess. Table note (1) is especially interesting:

In the DTS-HD codec only [DTS-HD Master Audio™ (lossless) and DTS-HD High Resolution Audio™ (lossy)] the DTS-HD decoder applies a low-pass filter at 100 Hz (-3 dB) with a 60 dB/octave roll-off onto the LFE channel.

That seems to indicate that a DTS-HD MA decoder that does not lowpass LFE is not doing the right thing.

The problem is, this is all very theoretical. In practice, one should always lowpass LFE, because the presence of high frequency content in the LFE channel is pretty much guaranteed to be a mistake on the production side. On the production side, no-one in their right mind would knowingly put >120Hz content in LFE because the playback of such content would be completely unpredictable - some playback systems will remove it, some won't.

But the real problem arises if the production house lowpasses LFE in their monitoring systems (which, presumably, some do without even knowing it), which means that if high frequency content accidentally gets thrown into the LFE channel, the production house won't notice it, and it won't be noticed in most playback systems because subwoofers can't reproduce it. So most people won't notice it, but some people will, especially if they have systems that are configured to downmix LFE into full-range (L/R) channels without any lowpass filter. These people will hear a different sound compared to what the production people heard, which is bad, because they're not getting the intended sound and the spurious high frequency content in the LFE channel is likely to be garbage (remember, the production house likely didn't notice it's there) and degrade audio quality. This is the reason why Genelec bass management systems have a redirect feature (http://www.genelec.com/faq/multichannel/95-how-does-the-lfe-input-and-redirect-function-work-on-the-7060b-7070a-7071a-and-7073a/) to check for this, but I'm not sure it's used in actual production workflows.

Said differently, the crux of the problem is that high-frequency content in the LFE channel is kinda like what us programmers would call undefined behavior: no-one really knows what will happen to it, so it's better not to have it at all to enforce consistency. kalston above found the previous post I was referring to (http://forum.doom9.org/showthread.php?p=1702731#post1702731) where we found that some material contained high-frequency garbage in the LFE channel, which led to audible issues after downmixing to full-range channels. Having a LFE lowpass option in LAV would be useful to prevent such issues.

madshi
25th March 2015, 15:07
Well, it's... complicated. Genelec (manufacturer of pro audio equipment that's used in production houses) has a good write-up on the subject (http://www.genelec.com/faq/multichannel/101-what-is-the-lfe-1-channel/). Looking at the table in that article, you can see it's kind of a mess. Table note (1) is especially interesting:

That seems to indicate that a DTS-HD MA decoder that does not lowpass LFE is not doing the right thing.

The problem is, this is all very theoretical. In practice, one should always lowpass LFE, because the presence of high frequency content in the LFE channel is pretty much guaranteed to be a mistake on the production side. On the production side, no-one in their right mind would knowingly put >120Hz content in LFE because the playback of such content would be completely unpredictable - some playback systems will remove it, some won't.

But the real problem arises if the production house lowpasses LFE in their monitoring systems (which, presumably, some do without even knowing it), which means that if high frequency content accidentally gets thrown into the LFE channel, the production house won't notice it, and it won't be noticed in most playback systems because subwoofers can't reproduce it. So most people won't notice it, but some people will, especially if they have systems that are configured to downmix LFE into full-range (L/R) channels without any lowpass filter. These people will hear a different sound compared to what the production people heard, which is bad, because they're not getting the intended sound and the spurious high frequency content in the LFE channel is likely to be garbage (remember, the production house likely didn't notice it's there) and degrade audio quality. This is the reason why Genelec bass management systems have a redirect feature (http://www.genelec.com/faq/multichannel/95-how-does-the-lfe-input-and-redirect-function-work-on-the-7060b-7070a-7071a-and-7073a/) to check for this, but I'm not sure it's used in actual production workflows.
Ok, but it still doesn't make *any* sense to me whatsoever that DTS-MA tracks would need the LFE channel to be filtered, while TrueHD or PCM tracks would not. I would very much like dcadec to stay perfectly lossless. If filtering is needed, it should be done outside of the decoder implementation, and not be limited to DTS-MA, but apply to all audio sources (which need it). I don't care what Genelec says, we developers should think logically, and if DTS-MA needs filtering, then so does TrueHD. Makes no sense to treat them differently, considering that I've often seen TrueHD and DTS-MA tracks decode to the same data, when comparing tracks from different Blu-Ray releases.

kalston
25th March 2015, 15:11
I just setup a low-pass filter for the sub in JRiver (100hz and 48 db/octave because that's the highest value available in JRiver from what I've seen) and it completely gets rid of the distortion in the sample I posted, as expected.

I also found another occurrence on Star Wars Return of the Jedi blu-ray (big explosion at 01:55:42) but it's more much subtle there. Still seems to be some garbage in the LFE channel. I could probably find other examples (but again, much more subtle than the sample I posted where it's really awful) but it's nice to finally understand what it is. I've learned something today :) I think I could even find some True HD tracks where I noticed a similar issue.

edit : oh and the new DTS-HD decoder works perfectly as far as I can tell :)

edit 2 : The Dark Knight has a TrueHD track and I also found a couple spots (yes, I have a good memory like that) where there is some "LFE garbage". Guess that means they had a low-pass filter in the production studio like e-t172 explained.

nevcairiel
25th March 2015, 15:28
Ok, but it still doesn't make *any* sense to me whatsoever that DTS-MA tracks would need the LFE channel to be filtered, while TrueHD or PCM tracks would not.

The link he posted has a summary on the situation for all common audio codecs, and indeed both TrueHD and DTS-HD MA are flagged as including a full bandwidth channel for LFE, while the lossy codecs are band-limited.

The real problem is with other lossless formats. You have no idea what source a FLAC originally came from, for example.

e-t172
25th March 2015, 16:21
Ok, but it still doesn't make *any* sense to me whatsoever that DTS-MA tracks would need the LFE channel to be filtered, while TrueHD or PCM tracks would not. I would very much like dcadec to stay perfectly lossless. If filtering is needed, it should be done outside of the decoder implementation, and not be limited to DTS-MA, but apply to all audio sources (which need it). I don't care what Genelec says, we developers should think logically, and if DTS-MA needs filtering, then so does TrueHD. Makes no sense to treat them differently, considering that I've often seen TrueHD and DTS-MA tracks decode to the same data, when comparing tracks from different Blu-Ray releases.

Genelec is not "mandating" anything - they don't make the specs. They're just documenting the sad state of LFE cut-off specs in the wild.

I wholeheartedly agree that doing different filtering based on format is not tenable - I think LFE should always be lowpassed, period, because as I explained, having high-frequency content in LFE makes no sense and is pretty much guaranteed to be a mistake. I don't really have an opinion as to where (decoder or downstream) it should be done - though I do believe that if LAV Audio is going to include LFE in downmixing, it should have a lowpass filter there just to make sure it's not downmixing high-frequency LFE garbage into the full-range L/R channels.

Stereodude
25th March 2015, 17:01
Ok, but it still doesn't make *any* sense to me whatsoever that DTS-MA tracks would need the LFE channel to be filtered, while TrueHD or PCM tracks would not. I would very much like dcadec to stay perfectly lossless. If filtering is needed, it should be done outside of the decoder implementation, and not be limited to DTS-MA, but apply to all audio sources (which need it). I don't care what Genelec says, we developers should think logically, and if DTS-MA needs filtering, then so does TrueHD. Makes no sense to treat them differently, considering that I've often seen TrueHD and DTS-MA tracks decode to the same data, when comparing tracks from different Blu-Ray releases.
The Dave Matthews and Tim Reynolds: Live at Radio City Blu-ray (http://www.blu-ray.com/movies/Dave-Matthews-and-Tim-Reynolds-Live-at-Radio-City-Blu-ray/489/) has a 5.1 24/96 TrueHD audio track that has content well above 120Hz in the LFE channel. I have no idea if it creates audible artifacts when mixed into the mains though. So DTS-HD MA isn't the only codec that can have content over 120Hz in the LFE channel.

e-t172
25th March 2015, 17:24
Well yeah, that's actually compliant, since TrueHD has a full-range LFE channel (http://www.genelec.com/faq/multichannel/101-what-is-the-lfe-1-channel/). But even if the spec technically allows it, it's still absurd to have high-frequency content in the LFE channel, and there's no reason for it to be there.

kalston
25th March 2015, 17:27
I updated my samples and made them shorter :
-DTS-HD MA with "LFE garbage" https://www.dropbox.com/s/7kcjijo4p34vd3c/dtshdsample.mka?dl=0
-True HD with "LFE garbage" https://www.dropbox.com/s/ar11chywic24wih/truehdsample.mka?dl=0 it's more subtle, but on the last 5 secs or so when the truck is hitting the ground there is some loud crackling if you don't use a low-pass filter at 120hz or less. That's from The Dark Knight blu-ray, I'm honestly surprised they let this slip through but I guess that just illustrates e-t172's point. (and there might differences between the blu-ray releases, this is the French one)

Arm3nian
25th March 2015, 19:12
I don't undertstand your point. My PC is the only thing that is connected to both speakers and headphones, and I'm not planning to change that in years to come. And I'm not requiring that all the sound will come with proper bass. In fact, my 2.1 system work fine with any software, I just tend to watch video content mostly with my headphones for unrelated reasons.

You say that everything sounds bad on a system when user made a wrong purchase? And that nobody should care because it all would sound terrible anyway? Then how come I find it all sounds perfectly fine? Videos, music, youtube, games and other stuff without directshow etc. I was not complaining that something sounds bad, I was asking for a feature to additionally improve experience on my system. In fact, previously I was using LAV Audio for some time without realizing it doesn't do this. AC3filter and 2 other video players (ironically both of which are banned on this forum) can do that for me, so I guess I'll live with it not being part of LAV Audio feature set.

If something should not be a job for a software then why not provide a hardware requirements for it? Remove an option for mixing into mono and stereo, say that user should buy 5.1 system for optimal experience instead, because why not? What's all the fuss about DXVA decoding when we should all just buy a better CPU?

Still, I found explanation and advice from Telion fair so I may aswell try that.

I'm sorry to sound harsh, I appreciate all the replies, but I just don't understand why you should have such an attitude. A PC is never a perfect (still best of course) platform and everyone should only be grateful if something can be improved or added through software.

Your points are contradicting. You say that you get good bass with all content, which means your subwoofer is working without an LFE stream. So if you downmix to stereo and mix the LFE channel, then those tones should get sent to the subwoofer in your headphones along with all other low frequencies. If your headphone has a filter, set somewhere around 80-120hz, then mixing the LFE is the same thing as having a dedicated stream... LFE was created for big systems, where you might want your full range speakers to reproduce some of the bass content in the entire audio but not the sound effects in the sub channel. For your case, you would want your sub to handle all low frequency content, and it should do so automatically. I don't know if something is wrong with your lav configuration, but you seem to have found a solution with ac3filter, so what's the problem? As mentioned, lav audio is a decoder, the options it has are just extras that are useful to have for a variety of systems.

aufkrawall
25th March 2015, 20:17
According to this, NV VPUs (at least on 960?) can decode H.264 lossless?
https://devtalk.nvidia.com/default/topic/821171/unix-graphics-announcements-and-news/linux-solaris-and-freebsd-driver-349-12-beta-/

jmone
25th March 2015, 20:49
I just setup a low-pass filter for the sub in JRiver (100hz and 48 db/octave because that's the highest value available in JRiver from what I've seen) and it completely gets rid of the distortion in the sample I posted, as expected.

Sounds like the player is the correct place to to do it in the chain rather than the decoder.

That said, if you are mixing down in the decoder (instead of the player) you are going to be stuck. One thing I've always liked about LAV is it does it job really well as a decoder and avoided all the feature bloat of previous decoders.

nevcairiel
25th March 2015, 21:11
According to this, NV VPUs (at least on 960?) can decode H.264 lossless?
https://devtalk.nvidia.com/default/topic/821171/unix-graphics-announcements-and-news/linux-solaris-and-freebsd-driver-349-12-beta-/

In theory yes, but only 4:2:0 8-bit, and there is no good way to determine if a GPU is capable of that.

FireFreak111
25th March 2015, 22:37
I updated my samples and made them shorter :
-DTS-HD MA with "LFE garbage" https://www.dropbox.com/s/7kcjijo4p34vd3c/dtshdsample.mka?dl=0
-True HD with "LFE garbage" https://www.dropbox.com/s/ar11chywic24wih/truehdsample.mka?dl=0 it's more subtle, but on the last 5 secs or so when the truck is hitting the ground there is some loud crackling if you don't use a low-pass filter at 120hz or less. That's from The Dark Knight blu-ray, I'm honestly surprised they let this slip through but I guess that just illustrates e-t172's point. (and there might differences between the blu-ray releases, this is the French one)

Turned on downmixing, removed surround and centre channels, put LFE on 0.11. Very distinct distortion on both samples, disappearing when LFE is removed.

I also have The Dark Knight blu-ray, TrueHD. Same distortion.

Low-Pass Filtering for LFE should be a checkbox on the first tab, as it's clear that garbage isn't meant to be there for the majority of formats. If someone doesn't want it, it can be unticked.

huhn
25th March 2015, 23:15
in what case could a LFE low pass filter create trouble?

if i look at it this way why shouldn't it be used i don't see a reason not to use it. a LFE can't or at least shouldn't be able to reproduce anything over 120 hz or something like that.