[MP3 ENCODER] "make clean" patch

1999-12-17 Thread Iwasa Kazmi

This is a patch for omitting meaningless process when we do
'make clean' :)

// Though I tried to send this to sulaco.org, csoft.net rejected
// my e-mails. They seem considered me a spammer.
// "ne.jp" (and also "or.jp") exist in their UCE database.

If you are interested in the next stuff, check them at
http://www02.u-page.so-net.ne.jp/ca2/kzmi/lame/patch/

 - bitrate histogram update with win32api
 - equalizer on lame


Iwasa Kazmi
[EMAIL PROTECTED]


*** lame3.57/Makefile   Tue Nov 23 15:34:26 1999
--- MakefileFri Nov 26 20:21:27 1999
***
*** 21,26 
--- 21,27 
  MAKEDEP = -M
  BRHIST_SWITCH = 
  LIBTERMCAP = 
+ RM = rm -f
  
  
  ##
***
*** 259,265 
ar cr libmp3lame.a  $(OBJ) 
  
  clean:
!   -rm $(OBJ) $(DEP) $(PGM) main.o mp3x.o mp3x libmp3lame.a \
mp3resample.o mp3resample   
  
  tags: TAGS
--- 260,266 
ar cr libmp3lame.a  $(OBJ) 
  
  clean:
!   -$(RM) $(OBJ) $(DEP) $(PGM) main.o mp3x.o mp3x libmp3lame.a \
mp3resample.o mp3resample   
  
  tags: TAGS
***
*** 267,273 
--- 268,276 
  TAGS: ${c_sources}
etags -T ${c_sources}
  
+ ifneq ($(MAKECMDGOALS),clean)
  -include $(DEP)
+ endif
  
  test19: $(PGM)
./lame  ../test/castanets.wav



Re: [MP3 ENCODER] Status of noise quantization

1999-12-17 Thread Takehiro Tominaga

> "S" == Segher Boessenkool <[EMAIL PROTECTED]> writes:

>> AFAIK, x and i are energy terms, in which case the first
>> formula gives error in (energy^2); the second gives (error in
>> energy)^2, which is I think a more useful value.

S> x and i are amplitude terms; energy ~ amplitude squared times
S> frequency.

I think so too. x and i are amplitude.
this could be tested by like this.

make enough big "all 1" pcm file and "all 32767" pcm file. like this.

% od ../test1.pcm
000 000400 000400 000400 000400 000400 000400 000400 000400
*
020
% od ../test32k.pcm
000 177577 177577 177577 177577 177577 177577 177577 177577
*
020

and patch lame.c little bit, to print out "xr" value.
% diff -c lame.c lame.c.orig

:
  mdct_sub48(mfbuf[0], mfbuf[1], xr, stereo, &l3_side, mode_gr);
+ printf("%e\n", xr[0][0][0]);
:

and make and run the lame with these two files.

% lame ../test1.pcm
:
-4.315976e-05
-4.315976e-05
-4.315976e-05
-4.315976e-05
-4.315976e-05
^C


% lame ../test32k.pcm
:
-1.414216e+00
-1.414216e+00
-1.414216e+00
-1.414216e+00
-1.414216e+00
^C

You can easyly find out

1.414216 / 4.315976e-05 = 32767.003338294744919

And, xr is amplitude and is proportional to the input file amplitude.
not squared(energy).

I think we should use energy difference in db, so the noise formula
should be
sum (10 log (xr^2 - ix^(8/3)))
or
10 log (sum(xr^2 - ix^(8/3)))

and I think the latest quantization method will do the best aproximation
even when we use this noise formula.
--- 
Takehiro TOMINAGA // may the source be with you!
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] filter options (and several questions)

1999-12-17 Thread John T. Larkin

On Thu, Dec 16, 1999 at 08:06:26PM +0100, Gabriel Bouvigne ([EMAIL PROTECTED]) wrote
> ...
> It's right that it's not a lot, but I think it's important. As an
> example, a standard 10 or 15Hz high pass filter would be nice, as no
> one is able to ear such frequencies, so why encoding them?

A 10kHz filter, IMHO, would be a bad idea.  Even in poor listening
conditions with less than adequate equipment this is noticable.  It
will make most music have a more muddy and boomy sound.

15kHz would be OK for all but very demanding situations.

I'd guess that an 18kHz low pass filter would only be noticable with
very good/excellent conditions, and an experienced ear.

All of these estimates assume a good filter.  Setting the coefs. to
zero in those regions probably isn't the best way.  As mentioned in
previous emails, that could lead to some strange distortion.

If you use a soundcard/headphone combination for music tests, I'd
recommend getting good head phones, and checking out this web page for
the performance (especaially DtoA) of various sound cards: 
http://www.pcavtech.com/soundcards/summary/.  A sound card can make a
world of difference with its own performance characteristics at
various frequencies.


An audiophile,
John
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] filter options (and several questions)

1999-12-17 Thread Gabriel Bouvigne

> What is the purpose of this high-pass filtering ?
> You said that it would affect only 2 MDCT coeficients, that is
> less than a percent of them all, so what gain do you/we expect from it ?

In the tuning of the 44.1kHz voice option (I know that this option should be
updated now for other bitrates), I added such an high pass filter by zeroing
the 2 lower mdct coefficients. In my test cases, it dropped the vbr average
bitrate from 121kbps to 120kbps. So it's just a little more than a percent.
It's right that it's not a lot, but I think it's important. As an example, a
standard 10 or 15Hz high pass filter would be nice, as no one is able to ear
such frequencies, so why encoding them?


Regards,

Gabriel Bouvigne - France
[EMAIL PROTECTED]
icq: 12138873

MP3' Tech: www.mp3tech.org


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )