Displaying 4 results from an estimated 4 matches for "qconst32".
Did you mean:
const32
2013 Dec 09
1
incorrect use of MAX16
...ge 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);*/
--
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 fashion.
Judging by the use #ifdef TI_C.. in the code base, these TI
processors have had some level of cross compile support.
It is with that understanding that I submit for your
consideration the attached patch with one solution that
addresses this issue.
The c...
2019 May 27
0
opus-1.3.1 patch for ARM Cortex-M4F (single precision)
...ompile-time conversion of float constant to 16-bit value */
-#define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits))))
+#define QCONST16(x,bits) ((opus_val16)(.5f+(x)*(((opus_val32)1)<<(bits))))
/** Compile-time conversion of float constant to 32-bit value */
-#define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits))))
+#define QCONST32(x,bits) ((opus_val32)(.5f+(x)*(((opus_val32)1)<<(bits))))
/** Negate a 16-bit value */
#define NEG16(x) (-(x))
diff -Naupr opus-1.3.1-vanilla/celt/mathops.h opus-1.3.1/celt/mathops.h
--- opus-1.3.1-vanilla/ce...
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...st, const celt_sig_t * pcm, celt_si
pitch_power = bandEp[0]+bandEp[1]+bandEp[2];
/* Check if we can safely use the pitch (i.e. effective gain isn't too high) */
curr_power = bandE[0]+bandE[1]+bandE[2];
- id=-1;
if ((MULT16_32_Q15(QCONST16(.1f, 15),curr_power) + QCONST32(10.f,ENER_SHIFT) < pitch_power))
{
/* Pitch prediction */
- compute_pitch_gain(st->mode, X, P, gains);
- id = quant_pitch(gains, st->mode->nbPBands);
- }
- if (id == -1)
+ has_pitch = compute_pitch_gain(st->mode, X, P, gains);
+...