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

Re: FLAC v1.4.0 (Release)

Reply #50
(do we still use CPUs prior to Core-i?)
Believe it or not, I've had people complaining that FLAC defaults to requiring SSE2, which was introduced in 2000. See here: https://sourceforge.net/p/flac/bugs/479/

I explained that FLAC can be configured such that a binary can be compiled supporting all CPUs back to the Intel 486, sacrificing performance on modern CPUs in the process. Apparently this wasn't enough because SSE-but-not-SSE2 processor would not get the best possible binary. In my view that means asking/demanding that I would write hand-optimized code for those CPUs.
Music: sounds arranged such that they construct feelings.

Re: FLAC v1.4.0 (Release)

Reply #51
I'm using FLAC 1.3.4 20190805 with -8pe and it is significantly faster than 1.4.0 with minimal increase in size:

1.3.4:
137.210.816 bytes @ 1:32 (average over 10 passes)

1.4.0 (GCC, the others I've tried are much slower):
137.203.644 byte @ 2:06 (average over 10 passes)


Re: FLAC v1.4.0 (Release)

Reply #52
<offtopic>What OS do you run on a year-2000-CPU?  ;D </offtopic>
You can't please everyone. But you guys spend so much time and effort in optimising flac's algorithm and have to waste maybe some 4% performance to support all sort of old CPUs that only few people use.
I can only speak for myself: I'd have zero problems to keep using v1.3.3 on my ancient CPU if the default binary for v1.4.x would require a decent, modern architecture if there was a performance gain worth mentioning. Or I'd spend some time and effort and try to setup the compiler toolchain and build my own binary.

Re: FLAC v1.4.0 (Release)

Reply #53
137.210.816 bytes @ 1:32 (average over 10 passes)
137 MB flac size in 92 seconds? What CPU did you use?
Sorry, didn't notice you encoded with -8ep... my bad.


Re: FLAC v1.4.0 (Release)

Reply #55
I'm using FLAC 1.3.4 20190805 with -8pe and it is significantly faster than 1.4.0 with minimal increase in size:
1.3.3 you mean?

This is a big "YMMV", -8pe took like one percent more time on 1.4.0 that 1.3.4 in my testing.

Not that one album is much to judge size gains that are this small, but for what it is worth: Can you post 1.3.3 at -8p times and size?


Edit:
<offtopic>What OS do you run on a year-2000-CPU?  ;D </offtopic>
Since I am discussing inferences from a single data point already ...
Right now at this computer, I am using a CPU launched ~nine years ago, on an OS launched ~thirteen years ago. What do you think, does the "four years older" rule make for a more or less reasonable result than upscaling the age of 22 by 13/9?

Re: FLAC v1.4.0 (Release)

Reply #56
1.3.3 you mean?

This is a big "YMMV", -8pe took like one percent more time on 1.4.0 that 1.3.4 in my testing.

Not that one album is much to judge size gains that are this small, but for what it is worth: Can you post 1.3.3 at -8p times and size?

You are correct, it actually is FLAC 1.3.4 20220220 (GCC) on W10 x64 with an Intel i7 9700

with -8p I get :

137.223.277 bytes @ 0:14:xxx
original size: 242.961.644 bytes ( Btw, this is track #6 from Genesis' Foxtrot CD)


For the whole album numbers are (again with -8ep):

293.203.041 bytes @ 1:31:378 (the album has 6 tracks and the CPU 8 cores so all tracks are encoded simultaneously)

same but using 1.4.0:

293.177.359 bytes @2:08:866


Re: FLAC v1.4.0 (Release)

Reply #57
@sundance - I compiled FLAC 1.4.0 the same way I created my previous fast 64-bit compile. Attached for your testing pleasure.

Re: FLAC v1.4.0 (Release)

Reply #58
@ Jackal666InHex:

With these figures, the small gains from going 1.3.4 at -8pe to 1.4.0 at -8pe, are still cheaper than the "e".
Which means: if you don't think the 1.4.0 slowdown is worth it at -8pe, then -8pe should have been avoided in the first place, as that slowdown measures up as worth even less.

(And even even less now, as 1.4.0 has dwindled the shavings of the "e".)

Here are the calculations:

1.3.4:
137.210.816 bytes @ 1:32 (average over 10 passes)

1.4.0 (GCC, the others I've tried are much slower):
137.203.644 byte @ 2:06 (average over 10 passes)
7172 bytes saved in 34 seconds, meaning that a second extra processing time saves:
211 bytes. Very little indeed.


Then compared to this:
with -8p I get :

137.223.277 bytes @ 0:14:xxx

Going 1.3.4 at -8p to -8pe gains 137.223.277 - 137.210.816 = 12416 bytes. Takes 78 extra seconds, meaning that a second extra processing time saves:
159 bytes. That is less than 211.


Re: FLAC v1.4.0 (Release)

Reply #59
@sundance - I compiled FLAC 1.4.0 the same way I created my previous fast 64-bit compile. Attached for your testing pleasure.
These are my test results:
Code: [Select]
flac140.exe -7 (64 bit):                     Global Time = 37.838
flac140-netranger-clang.exe -7 (64 bit):     Global Time = 37.178 *
flac140-netranger-gcc12-2.exe -7 (64 bit):   Global Time = 37.946
flac140-john-icl.exe -7 (64 bit):            Global Time = 37.713
flac140-Case.exe -7 (64 bit):                Global Time = 30.114  -> 19.0% faster than *
-> FLAC size: 1.167.093.760 Bytes

flac140.exe -8 (64 bit):                     Global Time = 54.999 #
flac140-netranger-clang.exe -8 (64 bit):     Global Time = 56.768
flac140-netranger-gcc12-2.exe -8 (64 bit):   Global Time = 55.100
flac140-john-icl.exe -8 (64 bit):            Global Time = 57.346
flac140_Case.exe -8 (64 bit):                Global Time = 46.420  -> 15.6% faster than #
-> FLAC size: 1.166.278.656 Bytes
Code: [Select]
flac133_case.exe -7 (64 bit): Global Time = 24.964
flac133_enzo.exe -7 (64 bit): Global Time = 24.961
FLAC size: 1.168.025.915 Bytes

flac133_case.exe -8 (64 bit): Global Time = 36.012
flac133_enzo.exe -8 (64 bit): Global Time = 35.994
FLAC size: 1.167.279.038 Bytes
My conclusion:
  • Case's optimised flac140 is (on my i7-7700) way faster than every other binary
  • flac133_case.exe -8 and flac140_case.exe -7 create very similar flac sizes (delta=159 ppm), but v1.4.0 is much faster by 19.6%
  • I can easily replace flac133_case -8 with flac140_case -7: "The King is dead, long live the King!"
  • There is no replacement for flac133 -7, since flac140 -6 is not a good setting
  • It's worth to have a optimised binary along with the "one-size-fits-all" standard build

Case, thank you very much for your build, you made my day.
Please don't get me wrong: This is not meant to start some sort of "flac builder bashing".
You guys provide us (the noobs that are not able to build their own binaries) with the lastest flac binaries. Thanks a lot for your ongoing efforts!
And I have to update my statement:
Quote
But you guys spend so much time and effort in optimising flac's algorithm and have to waste maybe some 4% 15-20% performance to support all sort of old CPUs that only few people use.
Would be very interesting if others (with other CPUs) also see some speed improvment.

Re: FLAC v1.4.0 (Release)

Reply #60
No science but using flac 1.40 as exe in CUETools gives ~90x speed with Netrangers GCC compile while Cases compile is at ~85x on a Ryzen 5900x for -8 -p
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: FLAC v1.4.0 (Release)

Reply #61
Brief speed test at default -5, all x64 compiles, will later run a round with both the 32-bit and 64 bit compiles and also at -7p.
Why -7p when it isn't optimal? "p" because that triggers brute force on something (i.e. some routine has to be run several times, is it there the savings are or isn't it?) and -7 because -7 is a good one. Besides, -8p is slow and this will run for long.

Anyway, at -5, on an 11th gen mobile i7, reading .wav from a bitlocker'd internal SSD and writing to same.

254: Case build <-- fastest, the number is seconds
301: Official build
389: John33 Rarewares x64-Intel-19.2 from Reply 34
401: NetRanger CLANG from Reply #15
418: NetRanger GCC freshly downloaded from the edited Reply #10

Are these differences suspiciously big? Just a single run each, will run more overnight.

Re: FLAC v1.4.0 (Release)

Reply #62
i3-12100, 59m30s 16/44 wave file on RAM drive @ -8p, all of them are 64-bit exe

51s john33 at Reply #34
41s Case at Reply #57
41s NetRanger at Reply #10
37s Xiph official

I repeated the tests several times and the results are consistent.


Re: FLAC v1.4.0 (Release)

Reply #63
I can confirm that on higher compression presets, the official build takes the lead:
Code: [Select]
flac140 -8p (64 bit):            Global Time = 153.346
flac140_Case.exe -8p (64 bit):   Global Time = 165.111

Re: FLAC v1.4.0 (Release)

Reply #64
i3-12100, 59m30s 16/44 wave file on RAM drive @ -8p, all of them are 64-bit exe

51s john33 at Reply #34
41s Case at Reply #57
41s NetRanger at Reply #10
37s Xiph official

I repeated the tests several times and the results are consistent.
Same as above, but a 2h13m30s 24/48 stereo file at -8 without p.
43s Case
44s Xiph
50s NetRanger
1m5s john33

Re: FLAC v1.4.0 (Release)

Reply #65
Oh, I did not pay attention that NetRanger's Reply #10 was a wrong file, here are the correct results at Reply #15

1m9s for the 24/48 file at -8

54s for the 16/44 file at -8p

Re: FLAC v1.4.0 (Release)

Reply #66
A brief question: Are these "equations" still valid in v1.4.0 ?
Code: [Select]
FLAC v1.3.3
  -0, --compression-level-0  =  -l 0  -b 1152 -r 3
  -1, --compression-level-1  =  -l 0  -b 1152 -M -r 3
  -2, --compression-level-2  =  -l 0  -b 1152 -m -r 3
  -3, --compression-level-3  =  -l 6  -b 4096 -r 4
  -4, --compression-level-4  =  -l 8  -b 4096 -M -r 4
  -5, --compression-level-5  =  -l 8  -b 4096 -m -r 5
  -6, --compression-level-6  =  -l 8  -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2)
  -7, --compression-level-7  =  -l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2)
  -8, --compression-level-8  =  -l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2) -A punchout_tukey(3)
