Hi I am trying to use opus for encoding AES (spdif) stream . I suppose that input samples should be 16 bits in opus but samples in AES stream can be at most 24 bits. Can opus accepts samples more than 16 bits without any modifications in source codes ? If answer is No then "How can I modify opus to accept these 24 bits samples ?" Best Regards Kazem Baadpie -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20150623/ce8d3b25/attachment.htm
On 2015-06-23 8:04 AM, Kazem Baadpie wrote:> I am trying to use opus for encoding AES (spdif) stream . I suppose > that input samples should be 16 bits in opus but samples in AES stream > can be at most 24 bits. Can opus accepts samples more than 16 bits > without any modifications in source codes ? If answer is No then "How > can I modify opus to accept these 24 bits samples ?"Opus cannot accept 24 bit integer samples directly. Best practice there is to dither down to 16 bits before encoding. However, Opus also accepts float samples, so a simpler approach is to normalize to +/- 1.0 and use opus_encode_float(). That will let you submit the full precision input data directly to the encoder. Just be careful with clipping. https://opus-codec.org/docs/html_api-1.1.0/group__opus__encoder.html#ga4ae9905859cd241ef4bb5c59cd5e5309 HTH, -r
Hi, Opus itself supports 24-bit audio and can handle all of the dynamic range (and then some). I *think* the opusenc command-line tool can handle 24-bit wav files, but I could be wrong (if not it's something that needs to be added). Cheers, Jean-Marc On 06/23/2015 11:04 AM, Kazem Baadpie wrote:> Hi > I am trying to use opus for encoding AES (spdif) stream . I suppose > that input samples should be 16 bits in opus but samples in AES stream > can be at most 24 bits. Can opus accepts samples more than 16 bits > without any modifications in source codes ? If answer is No then "How > can I modify opus to accept these 24 bits samples ?" > > Best Regards > Kazem Baadpie > > > > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >
Jean-Marc Valin wrote:> Opus itself supports 24-bit audio and can handle all of the dynamic > range (and then some). I *think* the opusenc command-line tool can > handle 24-bit wav files, but I could be wrong (if not it's something > that needs to be added).It can (little-endian only).