Help - Search - Members - Calendar
Full Version: LAME with MSVC 6
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
fairyliquidizer
I haven't programmed since 1997 so take this slowly (and that was on HP-UX, Solaris, and SunOS).

How do I compile with LAME with MS VC 6 so that it's Athlon XP optimised? I want to use as many instuction set enhancements as possible.

I've just done a nmake -f with the source and that works nicely enough... but I wanna optimize

Please guide me...

Thanks,
Fairy
fairyliquidizer
Just compiled using the IDE, never used a development environment since Turbo Pascal!

Still no optimisations...
Peter
MSVC6 does not have any kind of AthlonXP optimizations.
fairyliquidizer
oh bummer, too old?
fairyliquidizer
how do i get MMX and 387 used?
Peter
May I ask what is your problem with available LAME compiles ?
Mike Giacomelli
QUOTE(fairyliquidizer @ Dec 2 2003, 10:53 AM)
how do i get MMX and 387 used?

Its used in the official compiles. I don't think you could you encode something without 387.

Edit: I should add that IIRC the offcial compiles on this site use the Intel Optimizing Compiler which is basically the fastest available for x86.
john33
Are you using nasm and the asembler routines that are built in? These cover 3dnow, mmx and sse.
fairyliquidizer
I am now, but am only getting 3.2x is this what you'd expect from MSVC 6.0 and NASM for APS?

LAME version 3.93 MMX (http://www.mp3dev.org/)
CPU features: i387, MMX (ASM used), 3DNow! (ASM used), SIMD
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding testcase.wav to testcase.wav.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=2
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
21/23 (91%)| 0:00/ 0:00| 0:00/ 0:00| 3.2080x| 0:00

Thanks,
Fairy
fairyliquidizer
QUOTE(zZzZzZz @ Dec 2 2003, 10:53 AM)
May I ask what is your problem with available LAME compiles ?

I have no "Problem" I just have an inquisitive nature.... I'd like to tinker and see what I can get ohmy.gif) biggrin.gif
robert
QUOTE(zZzZzZz @ Dec 2 2003, 08:38 PM)
MSVC6 does not have any kind of AthlonXP optimizations.

After installing the processor pack you can make use of some intrinsics featuring P4 and AMD instructions like SSE, SSE2 and 3DNow!.
http://msdn.microsoft.com/vstudio/download...ck/default.aspx
fairyliquidizer
I have it installed already but under processor optimization I can choose 486, pentium, pentium pro, or blend!

WHich is best and why no Athlon XP? Is there another way?

Thanks,
Fairy
stipe
for my compiles i apply a little trick.

i have downloaded the memcpy_amd source code from amd's website. The memcpy_amd function is the athlon optimized version of the memcpy from the standard c library. It is noticeably faster, especially when copying large amounts of data.

when you download that source, you can replace all memcpy's in lame source code with memcpy_amd.
Peter
QUOTE(robert @ Dec 3 2003, 01:29 AM)
QUOTE(zZzZzZz @ Dec 2 2003, 08:38 PM)
MSVC6 does not have any kind of AthlonXP optimizations.

After installing the processor pack you can make use of some intrinsics featuring P4 and AMD instructions like SSE, SSE2 and 3DNow!.
http://msdn.microsoft.com/vstudio/download...ck/default.aspx

That only adds new instruction sets to built-in assembler and allows use of new functions, it won't automatically make any C/C++ code use new instructions (like ICL does).
Peter
QUOTE(stipe @ Dec 3 2003, 11:45 PM)
for my compiles i apply a little trick.

i have downloaded the memcpy_amd source code from amd's website. The memcpy_amd function is the athlon optimized version of the memcpy from the standard c library. It is noticeably faster, especially when copying large amounts of data.

when you download that source, you can replace all memcpy's in lame source code with memcpy_amd.

How much "noticeably faster" ?
stipe
it depends.

on my athlon-xp 1800+, play/CPU is about 5 to 10 % higher.
fairyliquidizer
I'm just crashing out now but I'll give that a try when I have some time (probably Sunday!). Where on the AMD site do you find it?

Thanks,
Fairy
Gabriel
I do not know where on the amd website are those memcpy function, but they can be find here:
http://net314.myphone.gr/xvid_amd.html

I am wondering about the performance gain. It could be interesting to also check the performance with an extra function pointer. This is because if we want to include that into main branch, it would need to be called using a function pointer set according to the cpu capabilities.
stipe
go on amd.com and type in the search: "memcpy_amd"
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.