(flac v1.4.0 produces different results with "-7" compared to "-l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2)")

Re: FLAC v1.4.0 (Release)

Reply #67
(flac v1.4.0 produces different results with "-7" compared to "-l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2)")

Tested and differents results despite synonyms in MAN page / GUI


Re: FLAC v1.4.0 (Release)

Reply #69
A brief question: Are these "equations" still valid in v1.4.0 ?
No, that is obsolete. But first, I notice you have a space before your question mark, so have a locale where the decimal point is a comma - we are more than the dot-users! - then your tukey(0.5) will be silently ignored.
Use scientific notation tukey(5e-1), it works in both locales.

On to it, and ktf might have to correct my misunderstandings for the Nth time:
1.4.0 introduces a "subdivide_tukey" which recycles calculations to cover more windowing functions for cheap.
If I have understood correctly, new -8 is a bit like throwing in an extra partial_tukey(3) at the end (except faster) - but they are not precisely the same, because in order to accommodate that recycling, tapering steepness had to be tweaked.

Expected if you in 1.4.0 compare
-8 -A tukey(5e-1) -A partial_tukey(2) -A punchout_tukey(3)
to
-8
to
-8 -A "tukey(5e-1);partial_tukey(2);partial_tukey(3);punchout_tukey(3)"
is that -8 should be "better than the midpoint between the former and the latter" by giving sizes about like the latter, but faster.

