View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
I believe there is an issue with the audio mixing matrix coefficients. When downmixing 5.1 to stereo, the front channels have a very low level, compared to all the other channels. The difference between them and the rear channels is very great, the latter being much louder. The center channel is louder than the front channels as well (but at least for this one the mixing coefficient is configurable).
This is easy to notice, when using the "normalize matrix" option (and having the clipping option disabled).
nevcairiel
28th July 2012, 19:47
The front channels have a coefficient of 1, while the surrounds have a coefficient of usually 0.7, but thats also configurable.
Its interesting how you noticed the center mix option, but failed to find the surround mix option right below it. :p
Anyway, the volume of all individual channels relative to each other is the same no matter if you apply matrix normalization or not.
The front channels have a coefficient of 1, while the surrounds have a coefficient of usually 0.7, but thats also configurable.
Its interesting how you noticed the center mix option, but failed to find the surround mix option right below it. :p
Anyway, the volume of all individual channels relative to each other is the same no matter if you apply matrix normalization or not.
Hi,
I must have been suffering from temporary blindness, because I have not realized the purpose of the "surround mix level" setting, indeed.
However, the problem that I have described, does indeed exist. And it only manifests itself when "Normalize matrix" is enabled. It does not manifest itself when only "Clipping protection" is enabled.
I don't doubt you when you say that the matrix coefficients for the front channels are 1, but then there's something else which goes wrong, because the front channels do have their level attenuated (or maybe the other channels suffer some sort of additional amplification).
I went again and tested it, with a different sample than my initial one, and the problem was manifested again:
- the front channels suffer from noticeable attenuation of their level
- the center channel, when it starts, is definitely much louder than the front channels
- the rear channels are also louder than the front channels
For my second test, I have used this 6 channel WAV file from Microsoft:
http://www.microsoft.com/windows/windowsmedia/howto/articles/Multichannel.aspx#link6
I have converted it to a 6 channel FLAC file (with foobar2000 and the reference FLAC encoder), and embedded it into a mkv(a) file (with mkvmerge).
Here are all the files:
http://download.microsoft.com/download/winmediatech40/Utility/1.0/W98NT42KMeXP/EN-US/6channel.exe
http://wikisend.com/download/415420/6_Channel_ID.flac
http://wikisend.com/download/733612/6_Channel_ID.mkv
How to reproduce:
- listen to the mkv file, letting the Windows mixer do the downmixing to stereo, or by using LAV but with only the "Clipping protection" option enabled (or listening to the wav or flac in foobar2000, Windows Media Player, etc)
- listen to the mkv, in MPC, after enabling "Normalize Matrix"
What should happen:
- the sound level of the all channels should be the same during the two auditions
What happens:
- the sound level of the channels, relative to each other, is different during the second audition (front channels are very quiet, the center channel is very loud, and the rear channels are louder than the front channel as well)
nevcairiel
29th July 2012, 12:19
That doesn't make any sense, i checked the generated matrix, and it looks fine.
For left and right, the coeffs are like this, respectively:
Original Left/Right: 0.4117
Center: 0.2941
Surround Left/Right: 0.2941
If anything, Left/Right should be louder then the surrounds. Center coming out of two channels now instead of one before should have about the same volume as left/right.
Edit:
I analyzed the audio in that file, and it seems that the center and back channels are just encoded with more gain then the front left/right channels. Its not all that obvious when you play it as 6-channel, but the difference is there.
msoltyspl
29th July 2012, 12:49
Regarding channel downmixing, I did some tests with my old test file (http://soltys.ziu.info/temp/ogg61.mkv) from 6.1 -> 2:0.
From what I can see, the default settings (aside LFE channel by default at 0) should roughly function analogously to this: http://i.imgur.com/pSjm5.png
If I go through ffdshow's mixer without enabling LAV's mixing, or leave the job to windows (for the record, many drivers have issues with handling 6.1 - be it channel order or levels, though x-fi seems to do it fine) - then the file plays with the same perceived loudness for all channels (splitting front and back at sqrt(2)/2 to left and right channels, and side left/right in 1:1 to left/right respectively).
If I enable LAV's mixing, then both front and back play noticably louder then the rest. I have to drag sliders down to around 0.35 - 0.4 to keep them at similar level. All settings/matrix checkboxes are unticked.
So perhaps there's something amiss, or maybe I missed something obvious.
Weirdo
29th July 2012, 13:07
Thanks for the constant updates. Any chance you might add an update check and notification for the LAV filters?
The center and rear channels on the Microsoft file are indeed a bit louder than the front channels. However, the difference in loudness is very small, and by no means what I was hearing.
But now that you've mentioned the coefficients that are supposed to be there, I believe I now know why it's so loud for me.
I have uninstalled v0.50.5, and have installed 0.51.3 (I had no other 0.51 version installed previously). The editable matrix coefficients in the filter configuration page, after just having installed v 0.51.3, are at 0.71 for the center and surround channels, and 0 for the LFE channel, and not the values that you have mentioned in your post.
The tests above, I have done them using these default values that were there in the filter configuration.
After trying 0.29 for the center, and 0.29 for the surround channels, indeed, the awful difference between the front and back channels is gone. Now it sounds just like the wav file sounds, when playing it in Windows Media Player, or in foobar2000. :)
Unless I have changed the values in the user interface, and have no memory left about this, the default values in the filter configuration page are wrong, and should be the ones you mention in your post above.
PS: what should be the coefficient value for the LFE channel ? 0.29 seems too high for the LFE (the LFE channel sounds less loud in Windows Media Player, than in LAVAudio with 0.29 set for LFE) ? foobar2000 also seems to play the LFE channel in the original wav file much louder than WMP plays the LFE channel in the same file.
PS2: actually, using 0.29, the rear channels also sound a little less loud than WMP plays them... (but this is very slightly less loud, so maybe I'm imagining it).
fairchild
29th July 2012, 14:13
All this mixing talk has me enthralled yet confused on what are the correct settings. Nev, should should I just leave the settings at 0.71, 0.71, 0 (Center, Surround, LFE) at their default settings when mixing to Stereo with only Clipping Protection enabled which is the default settings, or should I use 0.29, 0.29, 0? :)
nevcairiel
29th July 2012, 14:15
The editable matrix coefficients in the filter configuration page, after just having installed v 0.51.3, are at 0.71 for the center and surround channels, and 0 for the LFE channel, and not the values that you have mentioned in your post
What i listed above is after matrix normalization, what you configure is before.
The generated mixing matrix looks perfectly fine to me, so unless there is a bug somewhere in the library that actually does the mixing, i have no idea why there should be something wrong. In any case, that library is not my code.
0.71 for Center is the correct mixing level, that is just 1/sqrt(2) to reduce the volume to accomodate for splitting the channel from one to two. With 0.71, the perceived volume of the center should remain the same.
For surround you can argue what the correct level should be. I choose to also use 0.71 to make the volume of the surround a bit lower then the fronts. If you use 1 for surround, the volume of the surrounds should not change at all.
Anyway, i won't be looking at this much more, i have other things to do that are actually fun. If someone is sure that there is something wrong and wants to investigate further, be my guest. Shouldn't be all that difficult to determine if libavresample works as one might expect.
What i listed above is after matrix normalization, what you configure is before.
The generated mixing matrix looks perfectly fine to me, so unless there is a bug somewhere in the library that actually does the mixing, i have no idea why there should be something wrong. In any case, that library is not my code.
0.71 for Center is the correct mixing level, that is just 1/sqrt(2) to reduce the volume to accomodate for splitting the channel from one to two. With 0.71, the perceived volume of the center should remain the same.
For surround you can argue what the correct level should be. I choose to also use 0.71 to make the volume of the surround a bit lower then the fronts. If you use 1 for surround, the volume of the surrounds should not change at all.
Anyway, i won't be looking at this much more, i have other things to do that are actually fun. If someone is sure that there is something wrong and wants to investigate further, be my guest.
Hi,
Well, with 0.71 as the coefficient in the filter configuration page, the file sounds wrong. A simple playback of the original wav file in Windows Media Player, and a playback of the mkv in MPC with LAVAudio doing the down-mixing, reveals that the sound is completely different.
Being Microsoft who has created the wav file, I imagine that it's properly mastered, the channels are properly flagged, and the way it sounds when playing in Windows Media Player is the way it should sound.
I understand your decision to not invest any more time in this. However, the down-mixing feature does not produce a correct output, and that's that then.
Side-note: using 0 for the LFE in the filter configuration, means there will be no LFE sent to the speakers at all, when downmixing to stereo; is this also intended ?
nevcairiel
29th July 2012, 15:39
I suggest to give this version a try, i think i identified the problem in the mixing library and worked around it for the time being.
http://files.1f0.de/lavf/LAVFilters-0.51.3-6-gc33e189.zip
Also, yes, 0 for LFE is intentional as the default value (a recommendation from Dolby when performing downmixes). But its a configuration and you're free to change it for your needs.
e-t172
29th July 2012, 15:50
Also, yes, 0 for LFE is intentional as the default value (a recommendation from Dolby when performing downmixes).
Indeed. I think that's because most stereo systems are unable to handle LFE frequencies. That would increase the risk of clipping with material with heavy LFE content.
dansrfe
29th July 2012, 16:34
Indeed. I think that's because most stereo systems are unable to handle LFE frequencies. That would increase the risk of clipping with material with heavy LFE content.
What if I have 2.1 satellite speaker system that only takes a 2.0 stereo input via single 3.5mm three-conductor plug but feeds LFE frequencies relatively cleanly to the subwoofer? By listening I can tell that the LFE frequencies are nicely separated by whatever mechanism the system uses.
What would be the best values for center, surround and lfe in this case?
nevcairiel
29th July 2012, 16:38
Just increase the LFE to a value that sounds good to you, there aren't really any pre-determined values. A value of 1.0 might even work out OK so you get the original LFE volume.
I suggest to give this version a try, i think i identified the problem in the mixing library and worked around it for the time being.
http://files.1f0.de/lavf/LAVFilters-0.51.3-6-gc33e189.zip
Also, yes, 0 for LFE is intentional as the default value (a recommendation from Dolby when performing downmixes). But its a configuration and you're free to change it for your needs.
Hi,
Thanks for sticking to it. Indeed, with the new build, the sound levels seem to be similar as when played with Windows Media Player, when using 0.71 in the filter configuration for the center and surround channels, with "Normalize Matrix" on. There might be a slight difference, with front an center channels a bit louder than with WMP, but I'm not certain, and it's not easy to notice it, anyway.
Side-note: for LFE, I'm using 0.12, to get the same apparent level as Windows Media Player when playing the 6 channel wav file.
e-t172
29th July 2012, 18:38
Just increase the LFE to a value that sounds good to you, there aren't really any pre-determined values. A value of 1.0 might even work out OK so you get the original LFE volume.
That's not so simple. Dolby specs indicates the LFE channel should be 10 dB louder than any of the main channels (page 21). (http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/L.mn.0002.5.1guide.pdf) So, taking the main channels as reference (x1.0), the LFE signal should be fed to L and R with +7dB gain (10dB - 3dB), or x2.24.
nevcairiel
29th July 2012, 18:41
That's not so simple. Dolby specs indicates the LFE channel should be 10 dB louder than any of the main channels. So, taking the main channels as reference (x1.0), the LFE signal should be fed to L and R with +7dB gain (10dB - 3dB), or x2.24.
It wouldn't be 10dB louder either when playing the original multi-channel format without downmixing either, so this shouldn't be required to be performed in the mixer (unless of course the A/D component is usually doing this).
My guess is that its a spec for the mastering of the file, or the decoder.
e-t172
29th July 2012, 18:53
It wouldn't be 10dB louder either when playing the original multi-channel format without downmixing either
Yes it would, because in this case the receiver does the additional amplification. Or if you're doing analog with a sound card, the sound card is supposed to do this, assuming it has decent bass management features (for example my Xonar does it). The Windows audio engine does it if you ask it to downmix 5.1 to stereo. So if you're doing the downmixing yourself, you need to adjust levels, or the LFE level will be wrong. The rule is simple: if you're mixing LFE with a main channel, the LFE signal should be 10dB louder.
so this shouldn't be required to be performed in the mixer (unless of course the A/D component is usually doing this).
Yes it is. Whatever downmixes the signal does it. If there's no downmixing, then the receiver does it.
My guess is that its a spec for the mastering of the file, or the decoder.
Sorry. You guessed wrong.
http://www.hometheater.com/content/bass-management-and-lfe-channel
http://www.hometheaterhifi.com/volume_7_2/feature-article-misunderstood-lfe-channel-april-2000.html
http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/38_LFE.pdf
Here's a quote from the third link, official Dolby document:
Consumer Dolby Digital products that reproduce multichannel sound must combine the LFE channel in the proper acoustic mixing ratio with the bass from the other channels for proper reproduction. [...] The signal in the LFE channel is calibrated during soundtrack production to be able to contribute 10 dB higher SPL than the same bass signal from any one of the screen (front) channels.
Besides, it actually makes sense: if you want a channel to be always 10dB louder than the rest, then it's better to adjust the level in the last item of the chain (i.e. the amplifier) so that dynamic range in the other channels do not have to suffer.
nevcairiel
29th July 2012, 19:01
The signal in the LFE channel is calibrated during soundtrack production to be able to contribute 10 dB higher SPL than the same bass signal from any one of the screen (front) channels.
Doesn't this say that in production the channel is adjusted to be 10dB louder? At least it sounds to me like that.
Besides, it actually makes sense: if you want a channel to be always 10dB louder than the rest, then it's better to adjust the level in the last item of the chain (i.e. the amplifier) so that dynamic range in the other channels do not have to suffer.
Since when does Dolby make sense? Commercial audio already has the dynamic range butchered to death.
But anyway, the level can be configured, if i need to increase the maximum value i can do that.
e-t172
29th July 2012, 19:13
I already gave you three links. Here's another one, this time the actual Dolby Digital specification (http://www.atsc.org/cms/standards/a_52-2010.pdf) (page 53):
Downmixing of the lfe channel is optional. An ideal downmix would have the lfe channel reproduce at an acoustic level of +10 dB with respect to the left and right channels.
There's also Wikipedia (http://en.wikipedia.org/wiki/Low-frequency_effects):
The LFE channel is conventionally played back 10 dB louder than the main channels, giving significantly more recording headroom.
Genelec agrees too. (http://www.genelec.com/documents/animations/selectable_lfe.swf)
Oh, look, an ITU spec (http://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.775-2-200607-I!!PDF-E.pdf)!
Recommendation ITU-R BR.1384 specifies that the LFE channel is recorded with a level offset of –10 dB for the recording and exchange of multichannel sound programme material, and this offset is compensated for in the reproduction system. For broadcasting applications where signal levels are compliant with Recommendation ITU-R BR.1384, the level of LFE channel should be reproduced with positive offset gain of 10 dB relative to the main channels on reproduction.
NOTE 1 – The film industry encodes the LFE channel such that a positive gain of 10 dB is required on reproduction and the reproduction level for DVD-Video is set to a positive gain of 10 dB relative to the main channels.
Let's see the ITU-R BR.1384 (http://www.itu.int/dms_pubrec/itu-r/rec/br/R-REC-BR.1384-2-201103-I!!PDF-E.pdf) spec that it refers to:
The LFE channel is recorded with a level offset of –10 dB. This offset is compensated for in the reproduction system, where the LFE loudspeaker has an acoustic output (within its low frequency passband) of +10 dB with respect to the other channels, when fed by a signal whose level is equal to the level of the signals feeding each of the L, C, R, LS and RS channels.
If that's still not enough for you, you can try it with any receiver or soundcard with bass management support: feed it a bass signal on a main channel, if bass management is configured correctly it will come out from the subwoofer; then feed it the same signal on the LFE channel, it will also come out from the subwoofer, but it will be 10dB louder.
nevcairiel
29th July 2012, 19:20
I already gave you three links.
Yeah, and i like spending my sundays reading pages of documentation on a topic which is totally irrelevant to the point.
Just to repeat the point:
LFE mixing is disable by default, and anyone that enables it can set the value to whatever he deems correct. This is even in accordance with the Dolby spec you cited, in fact directly after you quote:
Since the inclusion of this channel is optional, any downmix coefficient may be used in practice.
In practice, the user can configure the coefficient they think sounds the best. And with that, the discussion is over. Its the users choice. I made a choice for the default, anything else is totally up to them.
kitame
29th July 2012, 21:07
just give the kid the candy he wants, up the limit to 2.5 >,> but leave the default settings to either 0 or 1.
also can i ask for a master volume with a gain boost? like 200% or so, so i can lower the master control of the soundcard a tad lower, as it is i need to up the volume from 30% to 40% from the master control even if MPC is set to 100%.
or simply put i want MPC to sound louder than the other sound sources set at the same level.
SeeMoreDigital
29th July 2012, 21:09
Well said Nev ;)
Andy o
30th July 2012, 01:39
just give the kid the candy he wants, up the limit to 2.5 >,> but leave the default settings to either 0 or 1.
also can i ask for a master volume with a gain boost? like 200% or so, so i can lower the master control of the soundcard a tad lower, as it is i need to up the volume from 30% to 40% from the master control even if MPC is set to 100%.
or simply put i want MPC to sound louder than the other sound sources set at the same level.
That's a recipe for disaster (clipping). The Windows mixer doesn't only provide multichannel downmixing, it also lets you change relative volume of applications, which would be a better fix for you. The only reason I would use digital gain (carefully) is if I got audible hiss from the amplifier at the volume I listen to.
mzso
30th July 2012, 05:34
Hello nevcairiel!
I was wondering, do you think AMD's HSA will have any sort of interest for multimedia coding/muxing/processing.
kitame
30th July 2012, 10:16
That's a recipe for disaster (clipping). The Windows mixer doesn't only provide multichannel downmixing, it also lets you change relative volume of applications, which would be a better fix for you. The only reason I would use digital gain (carefully) is if I got audible hiss from the amplifier at the volume I listen to.
the problem though is that a number of my applications doesn't have any volume controls even under windows mixer which makes them run at 100% all the time, which really does force me to change the master control all the time and windows mixer isn't so friendly with setting them at these precise numbers making it harder =/.
Andy o
30th July 2012, 10:25
Strange, I've never seen that. If the application's sound is going through the mixer, the control should be there, which applications are these?
DragonQ
30th July 2012, 11:00
Yeah, and i like spending my sundays reading pages of documentation on a topic which is totally irrelevant to the point.
Just to repeat the point:
LFE mixing is disable by default, and anyone that enables it can set the value to whatever he deems correct. This is even in accordance with the Dolby spec you cited, in fact directly after you quote:
Surely the default mixing coefficients should be the coefficients used as "standard"? I mean, that's what you've done with the front and surround channels, why should the LFE be any different? The +10 dB thing is why the LFE channel is always much quieter than the others (when you look at it in an audio editing program). It's so that there's more dynamic range for loud bass thumps. :p
In practice, the user can configure the coefficient they think sounds the best. And with that, the discussion is over. Its the users choice. I made a choice for the default, anything else is totally up to them.
As I understand it, the user can't currently choose the standard +10 dB level right now so that needs fixing. The default level is up to you but I'd have thought implementing the most commonly used setting would make the most sense.
I understand that most PC speakers shouldn't be receiving LFE since they can't handle the frequencies, so maybe you could have the default being 2.24 but then a tickbox saying "mix LFE" that is off by default and greys out the slider? That way users that want LFE can just tick the box and get the correct setting, rather than having to research what the correct setting actually is. Or, have "suggestions" written underneath the sliders? :)
nevcairiel
30th July 2012, 11:16
Surely the default mixing coefficients should be the coefficients used as "standard"?
0 is a perfectly fine standard, as i said earlier, a recommendation by Dolby to not mix LFE into stereo for two reasons: To avoid clipping issues that may arise from mixing even more channels into one, and secondly because a lot of weak stereo systems just don't do low frequencies.
For the slider, it'll remain as-is and there won't be an extra checkbox. I already changed it to accept a higher range of values (up to 3.0).
The problem with the additional dynamic range on the LFE channel is that when you increase the volume by +10dB in the digital signal, you either may get clipping on those "loud bass thumps", or the overall volume of the other channels reduces as clipping protection is engaged, so ideally the volume should be changed as the last step, possibly in the analog domain.
If you use a normalized matrix and set a 2.24 coeff for LFE, the volume of all other channels will be *significantly* reduced, so i would never recommend that. If you don't use the normalized matrix but clipping protection instead, it of course depends on how strong the LFE signal really is, but if that 10dB extra head room is actually used, it may also result in a significant volume loss in the middle of an action scene.
Anyway, in theory there always are "perfect" settings, in practice however the "standard" just has a lot of drawbacks.
The 10dB offset was introduced to allow retaining the full dynamic range in the other channels, while giving the LFE channel a chance to have more volume. If you downmix with that 10dB taken into account, you basically just revert this advantage and reduce the dynamic range of all other channels - thats just not even close to "perfect".
Anyway, i really don't want to spend more time discussing this. I increased the configuration scale, and you can configure it to whatever you think is perfect.
Every minute i spent here arguing, is one minute i cannot spent on developing stuff, so i'll go back to developing stuff. :p
bugmen0t
30th July 2012, 14:20
Is there a way to set all levels to the same defaults like ffdshow, ac3filter, etc. without using a registry hack? (i.e. center = lfe = 1/sqrt(2), surround = 1) With the sliders i cannot achieve accurate values. Probably even hitting exactly 1 gets difficult now with the expanded range.
Is there any intention to make lav audio sound differently than other filters? (lfe = 0 is fine too, of course)
kitame
30th July 2012, 14:56
Is there a way to set all levels to the same defaults like ffdshow, ac3filter, etc. without using a registry hack? (i.e. center = lfe = 1/sqrt(2), surround = 1) With the sliders i cannot achieve accurate values. Probably even hitting exactly 1 gets difficult now with the expanded range.
Is there any intention to make lav audio sound differently than other filters? (lfe = 0 is fine too, of course)
giving it a type box would make it easier, so typing in the number you want will be easier than sliding randomly.
Strange, I've never seen that. If the application's sound is going through the mixer, the control should be there, which applications are these?
they're emulators.
DragonQ
30th July 2012, 15:30
Is there a way to set all levels to the same defaults like ffdshow, ac3filter, etc. without using a registry hack? (i.e. center = lfe = 1/sqrt(2), surround = 1) With the sliders i cannot achieve accurate values. Probably even hitting exactly 1 gets difficult now with the expanded range.
Is there any intention to make lav audio sound differently than other filters? (lfe = 0 is fine too, of course)
You can use the left/right arrows on your keyboard. That usually lets you get to exact values with sliders.
egur
30th July 2012, 21:26
would it be enough to replace the beta Media SDK .dll with the older one (official driver, or just put the older into the lav splitter dir instead directly) to get it back working or is it a deeper issue ;) ?
I'm afraid the problems are across the board.
I've released a new version that should handle the current problems. It has more robust code so I recommend using it on production drivers. Also fixed some a/v sync issue (not relevant to LAV filters).
For LAV to work with the new DLL under the problematic driver, it needs to disable most of the multithreading features (e.g. just keep MT copy). I hope Nev will not produce such an ugly workaround. A dialog with QS options in LAV would be nice for testing purposes though...
strumf666
31st July 2012, 01:54
In some movies I get upsampling and upmixing on audio; can this be disabled somehow? I am bitstreaming audio through HDMI to AV receiver.
http://shrani.si/t/2R/8s/3Xp7SO1S/potplayer.jpg (http://shrani.si/?2R/8s/3Xp7SO1S/potplayer.jpg)
Andy o
31st July 2012, 04:07
If you're bitstreaming, LAV is not upsampling. What you're seeing there, the "output" information, is normal for bitstreaming DTS-HD. If there is any upmixing that you're having is not from your PC, it's from your receiver.
strumf666
31st July 2012, 04:37
Regarding the channels you are correct , I can see it on the AVR that it is being fed only 5.1 (and the receiver is upmixing it to 7.1), so the info display in potplayer seems to be broken (or I don't understand why it doesn't show same as source). Regarding the sample frequency I can not see it on the receiver so I can not verify it.
Another test with a DD 2.0 source:
http://shrani.si/t/3s/Ee/1J4Opb7T/potplayer2.jpg (http://shrani.si/?3s/Ee/1J4Opb7T/potplayer2.jpg)
And regular DTS:
http://shrani.si/t/d/ss/kgNOcBm/potplayer3.jpg (http://shrani.si/?d/ss/kgNOcBm/potplayer3.jpg)
edit: Another question - The aspect ratio and output resolution differs in all three screenshots is that normal/bug as well or have I set something wrong?
Andy o
31st July 2012, 05:01
If you're bitstreaming, it's simply not upsampling. There's no way it can even do that (besides decoding->upsampling->reencoding, which is impossible with DTS-HD right now).
Re: aspect ratio, it seems your player is set to somehow stretch horizontally to screen width, which I assume is 2048 pixels. There's no option to preserve original AR?
strumf666
31st July 2012, 05:19
Both my screens are the standard 192x1080 so I am not really sure why the stretching.
Or is it a bug again? I don't seem to remember having noticed the non-matching output until I started using lav+madvr in potplayer. Now I am not sure if the problem is with potplayer od madvr and/or lav.
http://shrani.si/t/m/kY/4wkxsmIM/potplayerar.jpg (http://shrani.si/?m/kY/4wkxsmIM/potplayerar.jpg)
http://shrani.si/t/3v/gh/4SyCIz6w/potplayerar2.jpg (http://shrani.si/?3v/gh/4SyCIz6w/potplayerar2.jpg)
Andy o
31st July 2012, 06:47
Can't just switch players and test? I think most of us are using MPC-HC.
nevcairiel
31st July 2012, 06:52
This is a failure in PotPlayers OSD. Most video decoders will output it as 2048, because the renderer asks for that (better alignment). However, the extra pixels are empty padding and the renderer will not show it. Don't trust such an OSD at face value if you don't know how to interpret it properly
DragonQ
31st July 2012, 10:43
Aspect ratio looks fine to me - the BBC thing will be 16:9 so fills the frame, the others are films which are usually wider than 16:9 so will have black bars top & bottom.
strumf666
31st July 2012, 12:50
Ok, thanks for explanation :)
nevcairiel
2nd August 2012, 17:09
Hey,
Test version time!
x86: http://files.1f0.de/lavf/LAVFilters-0.51.3-15-g17143fc.zip
x64: http://files.1f0.de/lavf/LAVFilters-0.51.3-15-g17143fc-x64.zip
In this version, i worked on fully moving the avcodec decoder to my new decoding worker thread which was introduced a few versions back, but was only completely used by the WMV DMO decoder until now.
The big advantage of this change is that decoding now runs completely independent of the main processing thread. This means that decoding and the processing can run in parallel.
What does that mean for you?
- Processing in LAV includes YADIF and any pixel format conversion, including YUV->RGB, etc.
- It also includes any processing done in another filter in the graph, which does not do its own multi-threading, like ffdshow.
You'll see the biggest advantages in single-threaded decoders, or when running with low threads. Single-threaded H264 decoding by itself is around ~5% faster.
In combination with YUV->RGB conversion or with YADIF, single-threaded H264 is significantly faster, activating both is now fully transparent on my system, which means the FPS does not change at all, no matter if you do the processing, or you do not. All thanks to just making it run in parallel to the decoding, instead of everything in a series.
Multi-threaded decoding does not benefit that much from it, because the decoding is already running in dedicated threads, however performance may still improve when doing very extensive processing.
The downside of it?
Multi-threaded decoding may be *slightly* slower then with a decoder which does not do this. The reason for this is the extra synchronization between the decoder thread and the main thread. Note that this synchronization does not use more CPU, it just has to wait on critical sections. During the wait, the CPU is given to any other threads that want it. So it may be slightly slower, but it doesn't use more CPU, so the CPU is still free for any other tasks (post-processing, etc).
It all comes down to benchmarking vs. real world applications. In the real world, this design is much better in all cases, just in benchmarks where only the decoder is measured and not the whole playback system, there may be a very minor disadvantage (we're talking usually less then 1% here)
I wanted to draw a picture of the processing flow before (and with most other decoders), and after the change, but my art skills suck too much. Maybe i'll do it for the release version.
@Test Version:
Obviously i posted the version because i think its a good idea to test it. If you encounter any weird decoding failures, or even crashes, which did not happen with the previous version, please report them directly. :)
SamuriHL
2nd August 2012, 17:38
8>Build started 8/2/2012 12:20:22 PM.
8>InitializeBuildStatus:
8> Creating "c:\dev\projects\lavfilters\bin_Win32\LAVSplitter\LAVSplitter.unsuc
cessfulbuild" because "AlwaysCreate" was specified.
7>decoders\avcodec.cpp(511): error C2065: 'm_bDXVA' : undeclared identifier
7> dxva2dec.cpp
Nev, I'm getting that when I build the latest. Any ideas?
Sebastiii
2nd August 2012, 17:40
Thanks Nev, nice feature and i will try ASAP :P
nevcairiel
2nd August 2012, 17:46
Nev, I'm getting that when I build the latest. Any ideas?
Works just fine here.
SamuriHL
2nd August 2012, 17:46
Lovely. I'll blast it and pull clean.
andyvt
2nd August 2012, 17:49
Works just fine here.
Would you consider including a feature that refuses connections from the splitter to specific filters?
Sebastiii
2nd August 2012, 18:32
Works just fine here.
Fine too :)
nevcairiel
2nd August 2012, 18:42
Would you consider including a feature that refuses connections from the splitter to specific filters?
If you don't want to use a specific filter, just unregister it? :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.