multistream_encode(_float) fails on hard cbr encodes in libopus v1.1
Using either an uncoupled stereo signal or any other singal type that lends itself to utilizing the multistream APIs, when setting the bitrate to Auto (-1000) or Max (-1) by the multistream_ctl function or by setting a very low bitrate, relative to the number of channels. This error only happens with libopus v1.1 but not any version before, including libopus v1.1-beta. This can be replicated with the opus tools 0.1.8-win32 encoder with the following example commands:
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=-1000 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=-1 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=1599 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>
The above commands do not show encoding errors with previous versions of the tools.
Attached quadraphonic sample audio file for testing.