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: FLAC v1.4.1 (Release) (Read 19020 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: FLAC v1.4.1 (Release)

Reply #1
Intel 19.2 compiles at Rarewares. ;)

Re: FLAC v1.4.1 (Release)

Reply #2
Answers to anticipated questions:

Q. Why is this release so quickly after 1.4.0?
A. There was a problem with the release tarball, the man pages were empty files and api docs were missing. Nothing end-users should worry about, but a pain for package maintainers. I've also fixed some other (build) problems with the 1.4.0 release, mostly reported by developers upgrading FLAC in their products

Q. What has changed for users of the flac command line tool?
A. Pretty much nothing. I've made the files in the Windows release a little smaller and fixed the help text, which did not show the correct apodizations for the compression levels. No difference in compression is expected. Binary might be an unmeasurable tiny amount faster because the binary is slightly smaller.

Q. Can we expect this release pace to continue?
A. I surely hope not.
Music: sounds arranged such that they construct feelings.


Re: FLAC v1.4.1 (Release)

Reply #4
Please don't spam this thread with speed and compression tests etc. This flac release doesn't have any such improvment's.

Re: FLAC v1.4.1 (Release)

Reply #5
But it is just a continuation of the 1.4.0 thread with comparisons like changing the block size and such, after I posted my last test on the 1.4.0 thread someone posted a notification that 1.4.1 is released, then future tests should be posted in this thread, right? Even with the CUETools.Flake issue I have opened a separate thread.

Re: FLAC v1.4.1 (Release)

Reply #6
Personally so don't i see the need at all for the speed and compression tests, comparisons between this and that. If the codec does what it's meant to do so is that enough for me.

I think if some wants to do that, so should it be posted in separate threads. It's good if a thread like this could be used for information, issues and such. With all the extras posted so can things be missed and lost in there. But that's just my way to seeing it.

Re: FLAC v1.4.1 (Release)

Reply #7
So looks like this thread is more suitable for false positive virus complains, compatibility with Windows XP, missing dll and such. People should post comparisons in another thread.

Re: FLAC v1.4.1 (Release)

Reply #8
I agree with @NetRanger that there is no use to split the performance tests over several threads. Had one anticipated 1.4.1, one could have organized it in a "1.4.x performance tests" thread. Not sure if that is feasible now.

So looks like this thread is more suitable for false positive virus complains, compatibility with Windows XP, missing dll and such. People should post comparisons in another thread.

Agree. Of course, the topic of false positive malware reports is found above every "Post reply", at least in my forum setup.

Re: FLAC v1.4.1 (Release)

Reply #9
A moderator could split the performance test posts from the 1.4.0 thread into a new 1.4.x thread.


Re: FLAC v1.4.1 (Release)

Reply #11
Thanks a lot, Case. Will run my tests as soon as I'm back at my computer...

Re: FLAC v1.4.1 (Release)

Reply #12
Build for @sundance.
How are you building this, specifically? I was wondering, because it might be possible to get an even better optimized binary. Currently, plain C code is overriden by machine-specific code (SSE and AVX optimizations) but not for every function a optimized one is available. So it might be that for one CPU-intensive task a SSE function is used when no AVX one is available, even while optimizing for AVX. I don't think compilers can optimize SSE intrinsics to AVX ones, except for changing the prefix on instructions that have a direct replacement.
Music: sounds arranged such that they construct feelings.

Re: FLAC v1.4.1 (Release)

Reply #13
Thanks for asking, it made me look up the old forum threads and I noticed I hadn't updated my documentation to the correct strings.

The original switches came from this thread: Speeding up codecs with faster CRC calculations.
I was supposed to use the following compile flags:
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-m64 -static -L/usr/local/lib"
export CFLAGS="-O3 -m64 -march=haswell -funroll-loops -fno-stack-protector"

But because I had forgotten to update my documentation I used these instead:
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-m64 -static -L/usr/local/lib"
export CFLAGS="-O3 -m64 -march=nehalem -funroll-loops"

And I configure FLAC with this command:
./configure --host=x86_64-w64-mingw32 --disable-stack-smash-protection --enable-sse --enable-64-bit-words --enable-static --disable-shared

