<div dir="ltr">Is this a case where something allowed by the specification isn't implemented by the reference encoder/decoder (such as 25-32 bits per sample) but could be in a different implementation? If so, I am not sure whether it makes sense to change the specification based on the reference implementation.<div><br></div><div>Stephen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 17, 2020 at 3:22 PM Martijn van Beurden <<a href="mailto:mvanb1@gmail.com">mvanb1@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>When trying to better understand the way LPC exactly works, I stumbled upon something which, after some digging, was already reported and (partly) fixed: <a href="https://sourceforge.net/p/flac/bugs/424/" target="_blank">https://sourceforge.net/p/flac/bugs/424/</a></div><div><br></div><div>Apparently, the FLAC specification has a LPC shift that can be both positive and negative, but the encoder specifically makes sure that only positive shifts are encoded and the decoder only accepts positive shifts. The ffmpeg FLAC encoder and decoder show the same behaviour.</div><div><br></div><div>Now, the documentation in the source code is fixed, the documentation on the website (which I was looking at) isn't yet. The website format.html states: "Quantized linear predictor coefficient shift needed in bits (NOTE: this number is signed two's-complement)." The source code format.html says "Quantized linear predictor coefficient shift needed in bits (NOTE: this number is signed two's-complement;
but, due to implementation details, must be non-negative)."</div><div><br></div><div>I was thinking of submitting a patch to the FLAC website git to get the website format.html up-to-date (there have been more changes than just this one), but I feel the line above isn't clear enough. Maybe change it to something like this, to make the wording more similar to the rest of the specification<br></div><div><br></div><div>Quantized linear predictor coefficient shift needed in bits (NOTE: these bits must be 00000-01111. Originally this was a signed integer, but negative shifts were never implemented). <br></div><div><br></div><div>Or perhaps:</div><div><div><br></div><div>Quantized linear predictor coefficient shift needed in bits (NOTE: First bit must be zero. Originally this was a signed integer, but negative shifts were never implemented). <br></div><div><br></div><div>Any thoughts?</div><div><br></div><div>Kind regards, Martijn van Beurden<br></div></div></div>
_______________________________________________<br>
flac-dev mailing list<br>
<a href="mailto:flac-dev@xiph.org" target="_blank">flac-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
</blockquote></div>