xiph / flac

Free Lossless Audio Codec
https://xiph.org/flac/
GNU Free Documentation License v1.3
1.58k stars 278 forks source link

Different loose mid side algorithm compatible with multithreading #675

Closed ktmf01 closed 4 months ago

ktmf01 commented 4 months ago

The current loose mid-side algorithm is not compatible with multithreading, because frames depend on the channel ordering of the last frame.

To solve this, a different loose mid-side algorithm is introduced.

very large set of tracks.pdf

From top left to bottom right presets 0, 1, 2, 3 and 4. There is quite a bit of variability in the results (flac-1.4.3.exe should have had the same results as flac-multithreading-v6.exe, and results for presets 0, 2 and 3 should have been the same for all three), but it seems as if the new algorithm is faster for preset 4 and slower for preset 1. This has probably to do with block size. Compression seems pretty much the same.