With FLAC 1.3.x series using older GCC 4.9.3 produced faster binary. This time it was slower so I use my other MSYS environment that has GCC 7.3.0. With 1.3 each update to GCC made the binary slower, but now I haven't had time to do further testing.

Here's a new compile with the Haswell arch setting.

Re: FLAC v1.4.1 (Release)

Reply #14
I thought I would run a simple test using a single wave file of 1:18:51.013 (208 637 688 samples), 834,550,796 bytes, 44.1k, 16bits.

FIrst pass is using the standard 64 bit compile on Rarewares and the second is using an 'AVX2' enabled compile, both written to the same physical SSD drive.
Code: [Select]
Converting: "F:\Testdir\BLove.wav"
Destination: "F:\[unnamed]\[unnamed]\- BLove.flac"
CLI encoder: flac.exe
Destination file: F:\[unnamed]\[unnamed]\- BLove.flac
Encoder stream format: 44100Hz / 2ch / 16bps
Command line: "C:\Program Files (x86)\foobar2000\encoders\flac.exe" -s --ignore-chunk-sizes -7 - -o "temp-4CDF95EB111ABB419B7B2E665CF02BDD.flac"
Working folder: F:\[unnamed]\[unnamed]\
Encoder process still running, waiting...
Encoder process terminated cleanly.
Track converted successfully.
Total encoding time: 0:28.140, 168.12x realtime

Converting: "F:\Testdir\BLove.wav"
Destination: "F:\[unnamed]\[unnamed]\- BLove.flac"
CLI encoder: flac.exe
Destination file: F:\[unnamed]\[unnamed]\- BLove.flac
Encoder stream format: 44100Hz / 2ch / 16bps
Command line: "C:\Program Files (x86)\foobar2000\encoders\flac.exe" -s --ignore-chunk-sizes -7 - -o "temp-698D0D3FBED8A347829C6247F55987F4.flac"
Working folder: F:\[unnamed]\[unnamed]\
Encoder process still running, waiting...
Encoder process terminated cleanly.
Track converted successfully.
Total encoding time: 0:23.828, 198.54x realtime
The compile can be downloaded from here:
www.rarewares.org/files/lossless/flac-1.4.1-x64-AVX2.zip

This was run on a 8500T CPU, Windows 10 Pro x64.

Re: FLAC v1.4.1 (Release)

Reply #15
Here's another 1.4.1 compile with newer GCC (12.2.0). Over here it's faster than Xiph build even with -p.

Re: FLAC v1.4.1 (Release)

Reply #16
Here's another 1.4.1 compile with newer GCC (12.2.0). Over here it's faster than Xiph build even with -p.
You use gcc with tunings 'haswell'. Can you please build one with tunings 'zenv3' if you find some time?
I really wonder what the tunings do these days on my Ryzen.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

 

Re: FLAC v1.4.1 (Release)

Reply #17
You use gcc with tunings 'haswell'. Can you please build one with tunings 'zenv3' if you find some time?
I really wonder what the tunings do these days on my Ryzen.
Here's a fresh compile with 'znver3' tuning.

Re: FLAC v1.4.1 (Release)

Reply #18
Many thanks Case!
Your Haswell optimized compile is slightly faster even as the Zen optimized one for -8 -p on my Ryzen 5900x.
~102x vs. ~99x
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: FLAC v1.4.1 (Release)

Reply #19
You use gcc with tunings 'haswell'. Can you please build one with tunings 'zenv3' if you find some time?
I really wonder what the tunings do these days on my Ryzen.
Here's a fresh compile with 'znver3' tuning.

Thank you for this! I’m not sure I truly understand the technical details behind it but if I have the gist of it correct, this build would be somehow optimized for Zen 3 CPUs eg. 5950X?

Re: FLAC v1.4.1 (Release)

Reply #20
Thank you for this! I’m not sure I truly understand the technical details behind it but if I have the gist of it correct, this build would be somehow optimized for Zen 3 CPUs eg. 5950X?

A program like FLAC is simply a set of instructions that a CPU should follow. One can imagine that like food where one can take several ways to cook the same dish, there are a lot of ways CPUs can be instructed to do the same thing.

