Martijn,

Currently FLAC already stores and restores most kinds of metadata
corruption without problems, so in most cases the conversion is
already bit-accurate. However, there are some kinds of corruption it
cannot handle. These are the kinds of corruption that invalidate your
considerations. For example, when a chunk length is incorrect, the
location and length of the audio data is no longer known. It is also
possible the basic formatting information is invalid. In this case,
FLAC cannot compress the audio at all, not even without considering
foreign metadata, while general purpose compressors (who don't have to
discriminate between audio and metadata) have no problem compressing.

OK.

That's why I said

"as long as the audio data is consistent, with known format and
correctly located."

However, I think there are relatively few uncompressed formats, and
probably all of them share having large audio blocks. It would be
feasible to think of an algorithm that attempts to find audio alignment
by iteratively testing a short portion for different alignments (meaning
different number of channels and bit depths, little/big endianness, and
a few other variants or combinations of PCM) until the maximum
compression is attained. Once located the optimum alignment, the FLAC
algorithm would provide bit-for-bit accuracy and maximum compression,
even in the absence of format-awareness. It would take a bit more time
to encode and could generate its internal header for direct playback
compatibility.

Regards,

Federico Miyara



--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to