<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>Drew</div><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">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>