FLAC is written in C, a programming language. To obtain a program, one uses a compiler, which translates code into a program. The compiler has some liberties in this translation that do not affect the result, but do affect the speed of execution.

Now, a new CPU like the Zen 3 CPUs has a lot more instructions than an old CPU like the first Intel Pentium processor (which came out in 1993). The basis is the same, but a new CPU has additions that are mentioned quite often in this context, like SSE and AVX. A compiler can be instructed to generate a binary that runs on old CPUs too, but then it can't use new instructions that old CPU doesn't have. When compiling specifically for a certain CPU, the compiler can choose from all possible instructions, some of which may be much faster than using common ones the old CPU has too.

Furthermore, some instructions are fast and some are slow. How fast and how slow, that differs per CPU. If a compiler can choose two ways to translate some bit of code, by default it chooses a compromise: something that isn't too slow on all targeted CPUs. However, when tuned for a specific CPU, the compiler knows which instructions to avoid (because they are slow on that specific CPU) and can create a faster program.

These two things can be combined. You can make a binary that runs on all CPUs (including the old Pentium) but is tuned specifically for a certain CPU. Then the compiler doesn't use new instructions, but only takes the certain CPU into account when choosing between possibilities offered by those instructions. One can also instruct the compiler to use the instructions offered by a certain CPU, but not tune for that CPU specifically (so, use instructions offered by Intel CPU x, but keep AMD CPUs with the same capabilities in mind when making decisions). One can also do both: use instructions of and tune for a certain CPU.
Music: sounds arranged such that they construct feelings.

Re: FLAC v1.4.1 (Release)

Reply #21
Thank you for this! I’m not sure I truly understand the technical details behind it but if I have the gist of it correct, this build would be somehow optimized for Zen 3 CPUs eg. 5950X?

A program like FLAC is simply a set of instructions that a CPU should follow. One can imagine that like food where one can take several ways to cook the same dish, there are a lot of ways CPUs can be instructed to do the same thing.

FLAC is written in C, a programming language. To obtain a program, one uses a compiler, which translates code into a program. The compiler has some liberties in this translation that do not affect the result, but do affect the speed of execution.

Now, a new CPU like the Zen 3 CPUs has a lot more instructions than an old CPU like the first Intel Pentium processor (which came out in 1993). The basis is the same, but a new CPU has additions that are mentioned quite often in this context, like SSE and AVX. A compiler can be instructed to generate a binary that runs on old CPUs too, but then it can't use new instructions that old CPU doesn't have. When compiling specifically for a certain CPU, the compiler can choose from all possible instructions, some of which may be much faster than using common ones the old CPU has too.

Furthermore, some instructions are fast and some are slow. How fast and how slow, that differs per CPU. If a compiler can choose two ways to translate some bit of code, by default it chooses a compromise: something that isn't too slow on all targeted CPUs. However, when tuned for a specific CPU, the compiler knows which instructions to avoid (because they are slow on that specific CPU) and can create a faster program.

These two things can be combined. You can make a binary that runs on all CPUs (including the old Pentium) but is tuned specifically for a certain CPU. Then the compiler doesn't use new instructions, but only takes the certain CPU into account when choosing between possibilities offered by those instructions. One can also instruct the compiler to use the instructions offered by a certain CPU, but not tune for that CPU specifically (so, use instructions offered by Intel CPU x, but keep AMD CPUs with the same capabilities in mind when making decisions). One can also do both: use instructions of and tune for a certain CPU.

Awesome; thank you so much for the explanation. I’m interested in trying out the Zen 3 build, I will probably download it and point EAC/F2K to that build for my compression presets.

Re: FLAC v1.4.1 (Release)

Reply #22
I thought it was about time I explored a compiler other than Intel as that no longer seems to have any speed advantages. Here is a first stab at a GCC 12.2.0 'Haswell' optimsed build. It's faster than the Intel compiles and I'd be interested to see how it compares with others.

www.rarewares.org/files/lossless/flac-1.4.1-x64-AVX2%20-GCC1220.zip

Comments in the 'speed' thread, I guess. ;)


Re: FLAC v1.4.1 (Release)

Reply #24
Could some one please compile FLAC v1.4.1 for zen2 CPUs?