search for: celt_sqrt

Displaying 8 results from an estimated 8 matches for "celt_sqrt".

2013 Dec 09
1
incorrect use of MAX16
...e support for min/max of 16bit. Changing 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);*/ --
2017 Apr 10
2
[Patch] Non-diegetic support for channel mapping 254
...onses to your questions are below: I've attached a revised patch. PTAL, thanks! On Fri, Apr 7, 2017 at 1:22 PM Jean-Marc Valin <jmvalin at jmvalin.ca> wrote: Hi Drew, Thakns for the patch. Here's some comments for now (not done reviewing): 1) You want to use isqrt32() rather than celt_sqrt(), since celt_sqrt() changes behaviour for fixed-point and provides no guarantee about rounding. Thanks! I'll make that change. 2) About these two lines: + if (nondiegetic_channels && 2 != nondiegetic_channels) + return OPUS_UNIMPLEMENTED; Why not just have the conditi...
2017 Apr 07
2
[Patch] Non-diegetic support for channel mapping 254
Hello all, Attached is a proposed patch for Opus that allows support for encoding non-diegetic stereo audio as a coupled stream for use with channel mapping 254. It also rejects channel counts that are not (n+1)^2 + 2j, where n is 0 to 14 and j is either 0 or 1 (See IETF public draft doc attached for clarification). Please let me know any suggestions / concerns / comments. Thank you for your
2017 Apr 07
0
[Patch] Non-diegetic support for channel mapping 254
Hi Drew, Thakns for the patch. Here's some comments for now (not done reviewing): 1) You want to use isqrt32() rather than celt_sqrt(), since celt_sqrt() changes behaviour for fixed-point and provides no guarantee about rounding. 2) About these two lines: + if (nondiegetic_channels && 2 != nondiegetic_channels) + return OPUS_UNIMPLEMENTED; Why not just have the condition be: + if (nondiegetic_channels...
2017 Apr 24
0
[Patch] Non-diegetic support for channel mapping 254
...; On Fri, Apr 7, 2017 at 1:22 PM Jean-Marc Valin <jmvalin at jmvalin.ca > <mailto:jmvalin at jmvalin.ca>> wrote: > > Hi Drew, > > Thakns for the patch. Here's some comments for now (not done reviewing): > > 1) You want to use isqrt32() rather than celt_sqrt(), since celt_sqrt() > changes behaviour for fixed-point and provides no guarantee about > rounding. > > > Thanks! I'll make that change. > > 2) About these two lines: > + if (nondiegetic_channels && 2 != nondiegetic_channels) > +...
2017 Apr 25
2
[Patch] Non-diegetic support for channel mapping 254
...-Marc Valin <jmvalin at jmvalin.ca > > <mailto:jmvalin at jmvalin.ca>> wrote: > > > > Hi Drew, > > > > Thakns for the patch. Here's some comments for now (not done > reviewing): > > > > 1) You want to use isqrt32() rather than celt_sqrt(), since > celt_sqrt() > > changes behaviour for fixed-point and provides no guarantee about > > rounding. > > > > > > Thanks! I'll make that change. > > > > 2) About these two lines: > > + if (nondiegetic_channels &&a...
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...int len) -{ - int i, id; - celt_word32_t gain_sum = 0; - /*for (i=0;i<len;i++) printf ("%f ", gains[i]);printf ("\n");*/ - /* Convert to a representation where the MSE criterion should be near-optimal */ - for (i=0;i<len;i++) - { - gains[i] = SHR16(Q15ONE-celt_sqrt(Q1515ONE-MULT16_16(gains[i],gains[i])),1); - gain_sum = ADD32(gain_sum, EXTEND32(gains[i])); - } - /* Is it worth encoding the pitch? */ - if (gain_sum > QCONST32(.3f,15)) - { - id = vq_index(gains, pgain_table, len, 128); - /* FIXME: Remove when we're not waisting a t...
2016 Sep 13
4
[PATCH 12/15] Replace call of celt_inner_prod_c() (step 1)
..._c(&X[c*N+(eBands[i]<<LM)], &X[c*N+(eBands[i]<<LM)], (eBands[i+1]-eBands[i])<<LM); + sum = 1e-27f + celt_inner_prod(&X[c*N+(eBands[i]<<LM)], &X[c*N+(eBands[i]<<LM)], (eBands[i+1]-eBands[i])<<LM, arch); bandE[i+c*m->nbEBands] = celt_sqrt(sum); /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ } diff --git a/celt/bands.h b/celt/bands.h index c040c7f..61ae0cd 100644 --- a/celt/bands.h +++ b/celt/bands.h @@ -41,7 +41,7 @@ * @param X Spectrum * @param bandE Square root of the energy for each band (returned)...