[opus] [PATCH] Support for Channel Mapping 253.

Drew Allen bitllama at google.com
Thu Oct 12 21:44:27 UTC 2017


thanks for all your feedback. here's the revised patch:

On Wed, Oct 11, 2017 at 2:20 PM Timothy B. Terriberry <tterribe at xiph.org>
wrote:

> Jean-Marc Valin wrote:
> > I think you'll want something like:
> > (opus_int16)((unsigned)demixing_matrix[2*i+1] << 8)
> > (though you might want to check it too)
>
> FWIW, we use the construct
>    int s = buf[2*i + 1] << 8 | buf[2*i];
>    s = ((s & 0xFFFF) ^ 0x8000) - 0x8000;
>
> to manually sign-extend the result in opus_compare (and also opus_demo).
> If you ultimately cast s to (opus_int16), then I'm pretty sure most
> compilers will turn the second line into a no-op and optimize it away.
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20171012/3185d218/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-for-Channel-Mapping-253.patch
Type: text/x-patch
Size: 87427 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20171012/3185d218/attachment-0001.bin>


More information about the opus mailing list