search for: qconst16

Displaying 20 results from an estimated 31 matches for "qconst16".

Did you mean: const1
2011 Jun 06
1
QCONST16?
Gents, In Version 8.1, QCONST16 is defined as follows in arch.h within the FLOATING_POINT section: #define QCONST16(x,bits) (x) However, in both celt.c and quant_bands.c, QCONST16 is referenced without a conditional FLOATING_POINT define. So when I compile as FIXED_POINT I get an "undefined identifier" for QCONS...
2013 Jul 24
1
QCONST16 cross compile inconsistency
Greetings, I have found that QCONST16(32.f, 10) yields different result (from gcc 4.4.7 ) when the code is compiled for TI C55 or C64 DSPs. gcc - result is 32767 TI compiler result is -32768 (C55 compiler version 4.4.1 and C6x compiler version 7.4.2) Although not in the current code, QCONST32(32.f, 26) results differ in similar fashi...
2013 Dec 09
1
incorrect use of MAX16
...ging the default definition to take advantage of this hardware changes the result of that computation. Please consider the change below for inclusion in the opus code base. /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */ - *tf_estimate = celt_sqrt(MAX16(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28))); + *tf_estimate = celt_sqrt(MAX32(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28))); /*printf("%d %f\n", tf_max, mask_metric);*/ --
2019 May 27
0
opus-1.3.1 patch for ARM Cortex-M4F (single precision)
...1666,7 +1666,7 @@ int celt_encode_with_ec(CELTEncoder * OP prefilter_tapset = st->tapset_decision; pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes, &st->analysis); - if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3) + if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3f)...
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...t C = CHANNELS(m); @@ -234,9 +235,11 @@ void compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm Sxy = Sxx; /* We need to be a bit conservative (multiply gain by 0.9), otherwise the residual doesn't quantise well */ - Sxy = MULT16_32_Q15(QCONST16(.9f, 15), Sxy); + Sxy = MULT16_32_Q15(QCONST16(.99f, 15), Sxy); /* gain = Sxy/Sxx */ gains[i] = EXTRACT16(celt_div(Sxy,ADD32(SHR32(Sxx, PGAIN_SHIFT),EPSILON))); + if (gains[i]>QCONST16(.5,15)) + gain_sum++; /*printf ("%f ", 1-sqrt(1-gain*gain));*/...
2007 Jul 05
1
Small bug fixed
Hi, It is better to replace this line in function filterbank_new: max_mel = toBARK(EXTRACT16(MULT16_16_Q15(QCONST16(.5f,15),sampling))); to max_mel = toBARK(EXTRACT16(sampling/2)); It gives the same but it seems to be faster and avoids overflow on 44100 kHz that prevents denoiser to process 44100 streams. (Yes I know that Speex should not pack 44100 streams but it does now and I use it). Best Regards, Dmitry...
2010 Jan 27
1
Some additions to CELT_RESET_STATE for 0.7.1
...d of lax lately and have only now tried to reconcile it with the state structures in the 0.7.1 drop. I think (and feel free to contradict me here) that the following lines should be added to CELT_RESET_STATE in celt_encoder_ctl: st->fold_decision = 1; st->tonal_average = QCONST16(1.,8); st->gain_prod = 0; st->vbr_reservoir = 0; st->vbr_drift = 0; st->vbr_offset = 0; st->vbr_count = 0; st->xmem = 0; CELT_MEMSET(st->pitch_buf, 0, (MAX_PERIOD>>1)+2); and the following lines should be add...
2007 Sep 17
1
Possible fixed point overflow/div 0 preprocess.c
...lculating 'beta' within 'speex_preprocess_run', I received a floating point exception even when compiled with -DFIXED_POINT. The reason is as follows: <original beta calculation within speex_preprocess_run> ... st->nb_adapt++; st->min_count++; beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt)); beta_1 = Q15_ONE-beta; ... </> On my architecture(x86) at least the DIV32_16 is defined as follows. typedef short spx_int16_t; typedef spx_int16_t spx_word16_t; #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b)))) Th...
2006 Apr 21
2
Major internal changes, TI DSP build change
...When I patch the value 0x4006 into the C55 build, the output matches > the C6x. The problem is that 2^15 evaluates to -32768 on the C55 and 32768 > on the C6x. Right on! > Applying our friend EXTEND32 causes the constant to evaluate correctly. In > fixed_generic.h, > #define QCONST16(x,bits) > ((spx_word16_t)((x)*((EXTEND32(1))<<(bits))+((EXTEND32(1))<<((bits)-1)))) Actually, this is a case for a simple cast to (spx_word32_t) because QCONST can be used in a static initialization and EXTEND32 *can* be defined as a function (e.g. for fixed-point debug). > La...
2007 Aug 06
2
11kbps narrowband on a 24bit DSP
..., 0, /*LSP quantization*/ lsp_quant_lbr, lsp_unquant_lbr, /*Pitch quantization*/ pitch_search_3tap, pitch_unquant_3tap, &ltp_params_med, /*Innovation quantization*/ split_cb_search_shape_sign, split_cb_shape_sign_unquant, &split_cb_nb_med, QCONST16(.45,15), 220 }; /* Parameters for Long-Term Prediction (LTP)*/ static const ltp_params ltp_params_lbr = { gain_cdbk_lbr, 5, 7 }; /* Split-VQ innovation parameters narrowband */ static const split_cb_params split_cb_nb_med = { 8, /*subvect_size*/ 5,...
2009 Aug 16
3
llcon software using CELT
Hi all, I am the developer of the llcon software (llcon.sf.net) which is a software making it possible for musicians to play in real-time over the internet. Up to now I have used ADPCM or no audio coding. Gregory Maxwell was pointing me to the great CELT project. Using CELT has the advantage to be able to use higher sample rates, getting lower code rate and better error concealment. I have
2007 Jan 09
2
questions concerning adaptation rate
Hello Jean-Marc, When you count the adaptation step size in case where the filter has already had minimal adaptation, you use the following expression: r = (0.7*r + 0.3*15*RER*e)/e*(power[i] + 10) = (0.7*leak_estimate*Yf[i] + 0.3*15*RER*(Rf[i] + 1))/((Rf[i] + 1)*(power[i] + 10)). Why do we need this weighted sum and the component 0.3*15*RER*(Rf[i] + 1)? Why use the correlation-based RER if
2007 Jan 09
0
questions concerning adaptation rate
...en you count the adaptation step size in case where the filter has already had > minimal adaptation, you use the following expression: > > r = (0.7*r + 0.3*15*RER*e)/e*(power[i] + 10) = (0.7*leak_estimate*Yf[i] + > 0.3*15*RER*(Rf[i] + 1))/((Rf[i] + 1)*(power[i] + 10)). Actually, the QCONST16(.3,15) doesn't mean (.3*15), but the value .3 in Q15 format (fixed-point). > Why do we need this weighted sum and the component 0.3*15*RER*(Rf[i] + 1)? First, the reason for multiplying by (Rf[i]+1) is because I'll be dividing by it in the next line (and I didn't want to do divisi...
2015 Nov 16
0
[Fast Int64 2/4] Add OPUS_FAST_INT64 flavors of celt/fixed_generic.h macros.
...nt64)(b),31)) +#else #define MULT32_32_Q31(a,b) ADD32(ADD32(SHL(MULT16_16(SHR((a),16),SHR((b),16)),1), SHR(MULT16_16SU(SHR((a),16),((b)&0x0000ffff)),15)), SHR(MULT16_16SU(SHR((b),16),((a)&0x0000ffff)),15)) +#endif /** Compile-time conversion of float constant to 16-bit value */ #define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) -- 2.4.9 (Apple Git-60)
2006 Apr 22
0
Major internal changes, TI DSP build change
...tput >> matches >> the C6x. The problem is that 2^15 evaluates to -32768 on the C55 and >> 32768 >> on the C6x. > >Right on! > >> Applying our friend EXTEND32 causes the constant to evaluate correctly. >> In >> fixed_generic.h, >> #define QCONST16(x,bits) >> ((spx_word16_t)((x)*((EXTEND32(1))<<(bits))+((EXTEND32(1))<<((bits)-1)))) > >Actually, this is a case for a simple cast to (spx_word32_t) because >QCONST can be used in a static initialization and EXTEND32 *can* be >defined as a function (e.g. for fixed-poin...
2007 Aug 06
0
11kbps narrowband on a 24bit DSP
...Pitch quantization*/ > > pitch_search_3tap, > > pitch_unquant_3tap, > > &ltp_params_med, > > /*Innovation quantization*/ > > split_cb_search_shape_sign, > > split_cb_shape_sign_unquant, > > &split_cb_nb_med, > > QCONST16(.45,15), > > 220 > > }; > > > > /* Parameters for Long-Term Prediction (LTP)*/ > > static const ltp_params ltp_params_lbr = { > > gain_cdbk_lbr, > > 5, > > 7 > > }; > > > > /* Split-VQ innovation parameters...
2011 Mar 02
1
[PATCH] Fix CNG when effEBands is less than nbEBands.
...CELTEncoder * restrict st, const celt_sig * pcm, i ec_enc_icdf(enc, prefilter_tapset, tapset_icdf, 2); else prefilter_tapset = 0; + fprintf(stderr,"pitch_index: %4i gain %0.2f tapset: %i\n",pitch_index,gain1,prefilter_tapset); gain1 = QCONST16(0.09375f,15)*(qg+1); pf_on = 1; } @@ -1967,17 +1968,26 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p log2Amp(st->mode, st->start, st->end, bandE, backgroundLogE, C); seed = st->rng; - for (i=0;i<C*N;i++) +...
2013 May 23
2
ASM runtime detection and optimizations
...wnsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, - int len, int C) + int len, int C, const int arch) { int i; opus_val32 ac[5]; @@ -167,11 +167,11 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp); lpc[i] = MULT16_16_Q15(lpc[i], tmp); } - celt_fir(x_lp, lpc, x_lp, len>>1, 4, mem); + celt_fir[arch&OPUS_ARCHMASK](x_lp, lpc, x_lp, len>>1, 4, mem); mem[0]=0; lpc[0]=QCONST16(.8f,12); - celt_fir(x_lp, lpc, x_lp, len>>1, 1, mem); + ce...
2006 Apr 21
0
Major internal changes, TI DSP build change
...9 on the C55 and 0x4006 on the C6x. When I patch the value 0x4006 into the C55 build, the output matches the C6x. The problem is that 2^15 evaluates to -32768 on the C55 and 32768 on the C6x. Applying our friend EXTEND32 causes the constant to evaluate correctly. In fixed_generic.h, #define QCONST16(x,bits) ((spx_word16_t)((x)*((EXTEND32(1))<<(bits))+((EXTEND32(1))<<((bits)-1)))) Later I will check if this change makes these two builds match in the latest SVN code. >> Finally, in the simulator I measured the peak MIPs for the C55x as 29.4, >> where it was 41.5 in Sp...
2015 Nov 16
3
[Fast Int64 1/4] Move OPUS_FAST_INT64 definition to celt/arch.h.
--- celt/arch.h | 5 +++++ silk/macros.h | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/celt/arch.h b/celt/arch.h index 9f74ddd..670527b 100644 --- a/celt/arch.h +++ b/celt/arch.h @@ -78,6 +78,11 @@ static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) #define UADD32(a,b) ((a)+(b)) #define USUB32(a,b) ((a)-(b)) +/* Set this if opus_int64