Does that hold up?

 

Re: FLAC v1.4.0 (Release)

Reply #71
Sorry, I did not read every post carefully. I read the thread and downloaded the file on Reply #10 today, so it is the "correct" one.



Re: FLAC v1.4.0 (Release)

Reply #74
Here my quick and dirty performance test of different flavors of FLAC 1.4.0 (Win64) on my Win10, i7-1185G7 Laptop.
Using 2L-086_stereo-DXD_15.flac @ 352,8kHz / 24bit FLAC, recompressing FLAC-2-FLAC at -8

Long story short:

Case's compile: ~ 13,1 s
Xiph compile: ~ 13,9 s
GCC compile: ~ 16,0 s
Rarewares Intel 19 compile: ~ 23,8 s
NetRanger's recent CLANG15: ~ 26,8 s

Code: [Select]
PS C:\TEMP\FLAC14> Measure-Command { .\flac140case.exe -8 2L-086_stereo-DXD_15.flac -f -o 2L-086_stereo-DXD_154.flac.140case.flac | Out-Default }

flac 1.4.0
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-086_stereo-DXD_15.flac: wrote 437376780 bytes, ratio=0,976


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 181
Ticks             : 131815177
TotalDays         : 0,000152563862268519
TotalHours        : 0,00366153269444444
TotalMinutes      : 0,219691961666667
TotalSeconds      : 13,1815177
TotalMilliseconds : 13181,5177



