Alpha Thinktink
2014-Jun-04 22:48 UTC
[opus] opus_multistream_encode_float not working in libopus 1.1
Finally got it to compile and attach the MSVC debugger.
It fails at the following:
if ((!st->variable_duration && 400*frame_size != st->Fs
&&
200*frame_size != st->Fs && 100*frame_size != st->Fs &&
50*frame_size != st->Fs && 25*frame_size != st->Fs
&&
50*frame_size != 3*st->Fs)
|| (400*frame_size < st->Fs)
|| max_data_bytes<=0
)
{
RESTORE_STACK;
return OPUS_BAD_ARG;
}
---inside---
opus_encode_native(...)
---on---
line 970 inside opus_encoder.c
---where the debugger says---
!st->variable_duration evaluates as false
400*frame_size != st->Fs evaluates as true
200*frame_size != st->Fs evaluates as true
100*frame_size != st->Fs evaluates as true
50*frame_size != st->Fs evaluates as false
25*frame_size != st->Fs evaluates as true
50*frame_size != 3*st->Fs evaluates as true
(400*frame_size < st->Fs) evaluates as true
max_data_bytes<=0 evaluates as true
---variables values involved---
st->variable_duration=5000
frame_size=960
st->Fs=48000
max_data_bytes=-11
Hope that helps.
Alpha Thinktink
2014-Jun-04 22:52 UTC
[opus] opus_multistream_encode_float not working in libopus 1.1
Oops, correction: ... (400*frame_size < st->Fs) evaluates as false ...
Timothy B. Terriberry
2014-Jun-04 23:31 UTC
[opus] opus_multistream_encode_float not working in libopus 1.1
Alpha Thinktink wrote:> max_data_bytes=-11That value is passed in by you. I also don't think passing such a value would have worked in earlier releases. It indicates the size of the buffer you are passing to the encoder to receive the encoded output.
Alpha Thinktink
2014-Jun-04 23:41 UTC
[opus] opus_multistream_encode_float not working in libopus 1.1
On Wed, Jun 4, 2014 at 4:31 PM, Timothy B. Terriberry <tterribe at xiph.org> wrote:> Alpha Thinktink wrote: >> max_data_bytes=-11 > > That value is passed in by you. I also don't think passing such a value > would have worked in earlier releases. It indicates the size of the > buffer you are passing to the encoder to receive the encoded output.Actually, I'm passing a massive buffer size. The debugger shows I'm passing 10200 bytes, which lines up with my source code: while(RemoveFloatSamples(ack,packetsamplescount)) { char *tout=new char[1275*2*Fnch]; int len=encode_float(e_state,ack,packetframescount,tout,1275*2*Fnch); if(len>0) { AddOpusPacket(tout,len,packetframescount*rscale); } else { delete [] tout; delete [] ack; Ferror=-1; return 0; } }
Seemingly Similar Threads
- opus_multistream_encode_float not working in libopus 1.1
- opus_multistream_encode_float not working in libopus 1.1
- opus_multistream_encode_float not working in libopus 1.1
- [PATCH] Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO
- opus_multistream_encode_float not working in libopus 1.1