Help - Search - Members - Calendar
Full Version: Y switch
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
misuzu
I use "-Y" switch between V2 ~ V0
Is the quality worse below 16khz wink.gif (between 0~16khz)
2Bdecided
Yes, because without the -Y switch, the encoder is forced to use more bit below 16kHz than it believes are necessary, in order to encode above 16kHz at the quality which is believes is necessary.

So adding -Y decreases the quality below 16kHz, but only down to the level which the encoder believe is correct.

Or, to say it the usual way, without -Y information below 16kHz can be over coded (i.e. with more accuracy than is needed).

Of course, with -Y, information above 16kHz is under coded (less accurately than the encoder believes is necessary).

Cheers,
David.
misuzu
QUOTE(2Bdecided @ Jun 4 2007, 05:26) *

Yes, because without the -Y switch, the encoder is forced to use more bit below 16kHz than it believes are necessary, in order to encode above 16kHz at the quality which is believes is necessary.

So adding -Y decreases the quality below 16kHz, but only down to the level which the encoder believe is correct.
.....

thank you for your answer smile.gif

then if I use "--lowpass" (example 17100Hz)
Is the quality worse below 17100Hz wink.gif
greynol
QUOTE(2Bdecided @ Jun 4 2007, 04:26) *

Yes, because without the -Y switch, the encoder is forced to use more bit below 16kHz than it believes are necessary, in order to encode above 16kHz at the quality which is believes is necessary.

So adding -Y decreases the quality below 16kHz, but only down to the level which the encoder believe is correct.

Or, to say it the usual way, without -Y information below 16kHz can be over coded (i.e. with more accuracy than is needed).

Of course, with -Y, information above 16kHz is under coded (less accurately than the encoder believes is necessary).

This isn't what I've come to learn about the -Y switch. Lame help says it allows noise in the band above 16kHz to be ignored.

As an example, there is a great deal more high frequency content without the -Y switch when encoding a track with 20kHz of BW using Lame 3.97 -V1 --vbr-new. At the same time, the bitrate of the track without the -Y switch is significantly higher.

I find it difficult to make any conclusions about the quality below 16kHz.
gameplaya15143
QUOTE(misuzu @ Jun 4 2007, 07:10) *

I use "-Y" switch between V2 ~ V0
Is the quality worse below 16khz wink.gif (between 0~16khz)
It shouldn't be any worse. I recommend using --lowpass 16 instead of -Y.

edit: -Y should reduce quality below 16khz.. see my post below
DigitalDictator
If I remember correctly, the Y switch was highly recommended if you wanted smaller file size and wasn't too sensitive about higher frequencies. It doesn't cut as abruptly as the lowpass filter. I would therefore recommend using it over the lowpass.
shadowking
Dibrom explains here:

http://www.hydrogenaudio.org/forums/index....;f=16&t=703



So far I can't get good abx results on vanilla -v2 vs -Y or --lowpass 16.
indybrett
It should be BETTER below 16Khz because you aren't wasting bits on the stuff you probably can't hear (above 16Khz) anyway.
greynol
I can see why you'd say this if the bitrates were the same with or without -Y, but they aren't.

This seems to contradict your point also:
QUOTE(Dibrom @ Mar 11 2002, 16:21) *
At any rate, when content over 16khz is encoded, and it causes such a big jump in bitrate, the majority of the extra bits aren't actually being spent on the frequencies over 16khz. Instead they are being spent on all the frequencies below this point.
2Bdecided
Yeah, see, I was right, as always.

wink.gif

not.

I just remembered that thread (have some of us really been here that long?!)

Cheers,
David.
greynol
The next question is, has the function of -Y changed since 2002?

wink.gif
memomai
QUOTE
The next question is, has the function of -Y changed since 2002?



reading the longhelp of lame 3.97 you will see no changes of the -Y switch.
indybrett
QUOTE(2Bdecided @ Jun 5 2007, 05:05) *

Yeah, see, I was right, as always.

wink.gif

not.

I just remembered that thread (have some of us really been here that long?!)

Cheers,
David.

