This is maybe the "simplest" patch for 3.57 to make it use preemphasis.
It must improve the quality, and never to decrease the quality.
--
Takehiro TOMINAGA // may the source be with you!
*** lame3.57/quantize-pvt.c Mon Nov 22 14:54:41 1999
--- lame3.57+pre/quantize-pvt.c Tue Nov 23 19:51:32 1999
***************
*** 342,347 ****
--- 342,364 ----
for ( sfb = 0; sfb < 11; sfb++ )
if ( scalefac->l[gr][ch][sfb] > max_slen1 )
max_slen1 = scalefac->l[gr][ch][sfb];
+
+ if (!cod_info->preflag) {
+ for ( sfb = 11; sfb < SBPSY_l; sfb++ )
+ if (scalefac->l[gr][ch][sfb] < pretab[sfb])
+ break;
+
+ if (sfb == SBPSY_l) {
+ cod_info->preflag = 1;
+ for ( sfb = 11; sfb < SBPSY_l; sfb++ )
+ scalefac->l[gr][ch][sfb] -= pretab[sfb];
+ }
+ }
+
+ /*
+ * Note that scfsi is not enabled for frames containing short blocks
+ */
+
for ( sfb = 11; sfb < SBPSY_l; sfb++ )
if ( scalefac->l[gr][ch][sfb] > max_slen2 )
max_slen2 = scalefac->l[gr][ch][sfb];
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )