<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
&nbsp; I am writing an implementation of a FLAC decoder and I am polishing
up some details. The&nbsp;<a href="http://flac.sourceforge.net/format.html">format</a>
page leaves some room for interpretation. Can anyone help me by
clarifying the official rules about the following? Most of them are
degenerate cases that probably don't happen in practice:<br>
<br>
Thanks,<br>
--Jonathan<br>
<br>
Can the bits per sample change from frame to frame? If so, does this
mean that the output sizes should be scaled to all be the bit width? Or
sign extended?<br>
<br>
Can constant or verbatim subframes have left/side, right/side, or
mid/side channel assignment? If so, does the difference channel have an
extra bit per sample?<br>
<br>
Is it a fatal error if the minimum frame size is larger than the
maximum frame size (in STREAMINFO)? What about the minimum number of
samples being larger than the maximum number of samples?<br>
<br>
If the residue bit width is given by an escape code, can this escape
code be zero? What is the effect of reading "zero" bits? (assuming that
the stream is not advanced and 0 is the value read)<br>
<br>
The MD5 is calculated on the "unencoded data", but this leaves a lot of
room for interpretation. Does this mean the data produced by the
decoder, or the data that was passed to the encoded when the file was
made? If it means on produced data, are the channels interleaved?
Stored as big or little endian? If it means the original data, how can
we be sure of the format of that data?<br>
<br>
How do I handle negative QLPC shifts, officially? Treat them as
positive left shifts? Or treat them as an error condition? Or treat
them as a right shift with the shift index taken modulo 32 (as
apparently happened with earlier versions of the reference code)?<br>
<br>
If I read a signed value that is one bit, what is "1" equal to?<br>
<br>
If a sample rate of zero is specified, is this a fatal error? Or should
it be ignored?<br>
</body>
</html>