Yeah, I joined a few months before that thread. I didn't know crap about lossy encoding then, and now I'm wondering if I do now, lol.
greynol
Me too! smile.gif
gameplaya15143
QUOTE(indybrett @ Jun 4 2007, 23:02) *

It should be BETTER below 16Khz because you aren't wasting bits on the stuff you probably can't hear (above 16Khz) anyway.
Since it is VBR that is in question.. the quality below 16khz should remain the same since LAME's VBR = constant audible quality (or at least is intended to). So the only difference should be a reduced average bitrate, and bit-starved or dropped higher frequencies.

Now that I think about it, using -Y with -V 2 should actually reduce quality below 16khz. Let me (try) to explain why.

Lets say a certain frame is sized at 192kbps with -V 2.

This frame with -V 2 --lowpass 16 is 128kbps. (audio below 16khz should be audibly equal to the above)

This same frame is sized at 128kbps with -V 2 -Y (same size as above). The quality of this encoded frame will be worse below 16khz because -Y does NOT cut high frequencies. So now, instead of encoding all this bandwidth in the needed 192kbps frame, it is instead smashed into a 128kbps frame, thus it is reduced quality because the high frequencies take bits away from the lower frequencies. (this is why I am discusted by the fact that -Y is actually used at all, instead of just being an experimental switch)
greynol
QUOTE(gameplaya15143 @ Jun 8 2007, 14:35) *
Since it is VBR that is in question.. the quality below 16khz should remain the same since LAME's VBR = constant audible quality (or at least is intended to). So the only difference should be a reduced average bitrate, and bit-starved or dropped higher frequencies.
FWIW, -Y only works with VBR, it does not work with ABR or CBR.

QUOTE(gameplaya15143 @ Jun 8 2007, 14:35) *
-Y does NOT cut high frequencies.
This does not mean that it will always encode them, either.

QUOTE(gameplaya15143 @ Jun 8 2007, 14:35) *
So now, instead of encoding all this bandwidth in the needed 192kbps frame, it is instead smashed into a 128kbps frame, thus it is reduced quality because the high frequencies take bits away from the lower frequencies.
Have you actually seen this in practice or are you making this up?
2Bdecided
QUOTE(greynol @ Jun 8 2007, 22:52) *

QUOTE(gameplaya15143 @ Jun 8 2007, 14:35) *
So now, instead of encoding all this bandwidth in the needed 192kbps frame, it is instead smashed into a 128kbps frame, thus it is reduced quality because the high frequencies take bits away from the lower frequencies.
Have you actually seen this in practice or are you making this up?
It's clearly a hypothesis, and one he can only make by not reading the thread properly!

The -Y switch measurably (and, ?to some people?, audibly) does exactly what it was designed to. There is no way it should be removed.

Cheers,
David.
Gabriel
QUOTE(2Bdecided @ Jun 5 2007, 10:05) *

I just remembered that thread (have some of us really been here that long?!)


