Displaying 2 results from an estimated 2 matches for "scalein".
Did you mean:
scaleil
2009 May 20
1
A (minor) bug and a request
Cheers all.
I believe that the first line in the function FLOAT2INT16 in celt.c
which is now:
x = x*32768.;
should be:
x = SCALEIN(x);
This only makes a difference if you change the SCALEIN and SCALEOUT
macros (which I do).
The new feature I would like to request is the addition of a
CELT_RESET_STATE control for both the encoder and decoder. I cache
encoder and decoder instances and would like to be able to reset them to...
2013 Jul 24
1
QCONST16 cross compile inconsistency
...be compile-time constant generators
for gcc and the TI compilers.
thank you
--
Pedro Becerra
-------------- next part --------------
diff --git a/celt/arch.h b/celt/arch.h
index e497a4d..6511667 100644
--- a/celt/arch.h
+++ b/celt/arch.h
@@ -107,6 +107,18 @@ typedef opus_val32 celt_ener;
#define SCALEIN(a) (a)
#define SCALEOUT(a) (a)
+/** Compile-time conversion of float constant to 16-bit value */
+#define QCONST16(x,bits) (opus_val16)( \
+ (( 0.5 + (double)(x) * ((opus_val32)(1)<<(bits)) ) >= (double)(INT16_MAX) ) ? \
+ (opus_val16)(INT...