<div dir="ltr">Apologies! That patch will not work correctly with Opus 1.2. Will send an updated patch shortly!!</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Mar 26, 2018 at 11:56 AM Drew Allen <<a href="mailto:bitllama@google.com">bitllama@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all!<div><br></div><div>I've attached an updated patch for opusfile, based on formatting suggestions I got for the opus and libopusenc patches.</div><div><br></div><div>Cheers!</div></div><div dir="ltr"><div>Drew</div></div><div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 22, 2018 at 9:19 AM Drew Allen <<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks! 2 down, 2 to go. :D :D :D</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 21, 2018 at 11:19 PM Jean-Marc Valin <<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, the libopus and the libopusenc patches are now merged.<br>
<br>
Cheers,<br>
<br>
    Jean-Marc<br>
<br>
On 03/20/2018 12:36 PM, Drew Allen wrote:<br>
> Attached is an updated patch based on Jean-Marc and Mark's comments. :)<br>
><br>
> Cheers,<br>
> Drew<br>
><br>
> On Tue, Mar 20, 2018 at 9:20 AM Jean-Marc Valin <<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a><br>
> <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>>> wrote:<br>
><br>
>Â Â Â On 03/20/2018 11:51 AM, Drew Allen wrote:<br>
>Â Â Â > Just to confirm, I would use opeint_* for all the<br>
>Â Â Â > OpusGenericEncoder-related functions?<br>
><br>
>Â Â Â Correct. Or you can also use oge_ if you like. Just don't use something<br>
>Â Â Â that starts with an underscore.<br>
><br>
><br>
>Â Â Â > On Tue, Mar 20, 2018 at 8:38 AM Jean-Marc Valin<br>
>Â Â Â <<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a> <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>><br>
>Â Â Â > <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a> <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>>>> wrote:<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â Hi Mark, Drew,<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â On 03/20/2018 02:40 AM, Mark Harris wrote:<br>
>Â Â Â >Â Â Â > + int _oge_use_projection(int channel_mapping);<br>
>Â Â Â >Â Â Â ><br>
>Â Â Â >Â Â Â > These functions are part of libopusenc, so I'd expect them<br>
>Â Â Â to have an<br>
>Â Â Â >Â Â Â > ope prefix like the other functions in the libopusenc library.<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â I'd like to avoid using the ope_ prefix for functions that's<br>
>Â Â Â aren't in<br>
>Â Â Â >Â Â Â the public API. Right now there are other functions with a leading<br>
>Â Â Â >Â Â Â underscore, so we'll have to fix them as well (not in this<br>
>Â Â Â patch of<br>
>Â Â Â >Â Â Â course). Maybe an "opeint_" prefix would do the job here<br>
>Â Â Â (unless anyone<br>
>Â Â Â >Â Â Â has a better idea)?<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â > +int ope_encoder_deferred_init_with_mapping(OggOpusEnc *enc, int<br>
>Â Â Â >Â Â Â > family, int streams,<br>
>Â Â Â >Â Â Â >Â Â Â int coupled_streams, const unsigned char *mapping) {<br>
>Â Â Â >Â Â Â >Â Â int ret;<br>
>Â Â Â >Â Â Â >Â Â int i;<br>
>Â Â Â >Â Â Â ><br>
>Â Â Â >Â Â Â > This code is allowing family 253 for a deferred init, but<br>
>Â Â Â does not<br>
>Â Â Â >Â Â Â > create a projection encoder in that case, so it looks like<br>
>Â Â Â it will<br>
>Â Â Â >Â Â Â > fail when writing the id header since it won't be able to<br>
>Â Â Â get the<br>
>   >   > demixing matrix. It should probably not be allowing family<br>
>Â Â Â 253 here.<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â Actually, in the case of<br>
>Â Â Â ope_encoder_deferred_init_with_mapping(), I<br>
>Â Â Â >Â Â Â think it's probably best to just keep the existing code (not use<br>
>Â Â Â >Â Â Â wrappers), since that function cannot be used by the<br>
>Â Â Â projection encoder<br>
>Â Â Â >Â Â Â at all.<br>
>Â Â Â ><br>
>Â Â Â >Â Â Â Â Â Â Â Jean-Marc<br>
>Â Â Â ><br>
>Â Â Â ><br>
>Â Â Â >Â Â Â >Â - Mark<br>
>Â Â Â >Â Â Â ><br>
>Â Â Â >Â Â Â ><br>
>Â Â Â >Â Â Â > On Mon, Mar 19, 2018 at 3:00 PM, Drew Allen<br>
>Â Â Â <<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>><br>
>Â Â Â >Â Â Â <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>>>> wrote:<br>
>Â Â Â >Â Â Â >> Hi Jean-Marc,<br>
>Â Â Â >Â Â Â >><br>
>Â Â Â >Â Â Â >> I've modified my patches for libopus and libopusenc based<br>
>Â Â Â on your<br>
>Â Â Â >Â Â Â >> suggestions.<br>
>Â Â Â >Â Â Â >><br>
>Â Â Â >Â Â Â >> Cheers,<br>
>Â Â Â >Â Â Â >> Drew<br>
>Â Â Â >Â Â Â >><br>
>Â Â Â >Â Â Â >> On Mon, Mar 19, 2018 at 2:05 PM Jean-Marc Valin<br>
>Â Â Â >Â Â Â <<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a> <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>><br>
>Â Â Â <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a> <mailto:<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>>>> wrote:<br>
>Â Â Â >Â Â Â >>><br>
>Â Â Â >Â Â Â >>> Hi Drew,<br>
>Â Â Â >Â Â Â >>><br>
>Â Â Â >Â Â Â >>> I think the libopusenc patch is better, but there's still<br>
>Â Â Â a few<br>
>Â Â Â >Â Â Â issues<br>
>Â Â Â >Â Â Â >>> left:<br>
>Â Â Â >Â Â Â >>> 1) The static MAX_PACKET_BUFFER_SIZE value is still<br>
>Â Â Â problematic<br>
>Â Â Â >Â Â Â because<br>
>Â Â Â >Â Â Â >>> if you link libopusenc with a new version of libopus that<br>
>Â Â Â supports<br>
>Â Â Â >Â Â Â >>> higher order projection or just more projection channels for<br>
>Â Â Â >Â Â Â order 3,<br>
>Â Â Â >Â Â Â >>> then you will overflow the buffer. I think what you'd want<br>
>Â Â Â is a<br>
>Â Â Â >Â Â Â >>> _ope_opus_header_get_size() call that would return how<br>
>Â Â Â large the<br>
>Â Â Â >Â Â Â header<br>
>Â Â Â >Â Â Â >>> *actually* is. Then you can use that value instead of<br>
>Â Â Â >Â Â Â >>> MAX_PACKET_BUFFER_SIZE in init_stream()<br>
>Â Â Â >Â Â Â >>> 2) I think the remaining if()s in ope_encoder_ctl() can<br>
>Â Â Â also be<br>
>Â Â Â >Â Â Â removed<br>
>Â Â Â >Â Â Â >>> by adding another ctl() macro (like _oge_ctl()) with an extra<br>
>Â Â Â >Â Â Â argument.<br>
>Â Â Â >Â Â Â >>> In the case of OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST,<br>
>Â Â Â you can<br>
>Â Â Â >Â Â Â >>> simply use _oge_ctl(enc->st,<br>
>Â Â Â >Â Â Â >>> OPUS_MULTISTREAM_GET_ENCODER_STATE(stream_id, value))<br>
>Â Â Â >Â Â Â >>> 3) On libopus itself, why "#define<br>
>Â Â Â OPUS_HAVE_OPUS_PROJECTION_H 9000"<br>
>Â Â Â >Â Â Â >>> instead of just "#define OPUS_HAVE_OPUS_PROJECTION_H"?<br>
>Â Â Â >Â Â Â >>><br>
>Â Â Â >Â Â Â >>> Cheers,<br>
>Â Â Â >Â Â Â >>><br>
>Â Â Â >Â Â Â >>>Â Â Â Â Â Jean-Marc<br>
>Â Â Â >Â Â Â >>><br>
>Â Â Â >Â Â Â >>> On 03/19/2018 02:53 PM, Drew Allen wrote:<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>> On Mon, Mar 19, 2018 at 11:52 AM Drew Allen<br>
>Â Â Â >Â Â Â <<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>><br>
>Â Â Â <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>>><br>
>Â Â Â >Â Â Â >>>> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>><br>
>Â Â Â <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a> <mailto:<a href="mailto:bitllama@google.com" target="_blank">bitllama@google.com</a>>>>> wrote:<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Hello all,<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Sorry for the delay (got really sick last week).<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Attached are updated patches for libopus, libopusenc,<br>
>Â Â Â >Â Â Â opusfile and<br>
>Â Â Â >Â Â Â >>>>Â Â Â opus-tools.<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Note that the patches for libopusenc, opusfile and<br>
>Â Â Â >Â Â Â opus-tools are<br>
>Â Â Â >Â Â Â >>>>Â Â Â dependent on the patch for libopus.<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Please let me know if you have any additional followup<br>
>Â Â Â >Â Â Â comments or<br>
>Â Â Â >Â Â Â >>>>Â Â Â questions.<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>>Â Â Â Cheers,<br>
>Â Â Â >Â Â Â >>>>Â Â Â Drew<br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >>>> _______________________________________________<br>
>Â Â Â >Â Â Â >>>> opus mailing list<br>
>Â Â Â >Â Â Â >>>> <a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a> <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>><br>
>Â Â Â <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a> <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>>><br>
>Â Â Â >Â Â Â >>>> <a href="http://lists.xiph.org/mailman/listinfo/opus" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
>Â Â Â >Â Â Â >>>><br>
>Â Â Â >Â Â Â >><br>
>Â Â Â >Â Â Â >><br>
>Â Â Â >Â Â Â >> _______________________________________________<br>
>Â Â Â >Â Â Â >> opus mailing list<br>
>Â Â Â >Â Â Â >> <a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a> <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>> <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br>
>Â Â Â <mailto:<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>>><br>
>Â Â Â >Â Â Â >> <a href="http://lists.xiph.org/mailman/listinfo/opus" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
>Â Â Â >Â Â Â >><br>
>Â Â Â ><br>
><br>
</blockquote></div></blockquote></div></div></div></blockquote></div>