I've followed this with some interest. Firstly, assuming FLAC is working properly, there is absolutely no loss of data, and a round trip of the form:
File1 -> FLAC compression -> FLAC decompression -> File2
should show that the data in File1 is EXACTLY equal to File2.
If this is not the case, then there is a problem with the compression or decompression process.
There is nothing approximate about lossless compression/decompression.
It is the case that some lossless methods may make use of a lossy component, which in the case of audio could be mp3 or aac. Essentially they do something roughly equivalent to a round trip compression/decompression cycle, and then subtract the result from the input to give a residual. The residual is then compressed and then stored and/or transmitted.
Various techniques are used for the digital encoding, such as run length encoding and Huffman encoding, both of which are not lossy.
It is claimed that FLAC files sound different from, for example, WAVs. This could be due to problems in implementation in either FLAC or WAV playback.
If the claim is that FLAC files sound worse than equivalent WAV, then clearly WAV is being used as the reference, and preferred. It does not automatically follow that a difference in perceived sound implies one is better than the other. Let's assume for the moment that FLAC does sound inferior.
With either format, the data is converted ultimately to a data stream which is fed into a DAC. If both FLAC and WAV based systems are working properly, the data stream to the DAC should be identical.
Ways in which they may then sound different should then only be due to timing issues, or possibly corruption in the data. Corruption is unlikely under normal circumstances. If the data is buffered sufficiently just before the DAC, there should be no difference. Note though that if there is any data corruption in compressed format data, that the audible effects could be worse (though not necessarily so) compared with similar corruption in other formats, because it is possible that data corruption in compressed data could lead to error propagation effects. This kind of situation can arise in video encoding/decoding in, for example, MPEG, where if the I frames are corrupted, the errors will propagate through frames up to the next I frame.
It does not follow that such corruption in compressed audio streams will always lead to significantly worse sounding output, as it's possible that the corruption is in part of the signal which has little perceptual effect. In both audio and video encoding and transmission, it is now common to protect parts of the encoded data which are more likely to have a damaging effect if they are corrupted to a higher degree of protection than other components.





Originally Posted by StanleyB

Reply With Quote