Skip to main content

Notice

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

qval, -q settings and presets

I am trying to figure out the status of the -q setting in the current/developement versions of LAME. What I have been able to gather is that -q0 uses huffman coding to losslessly compress the mp3 frames a little more(thus taking 5 times longer), and that -q3 is now the default for the presets(which include all -V commands).

But...is there anything "wrong" with -q2 like I have read about -q0(possibly broken?)? And which versions does this apply to?  Also what about -q1?

Ultimately I would like to not hear responses such as "just use the presets" because I am interested in the actual development of these settings since, theoretically, a lower q value should ALWAYS result in better quality.  At least that is how I understand this option, and it should NEVER result in a lower quality file, so perhaps while things are "broken" an explaination and a specific warning should be prominent in a forum such as this.

I've been trying to search for a while on this topic, but it's difficult to find all the discussions of q0, q1, q2, q3, etc because the search function of this forum does not allow strings of less than 3 characters, so i tried -q0, -q1, -q2, -q3 with some success, but i'm not yet satisfied with the information I have gathered. Please post links to other threads that discuss this topic and hopefully with these keywords in this post, people will be able to locate this discussion easier.

http://www.hydrogenaudio.org/forums/index....showtopic=24654
http://www.hydrogenaudio.org/forums/index....showtopic=24657
http://www.hydrogenaudio.org/forums/index....showtopic=22050
http://www.hydrogenaudio.org/forums/index....showtopic=24097

qval, -q settings and presets

Reply #1
In 3.96 and upper, an issue had been identified with -q1 (also apply to q0)

-q values mappind depend of Lame versions, so what is true for a version might not be true for an other one.

qval, -q settings and presets

Reply #2
thanks for the info!

to summarize:
In 3.96 and up, the decision to use -q3 in the presets is because it was determined to be "good enough" and also faster, not because -q2 is worse quality.

-q1 is the setting that actually has the "issue", and it applies to -q0 because -q0 is simply -q1 with the additional huffman lossless coding applied for additional space saving.

so...in theory the huffman coding could be applied(in source code) to -q2 instead of -q1 for small reductions in filesize while -q1 is broken?

qval, -q settings and presets

Reply #3
The gain from the modified huffman algorithm in q0 (in Lame 3.96) is very little. Unless you are making your MP3s for a very space limited environment (a 64MB portable, for example) the extra encoding time is not worth it.
Quote
so...in theory the huffman coding could be applied(in source code) to -q2 instead of -q1 for small reductions in filesize while -q1 is broken?

Yes, it could. As far as I can see a single line code change would do the trick. As I said above, the extra time is not worth a tiny gain in coding efficiency.

 

qval, -q settings and presets

Reply #4
Quote
-q1 is the setting that actually has the "issue", and it applies to -q0 because -q0 is simply -q1 with the additional huffman lossless coding applied for additional space saving.[a href="index.php?act=findpost&pid=238790"][{POST_SNAPBACK}][/a]

-q0 & -q1 having an "issue" means that using them can affect quality in a bad way? Does it apply to the 3.96.1 version of LAME?

qval, -q settings and presets

Reply #5
I agree cabbagerat, i was just trying to make sure i had a full grasp on the situation.

@rutra80, yes that is the way i understand it. As of now, even 3.97alpha suffer from this issue that negatively effects the quality if you use -q1 or -q0.

qval, -q settings and presets

Reply #6
any updated insight regarding the recent cvs changes:
Code: [Select]
reworked -q values:
noise_shaping_amp 2 removed
full Huffman search removed in q0
full outer loop search enabled in q0

qval, -q settings and presets

Reply #7
Little off-topic:

Can you tell me why in newer LAME versions there was -q2 setting replaced by -q3 ???
Sorry for my poor English, I'm trying to get better... ;)
"The greatest trick the Devil ever pulled, was convincing the world he didn't exist."

qval, -q settings and presets

Reply #8
anybody have any info regarding those code changes?

qval, -q settings and presets

Reply #9
Well, the code changes are only affecting the alpha versions.
Basically the sometimes-harmfull q1 has been removed, and q0 has been replaced by a different and faster one.

But you would need a recent alpha compile to test it.