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: 64-bit FLAC (Read 5572 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

64-bit FLAC

I did some searching for this, but couldn't find anything.  This question is two part.  I understand a lot about computers, but I don't know a whole lot about audio encoding.  One, would there be a benefit of a 64-bit FLAC compressor?  Two, is there plans to do so?

-Phil

64-bit FLAC

Reply #1
Quote
I did some searching for this, but couldn't find anything.  This question is two part.  I understand a lot about computers, but I don't know a whole lot about audio encoding.  One, would there be a benefit of a 64-bit FLAC compressor?  Two, is there plans to do so?

-Phil
[a href="index.php?act=findpost&pid=318892"][{POST_SNAPBACK}][/a]



The only thing compiling flac to 64bit might improve is encoding speed. Seems like a whole lot of coding to impliment something that wouldn't save that much time. If your running a new 64bit processor are the times really that long?

64-bit FLAC

Reply #2
Yeah, I'm on an AMD64 processor about 2.0 GHz or so.  Times are not all that slow (all though this is really the only computer I have done FLAC encoding on, so I really have nothing to compare it to), but I was just curious about the 64-bit processing.  I really don't notice the difference between this processor and others, so I am trying to find ways to use it, lol.

-Phil

P.S.  I figured that encoding speed would be where the difference came in

64-bit FLAC

Reply #3
Have a read of this.

64-bit FLAC

Reply #4
I recently did some very rudimentary benchmarks of 32-bit vs. 64-bit FLAC on a 2.2GHz AMD64.  Contrary to my [a href='index.php?act=findpost&pid=315950']earlier prediction[/a], the 64-bit encoder was quite a bit faster.

The tests were performed under Linux running in 64-bit mode with the Ubuntu (Hoary) binaries of FLAC for the i386 and AMD64 architectures.  All input and output files were on a tmpfs mount so that disk activity would not be a factor.  I used a corpus of 13 not particularly representative tracks totaling 55:27 in length.  Compression was done at level 8.  The speeds were as follows:

32-bit:  Encoding 8.8x  Decoding 152x
64-bit:  Encoding 15.7x  Decoding 162x

This represents a 6% speedup in decoding and a 44% speedup for encoding.  It seems whatever assembly optimizations are in libFLAC are much more effective on the decoding side.  Again, this is for an AMD processor; results on Intel processors are likely to differ somewhat.  Also this was for gcc compiles; results using other compilers are likely to vary somewhat.

I'm pretty amazed by the encoding speedup.  I have seen a bunch of data suggesting an average 30% speedup by using 64-bit code.  To achieve a 44% speedup while losing some hand-optimized assembly seems incredible unless the code in question is doing a bunch of 64-bit integer arithmetic (which shouldn't be the case compressing 16-bit WAVs).

--John

64-bit FLAC

Reply #5
Quote
I'm pretty amazed by the encoding speedup.  I have seen a bunch of data suggesting an average 30% speedup by using 64-bit code.  To achieve a 44% speedup while losing some hand-optimized assembly seems incredible unless the code in question is doing a bunch of 64-bit integer arithmetic (which shouldn't be the case compressing 16-bit WAVs).

--John
[a href="index.php?act=findpost&pid=318934"][{POST_SNAPBACK}][/a]


Well despite that, the 64bit discussion got demolished a while back since there seems to be people who think that 64bit computing won't really take over the 32bit. However, this is one of the things which will always keep OSS solutions behind, that it's constantly 2 years behind. I'm happy to hear you got it to work under Linux and I'm not a bit surprised of the speed improvements....

Unfortunately though, my guess is that before we see 64bit FLAC on win, we'll see 64bit WMA, AAC and a whole bunch of others and FLAC+some others will lag behind with about 1-2 years, and once again we'll loose a whole bunch of users who'll aim for one of the early adopters.

Anyway, I'm sure this post will become flamed any second now due to my post

64-bit FLAC

Reply #6
The effort put into making a SSE2 compile generally gives a better speed boost (see the ogg sse2 compiles), note this boost will not also translate into a 64 bit compile, so:

SSE2 might give a 6x speed boost,
Then an additional 64 bit compile wouldn't give a 2x as it is highly optomized already.

64-bit FLAC

Reply #7
Quote
The effort put into making a SSE2 compile generally gives a better speed boost (see the ogg sse2 compiles), note this boost will not also translate into a 64 bit compile, so:

SSE2 might give a 6x speed boost,
Then an additional 64 bit compile wouldn't give a 2x as it is highly optomized already.
[a href="index.php?act=findpost&pid=318987"][{POST_SNAPBACK}][/a]

Yeah, doing a 32-bit compile targeted to the K8 (to get SSE2, cmov, etc.) was on my todo list.  I also wanted to compare a no-assembly build.  In theory, the assembly routines should be capturing some of the SSE2 advantage, but I've only taken a very cursory look at the FLAC sources to see what they're doing.

Quote
Well despite that, the 64bit discussion got demolished a while back since there seems to be people who think that 64bit computing won't really take over the 32bit. However, this is one of the things which will always keep OSS solutions behind, that it's constantly 2 years behind. I'm happy to hear you got it to work under Linux and I'm not a bit surprised of the speed improvements....

Unfortunately though, my guess is that before we see 64bit FLAC on win, we'll see 64bit WMA, AAC and a whole bunch of others and FLAC+some others will lag behind with about 1-2 years, and once again we'll loose a whole bunch of users who'll aim for one of the early adopters.

I don't think that's a valid criticism of OSS, given that AMD64 Linux was widely available long before Win64.  The fact that Josh seems to have no interest in producing AMD64 compiles himself doesn't prevent anyone else (e.g. the various 64-bit Linux distros) from doing so.  FLAC has always been good about portability, so it really shouldn't take much to get it to work on win64.  I have neither Win64 nor VC++ at my disposal, however, so it won't be coming from me.

Also, to be fair to Josh, I don't see anyone else publishing win64 binaries of their codecs at this point either.  Maybe a 64-bit WMA is shipping with Win64, I don't know.  It just hasn't been a priority for anyone yet.