PS C:\TEMP\FLAC14> Measure-Command { .\flac140xiph.exe -8 2L-086_stereo-DXD_15.flac -f -o 2L-086_stereo-DXD_154.flac.140xiph.flac | Out-Default }

flac 1.4.0
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-086_stereo-DXD_15.flac: wrote 437376780 bytes, ratio=0,976


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 944
Ticks             : 139447664
TotalDays         : 0,000161397759259259
TotalHours        : 0,00387354622222222
TotalMinutes      : 0,232412773333333
TotalSeconds      : 13,9447664
TotalMilliseconds : 13944,7664



PS C:\TEMP\FLAC14> Measure-Command { .\flac140clang.exe -8 2L-086_stereo-DXD_15.flac -f -o 2L-086_stereo-DXD_154.flac.140clang.flac | Out-Default }

flac 1.4.0
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-086_stereo-DXD_15.flac: wrote 437376784 bytes, ratio=0,976


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 26
Milliseconds      : 865
Ticks             : 268651043
TotalDays         : 0,000310938707175926
TotalHours        : 0,00746252897222222
TotalMinutes      : 0,447751738333333
TotalSeconds      : 26,8651043
TotalMilliseconds : 26865,1043



PS C:\TEMP\FLAC14> Measure-Command { .\flac140gcc.exe -8 2L-086_stereo-DXD_15.flac -f -o 2L-086_stereo-DXD_154.flac.140gcc.flac | Out-Default }

flac 1.4.0
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-086_stereo-DXD_15.flac: wrote 437376780 bytes, ratio=0,976


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 16
Milliseconds      : 29
Ticks             : 160290049
TotalDays         : 0,000185520890046296
TotalHours        : 0,00445250136111111
TotalMinutes      : 0,267150081666667
TotalSeconds      : 16,0290049
TotalMilliseconds : 16029,0049



PS C:\TEMP\FLAC14> Measure-Command { .\flac140rarewares.exe -8 2L-086_stereo-DXD_15.flac -f -o 2L-086_stereo-DXD_154.flac.140rarewares.flac | Out-Default }

flac 1.4.0
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-086_stereo-DXD_15.flac: wrote 437376782 bytes, ratio=0,976


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 23
Milliseconds      : 880
Ticks             : 238807805
TotalDays         : 0,000276397922453704
TotalHours        : 0,00663355013888889
TotalMinutes      : 0,398013008333333
TotalSeconds      : 23,8807805
TotalMilliseconds : 23880,7805



PS C:\TEMP\FLAC14>
.halverhahn