Hi all!
I don't know Johnston & Ferreira 1992 ICASSP paper,
but I think this is so strange code....
in psymodel.c, we adjust the MS threshold if L & R masking differs
by 2db or less.
the code is
if ((chn==1) || (ratio[0][sb] <= 1.58*ratio[1][sb]) ) {
:
This condition is not symmetric. I think "differs by 2db or less" should not
mean "diff < 2db", but "-2db < diff < 2db" from the symmetry of LR channel.
So I made this patch. please check this out.
>>>>> "G" == Greg Maxwell <[EMAIL PROTECTED]> writes:
G> Has anyone looked into the 'left channel attentuation' claimed
G> by the USE mp3 test site?
I have not tested this patch very much, but I hope it will help the problem.
--
Takehiro TOMINAGA // may the source be with you!
*** lame3.57/psymodel.c Mon Nov 22 14:57:01 1999
--- lame3.57+psy/psymodel.c Wed Nov 24 00:02:14 1999
***************
*** 796,802 ****
/* use this fix if L & R masking differs by 2db or less */
/* if db = 10*log10(x2/x1) < 2 */
/* if (x2 < 1.58*x1) { */
! if ((chn==1) || (ratio[0][sb] <= 1.58*ratio[1][sb]) ) {
mld = mld_l[sb];
rmid = Max(ratio[ch0][sb],Min(ratio[ch1][sb],mld));
rside = Max(ratio[ch1][sb],Min(ratio[ch0][sb],mld));
--- 796,803 ----
/* use this fix if L & R masking differs by 2db or less */
/* if db = 10*log10(x2/x1) < 2 */
/* if (x2 < 1.58*x1) { */
! if (ratio[0][sb] <= 1.58*ratio[1][sb]
! && ratio[1][sb] <= 1.58*ratio[0][sb]) {
mld = mld_l[sb];
rmid = Max(ratio[ch0][sb],Min(ratio[ch1][sb],mld));
rside = Max(ratio[ch1][sb],Min(ratio[ch0][sb],mld));
***************
*** 806,812 ****
}
for ( sblock = 0; sblock < 3; sblock++ ){
for ( sb = 0; sb < SBPSY_s; sb++ ) {
! if ((chn==1) || (ratio_s[0][sb][sblock] <= 1.58*ratio_s[1][sb][sblock]) ) {
mld = mld_s[sb];
rmid = Max(ratio_s[ch0][sb][sblock],Min(ratio_s[ch1][sb][sblock],mld));
rside = Max(ratio_s[ch1][sb][sblock],Min(ratio_s[ch0][sb][sblock],mld));
--- 807,814 ----
}
for ( sblock = 0; sblock < 3; sblock++ ){
for ( sb = 0; sb < SBPSY_s; sb++ ) {
! if (ratio_s[0][sb][sblock] <= 1.58*ratio_s[1][sb][sblock]
! && ratio_s[1][sb][sblock] <= 1.58*ratio_s[0][sb][sblock]) {
mld = mld_s[sb];
rmid = Max(ratio_s[ch0][sb][sblock],Min(ratio_s[ch1][sb][sblock],mld));
rside = Max(ratio_s[ch1][sb][sblock],Min(ratio_s[ch0][sb][sblock],mld));
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )