search for: opus_encode_n

Displaying 20 results from an estimated 29 matches for "opus_encode_n".

Did you mean: opus_encoder
2016 Feb 20
0
opus_encode_native return 3 with setup_resample
?Hello. I am using OPUS on Android. I tested opusenc on my machine and it worked properly. Once I ported opus-tools to encode pcm raw data to opus, it doesn't work if I called setup_resample. I found out that when I don't setup resample, it encodes but not correctly. I'm not familiar with this code so not sure where to begin. This problem only occurs on Android and I had to log each
2017 Oct 18
4
Global stack on Cortex-M4
..._ALLOC  -DOVERRIDE_OPUS_FREE  \          -D'opus_alloc(x)=NULL' -D'opus_free(x)=NULL' Secondly; With the "overide" directives above no dynamic memory allocation is supposed to happen. However, the following call chain (obviously)  cause a crash: opus_encode(..)-> opus_encode_native(..)->ALLOC_STACK->opus_alloc_scratch(..)->opus_alloc(..) Is this a bug or what am I missing here ? Any advise on how to get a basic encode/decode example working would be most appriciated. Thanks ! \Eric
2016 Dec 05
1
A potential error in opus-1.1.3
...downloaded the source code of opus-1.1.3.tar.gz, and statically analyzed the code by a static analysis tool. Many potential false alarms are reported. I checked manually and selected a potential error which is described as follow. Could you please check it? In file ‘src/opus_encoder.c’, function ‘opus_encode_native’, the piece of code is: … Line 1802: if (frame_size == 2*st->Fs/25) /* 80 ms -> 2x 40 ms */ Line 1803: enc_frame_size = st->Fs/25; Line 1804: if (frame_size == 3*st->Fs/25) /* 120 ms -> 2x 60 ms */ Line 1805: enc_frame_size = 3*st->Fs/50; Line 1806: else...
2018 Sep 21
2
Opus 1.2.1 crash on silk/VAD.c:315
...=encControl at entry=0x158935a8, samplesIn=0x7f267402a8a8, samplesIn at entry=0x7f267402a128, nSamplesIn=0, nSamplesIn at entry=960, psRangeEnc=psRangeEnc at entry=0x7f267402bbe0, nBytesOut=nBytesOut at entry=0x7f267402bb9c, prefillFlag=0) at silk/enc_API.c:443 #4 0x0000000000a8366d in opus_encode_native (st=st at entry=0x158935a0, pcm=0x7f267402bf38, frame_size=960, data=0x7f26b5a1084d "", data at entry=0x7f26b5a1084c "", out_data_bytes=1946331320, out_data_bytes at entry=5988, lsb_depth=1065353216, lsb_depth at entry=16, analysis_pcm=analysis_pcm at entry=0x7f26b5...
2014 Jun 04
4
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
2018 Sep 27
1
[Re:] Re: Opus 1.2.1 crash on silk/VAD.c:315
...n=0x7f267402a8a8, samplesIn at entry=0x7f267402a128, >> nSamplesIn=0, nSamplesIn at entry=960, >> psRangeEnc=psRangeEnc at entry=0x7f267402bbe0, >> nBytesOut=nBytesOut at entry=0x7f267402bb9c, prefillFlag=0) >> at silk/enc_API.c:443 >> #4 0x0000000000a8366d in opus_encode_native (st=st at entry=0x158935a0, >> pcm=0x7f267402bf38, frame_size=960, >> data=0x7f26b5a1084d "", data at entry=0x7f26b5a1084c "", >> out_data_bytes=1946331320, out_data_bytes at entry=5988, >> lsb_depth=1065353216, lsb_depth at entry=16, >&gt...
2014 Jun 04
3
opus_multistream_encode_float not working in libopus 1.1
...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 evaluat...
2014 Jun 05
0
opus_multistream_encode_float not working in libopus 1.1
..._size; curr_max becomes -2 as tot_size was 0. then line 848 curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); cur_max becomes -13 as nb_streams was 4 and s was 0. then line 849 curr_max = IMIN(curr_max,MS_FRAME_TMP); which left curr_max at -13 The result at line 853 is opus_encode_native is called with parameters so thusly: (encoder state pointer, buf pointer, frame_size=960, tmp_data pointer, curr_max=-13, lsb_depth=24, pcm pointer, analysis_frame_size=960, c1=0, c2=-1, st->layout.nb_channels=4, downmix pointer, float_api=1); I don't know what to suggest as I've...
2014 Jun 21
1
opus_multistream_encode_float not working in libopus 1.1
...8 > > curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); > > cur_max becomes -13 as nb_streams was 4 and s was 0. > > then line 849 > > curr_max = IMIN(curr_max,MS_FRAME_TMP); > > which left curr_max at -13 > > The result at line 853 is opus_encode_native is called with parameters > so thusly: > (encoder state pointer, buf pointer, frame_size=960, tmp_data pointer, > curr_max=-13, lsb_depth=24, pcm pointer, analysis_frame_size=960, > c1=0, c2=-1, st->layout.nb_channels=4, downmix pointer, float_api=1); > > > I don'...
2017 Oct 18
0
Global stack on Cortex-M4
On 10/18/2017 01:40 PM, Eric wrote: > Secondly; With the "overide" directives above no dynamic memory > allocation is supposed to happen. However, the following call chain > (obviously)  cause a crash: > > opus_encode(..)-> > opus_encode_native(..)->ALLOC_STACK->opus_alloc_scratch(..)->opus_alloc(..) NONTHREADSAFE_PSEUDOSTACK requires a working allocator. You should select either vararrays or alloca(). Both should work on any gcc-based Cortex-M toolchain. (For that matter, malloc() and free() should work fine too, unless yo...
2018 Sep 27
0
Opus 1.2.1 crash on silk/VAD.c:315
...8, >     samplesIn=0x7f267402a8a8, samplesIn at entry=0x7f267402a128, > nSamplesIn=0, nSamplesIn at entry=960, >     psRangeEnc=psRangeEnc at entry=0x7f267402bbe0, > nBytesOut=nBytesOut at entry=0x7f267402bb9c, prefillFlag=0) >     at silk/enc_API.c:443 > #4  0x0000000000a8366d in opus_encode_native (st=st at entry=0x158935a0, > pcm=0x7f267402bf38, frame_size=960, >     data=0x7f26b5a1084d "", data at entry=0x7f26b5a1084c "", > out_data_bytes=1946331320, out_data_bytes at entry=5988, >     lsb_depth=1065353216, lsb_depth at entry=16, > analysis_pcm=analy...
2016 Jun 27
2
Patches for adding 120 ms encoding
...at >> it requires are numerous and peculiar to the specific implementation >> in the calling function. >> >> > I opted to leave this anyway because the logic here seemed significant > enough to stand by itself and it makes the purpose of this code more > explicit in opus_encode_native. I agree though that there are a lot of > input arguments (it could be reduced by 1 by moving the nr_subframes > calculation in here as well). I can also undo this split if this is > preferred? > > >> >> > + bytes_per_frame = IMIN(1276,(out_data_bytes-3)/nb_fram...
2016 Jun 28
1
Patches for adding 120 ms encoding
...he specific implementation > >>> in the calling function. > >>> > >>> > >> I opted to leave this anyway because the logic here seemed significant > >> enough to stand by itself and it makes the purpose of this code more > >> explicit in opus_encode_native. I agree though that there are a lot of > >> input arguments (it could be reduced by 1 by moving the nr_subframes > >> calculation in here as well). I can also undo this split if this is > >> preferred? > >> > >> > >>> > >>>...
2016 Jun 12
2
Patches for adding 120 ms encoding
Hi Felicia, A few comments: > - /* CELT can only support up to 20 ms */ > subframe_size = st->Fs/50; > - nb_subframes = frame_size > st->Fs/25 ? 3 : 2; > + nb_subframes = frame_size/subframe_size; This will use six 20ms frames to make a 120ms packet, even for SILK-only mode where frames can be up to 60ms. For SILK, two 60ms frames would be a more
2016 Jun 13
0
Patches for adding 120 ms encoding
...t in this case the arguments that > it requires are numerous and peculiar to the specific implementation > in the calling function. > > I opted to leave this anyway because the logic here seemed significant enough to stand by itself and it makes the purpose of this code more explicit in opus_encode_native. I agree though that there are a lot of input arguments (it could be reduced by 1 by moving the nr_subframes calculation in here as well). I can also undo this split if this is preferred? > > > + bytes_per_frame = IMIN(1276,(out_data_bytes-3)/nb_frames); > > The current code...
2019 May 27
0
opus-1.3.1 patch for ARM Cortex-M4F (single precision)
..., 19 ) ); + Fc_Q19 = silk_DIV32_16( silk_SMULBB( SILK_FIX_CONST( 1.5f * PI / 1000, 19 ), cutoff_Hz ), Fs/1000 ); silk_assert( Fc_Q19 > 0 && Fc_Q19 < 32768 ); r_Q28 = SILK_FIX_CONST( 1.0, 28 ) - silk_MUL( SILK_FIX_CONST( 0.92, 9 ), Fc_Q19 ); @@ -1182,7 +1182,7 @@ opus_int32 opus_encode_native(OpusEncode prob = analysis_info.music_prob_max; else prob = analysis_info.music_prob_min; - st->voice_ratio = (int)floor(.5+100*(1-prob)); + st->voice_ratio = (int)floor(.5f+100*(1-prob)); } analysis_bandwidth = a...
2016 Jun 27
0
Antw: Re: Patches for adding 120 ms encoding
...are numerous and peculiar to the specific implementation >>> in the calling function. >>> >>> >> I opted to leave this anyway because the logic here seemed significant >> enough to stand by itself and it makes the purpose of this code more >> explicit in opus_encode_native. I agree though that there are a lot of >> input arguments (it could be reduced by 1 by moving the nr_subframes >> calculation in here as well). I can also undo this split if this is >> preferred? >> >> >>> >>> > + bytes_per_frame = IMIN(127...
2014 Jun 04
3
opus_multistream_encode_float not working in libopus 1.1
> > This is as expected. The build system is trying to get a git revision > string out of the source tree to compile in for reference. If you're > building from a downloaded source .zip, there won't be any git > information available and it will fall back to the hard-coded release > string. That's why the error isn't fatal to the build. Ok, this seems
2015 Feb 04
0
[RFC PATCH v2] armv7(float): Optimize encode usecase using NE10 library
...nalysisInfo *analysis_info); + int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info, int arch); #endif diff --git a/src/opus_encoder.c b/src/opus_encoder.c index d94163f..4656da5 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -1006,7 +1006,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ analysis_read_subframe_bak = st->analysis.read_subframe; run_analysis(&st->analysis, celt_mode, analysis_pcm, analysis_size, frame_size, c1, c2, analysis_channels, st->Fs, - lsb_depth, dow...
2015 Mar 03
0
[RFC PATCHv3] armv7(float): Optimize encode usecase using NE10 library
...nalysisInfo *analysis_info); + int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info, int arch); #endif diff --git a/src/opus_encoder.c b/src/opus_encoder.c index d94163f..4656da5 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -1006,7 +1006,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ analysis_read_subframe_bak = st->analysis.read_subframe; run_analysis(&st->analysis, celt_mode, analysis_pcm, analysis_size, frame_size, c1, c2, analysis_channels, st->Fs, - lsb_depth, dow...