<div dir="ltr">Hi Jean-Marc,<div><br></div><div>I've modified my patches for libopus and libopusenc based on your suggestions.</div><div><br></div><div>Cheers,</div><div>Drew</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Mar 19, 2018 at 2:05 PM Jean-Marc Valin <<a href="mailto:jmvalin@jmvalin.ca">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">Hi Drew,<br>
<br>
I think the libopusenc patch is better, but there's still a few issues left:<br>
1) The static MAX_PACKET_BUFFER_SIZE value is still problematic because<br>
if you link libopusenc with a new version of libopus that supports<br>
higher order projection or just more projection channels for order 3,<br>
then you will overflow the buffer. I think what you'd want is a<br>
_ope_opus_header_get_size() call that would return how large the 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 also be removed<br>
by adding another ctl() macro (like _oge_ctl()) with an extra argument.<br>
In the case of OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, 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 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 <<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>>> 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, opusfile and<br>
> opus-tools.<br>
><br>
> Note that the patches for libopusenc, opusfile and opus-tools are<br>
> dependent on the patch for libopus.<br>
><br>
> Please let me know if you have any additional followup 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><br>
> <a href="http://lists.xiph.org/mailman/listinfo/opus" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
><br>
</blockquote></div></div>