Well, several of us are there since a lot more time (don't you?). We come from r3mix.net, where we came from vqf.com, where we came from mp3.com, where we came from dmusic.com...ah, the good old days of winplay3, l3enc, nad, sonique, k-jofol...
2Bdecided
Ah, you got me - I was never at dmusic.com.

But yes, we're getting old! crying.gif ohmy.gif biggrin.gif

Cheers,
David.
gameplaya15143
QUOTE(greynol @ Jun 8 2007, 17:52) *
This does not mean that it will always encode them, either.
Correct, but it since they aren't always dropped, the quality can be reduced due to -Y being used in VBR.

QUOTE(greynol @ Jun 8 2007, 17:52) *
Have you actually seen this in practice or are you making this up?
I have tested -Y quite a lot (which is why I hate it).

How much this effects audible quality at -V 3 and -V 4 (the only VBR modes using -Y with freqs higher than 16khz).. I don't know.. but IMHO those modes use a high enough bitrate for it not to matter much (at least not to me, lower bitrates like 112kbps makes the problem more audible). Custom compile lame without -Y on -V3 and you will find the average bitrate very close to -V2 (because the frequencies above 16khz are taken into account when encoding).

In lame's help it says (something like):
-Y allows lame to ignore noize in sfb21 like in cbr
This means (please correct me if I'm wrong) that lame ignores any sound above 16khz when calculating the frame size in VBR. The noise is still there, but lame pretends it's not. Thus lame only calculates the frame size for 16khz of audio bandwith. Which leads to my conclusion that since -Y does not necessarily cut freqs above 16khz, lame encodes more than 16khz of bandwidth into a frame intended for only 16khz of bandwidth. Which results in lower quality (at least conceptually).

Every test I have done with -Y has proven this to be true.
Wombat
QUOTE(2Bdecided @ Jun 12 2007, 13:27) *

Ah, you got me - I was never at dmusic.com.

But yes, we're getting old! crying.gif ohmy.gif biggrin.gif

Cheers,
David.

I still remember testing the -Y switch at r3mix with the macabre sample and its triangles at r3mix.net
Today i have problems making clear statements about this sad.gif

We ARE old (at least i feel so) wink.gif nonetheless i am still surprised i can still hear a 18.5kHz sweep and a strong 16kHz lowpass at the age of 38!

Cheers!
greynol
QUOTE(gameplaya15143 @ Jun 12 2007, 17:32) *
QUOTE(greynol @ Jun 8 2007, 17:52) *
Have you actually seen this in practice or are you making this up?
I have tested -Y quite a lot (which is why I hate it).

I don't doubt your ability to ABX differences, but this is a far cry from explaining your theories. Nothing you've said is consistent with what has been written by the reputable experts in this forum.
shadowking
There is no difference in general. I do have a problem sample for LAME and in that case plain v2 is a little better as more bits are going under 16k - not because they are needed. I can't normally abx -Y vs plain v2 and stuff above 16k is encoded as long as its not gonna cause bitrate bloat.
indybrett
Slightly off topic, but the V3 setting seems to not use sfb21, so, is it using the -Y switch by default, or some other method to reduce bitrate bloat above 16khz.
greynol
With Lame 3.97, at least, "-V3 --vbr-new" and "-V3 --vbr-new -Y" deliver exactly the same results.
Cosmo
QUOTE(indybrett @ Jun 13 2007, 10:59) *

Slightly off topic, but the V3 setting seems to not use sfb21, so, is it using the -Y switch by default, or some other method to reduce bitrate bloat above 16khz.

V3 and lower quality use the -Y switch
http://wiki.hydrogenaudio.org/index.php?ti...cal_information
indybrett
Thanks for the link. I feel stupid for not looking there first crying.gif
[JAZ]
QUOTE(gameplaya15143 @ Jun 13 2007, 02:32) *


In lame's help it says (something like):
-Y allows lame to ignore noize in sfb21 like in cbr
This means (please correct me if I'm wrong) that lame ignores any sound above 16khz when calculating the frame size in VBR. [...]


noise not equal sound.
Concretely, it says it doesn't care about encoding *accurately* (noise -> innacuracies ) those frequencies.
I don't get how you related "ignore noise" with "pretend to put an elephant in a t-shirt pocket", if you get what i mean.
gameplaya15143
QUOTE(JAZ @ Jun 13 2007, 13:12) *
noise not equal sound.
Concretely, it says it doesn't care about encoding *accurately* (noise -> innacuracies ) those frequencies.
I don't get how you related "ignore noise" with "pretend to put an elephant in a t-shirt pocket", if you get what i mean.
Because that is what all of my testing has shown.
greynol
Unless you can demonstrate a situation where Lame has packed more bandwidtch into a frame of the same size or smaller using -Y with the rest of the settings being the same, you will not be able to support your theory.

Based on Dibrom's statements and the simple fact that significantly less information above 16kHz gets encoded, I don't believe you'll ever be able to do this.
gameplaya15143
proof (screen shots are from analfreq 1.8 using left channel, test files are available there too)

The -Y situation can cause an artifact that I would describe as 'chirping', because sometimes there is sound/noize above 16khz. And when there is sound up there, it gets smashed into a frame* intended for 16khz, not more.
IPB Image

- 1kbps is not enough for me to consider the -Y and --lowpass 16 encodes to be very different.

Don't like my proof? Do your own tests and prove me wrong. tongue.gif

*if this is not technically the correct term, sorry and please correct me
robert
QUOTE(gameplaya15143 @ Jun 20 2007, 01:27) *

And when there is sound up there, it gets smashed into a frame* intended for 16khz, not more.

VBR doesn't work this way. For example with VBR NEW it goes like this:
- psymodel says how much noise is allowed per scalefactor band
- quantization step sizes are calculated which would result in lower or equal noise in each band
- global gain and scalefactors are selected to reach Layer3 specific constrains (like no sfb21 scalefactor, limited range of quantization step sizes, etc)
- frame gets quantized and encoded
- if it fits into available bits (a 320 kbps frame if you don't toy around with -Bxx switch), then that's it
- else quantization step sizes are adjusted until encoded data fits into available bits.


Using the -Y switch, anything in the sfb21 range (over 16 kHz) gets encoded "as-is" using the global quantization step size.
memomai
gameplaya I don't understand this graph... can you explain me please what the blue and the red marked lines are for? and the numbers for the axis, what are they for?
greynol
...maybe also ask him if he knows what a frame is. laugh.gif
beto
QUOTE(gameplaya15143 @ Jun 19 2007, 20:27) *

proof (screen shots are from analfreq 1.8 using left channel, test files are available there too)

The -Y situation can cause an artifact that I would describe as 'chirping', because sometimes there is sound/noize above 16khz. And when there is sound up there, it gets smashed into a frame* intended for 16khz, not more.
IPB Image

- 1kbps is not enough for me to consider the -Y and --lowpass 16 encodes to be very different.

Don't like my proof? Do your own tests and prove me wrong. tongue.gif

*if this is not technically the correct term, sorry and please correct me


Sorry, but I do not understand the purpose of this test... unsure.gif
What are you trying to prove??
I hope you are not taking conclusions like "this encoding method is better than this other because the graph has more high frequencies". rolleyes.gif
gameplaya15143
QUOTE(robert @ Jun 19 2007, 19:58) *
- quantization step sizes are calculated which would result in lower or equal noise in each band
If -Y is used, is noise above 16khz take into account here? (or am I missing something here?)
I thank you for the explanation, but I don't think it has any affect on how the effects of -Y are observed.

QUOTE(memomai @ Jun 21 2007, 11:35) *
gameplaya I don't understand this graph... can you explain me please what the blue and the red marked lines are for? and the numbers for the axis, what are they for?
red=average, blue=real-time, y-axis is amplitude, x-axis is frequency. If you want a better look at what is going on (in my test), you should get a copy of analfreq 1.8 and play around with it. The picture does a poor job of showing how much stuff there is above 16khz for my test file.


QUOTE(beto @ Jun 21 2007, 14:07) *
Sorry, but I do not understand the purpose of this test... unsure.gif
What are you trying to prove??
I hope you are not taking conclusions like "this encoding method is better than this other because the graph has more high frequencies". rolleyes.gif
I am trying to prove that -Y is bad. I am not drawing any conclusions from how the graphs look, they are merely there to show what is going on.

I added some abx test results to that little page of mine. There are audible differences between the 3 encoded samples.

I have yet to determine how much of an audible effect -Y has on the sound below 16khz (as is the whole point of this... working on it... I think lower bitrates would be easier, but -V9 is practically worthless to test this in recent LAME)

Doesn't what I am saying make sense? (at least conceptually)
- 2 files are pretty much the same average bitrate
- one of them has more bandwidth than the other
- higher frequencies are harder to encode and take more bits
- to have more bandwith in the same size.. the lower freqs must lose some bits to the high ones
= therefore I have to conclude that the file with more bandwidth, must be lower in quality (below 16khz) than the other file

Am I wrong? (explain, with encoding tests that can be done)


Now I am off to play Gunz: The Duel gun2.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.