Tucker von Holten
2021-May-09 08:18 UTC
[opus] Single opus_decode call for multiple opus_encode calls
Hi! I have a question about how the opus_decode function is supposed to be used. Are the encode and decode calls in opus "one to one"? Meaning that every time you call the encoder, you must make a single decoder call for that output packet, or can multiple packets formed from separate opus_encode calls be decoded in a single call to opus_decode (given that you have enough buffer space). Thank you for your time, -Tucker von Holten -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20210509/34b36437/attachment.htm>
Emily Bowman
2021-May-31 04:18 UTC
[opus] Single opus_decode call for multiple opus_encode calls
If you're testing the integrity of the encoder on a toolset, then yes, you'd probably want to do it that way, but also mix it up a bit too. There is absolutely no assumption that an encoder and a client be coupled, that's why it's not signalled in the bitstream. The client is perfectly free to choose to decode packets as they wish. The exact same audio stream will be generated if packets are encoded packed ten at a time and decoded one at a time, or vice versa. -Em On Fri, May 28, 2021 at 5:55 PM Tucker von Holten <tucker at reaktive.com> wrote:> Hi! I have a question about how the opus_decode function is supposed to be > used. > > Are the encode and decode calls in opus "one to one"? Meaning that every > time you call the encoder, you must make a single decoder call for that > output packet, or can multiple packets formed from separate opus_encode > calls be decoded in a single call to opus_decode (given that you have > enough buffer space). > > Thank you for your time, > -Tucker von Holten > _______________________________________________ > 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/20210530/760d4500/attachment.htm>