aboutsummaryrefslogtreecommitdiff
path: root/celt
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-01-31 02:03:39 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-01-31 02:18:05 -0500
commit66820f350d14fa3a65b73b6f1c2be1eb03ba47f3 (patch)
treea6e890bbd82619665e8ebc06b8229eed70439d49 /celt
parent54518c879a6541eab749bc19628f1795daaad1e3 (diff)
downloadlibopus-66820f350d14fa3a65b73b6f1c2be1eb03ba47f3.tar.gz
Tweaks the CELT fractional resampling delay to get perfect alignment
Also using the same int->float conversion functions for SILK as for CELT and changed encoder implementation default to constrained VBR just to be safe when VBR gets more aggressive.
Diffstat (limited to 'celt')
-rw-r--r--celt/celt.c3
-rw-r--r--celt/float_cast.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/celt/celt.c b/celt/celt.c
index eeed05a0..6c1eb6b8 100644
--- a/celt/celt.c
+++ b/celt/celt.c
@@ -472,9 +472,10 @@ static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsa
x++;
/* Technically the store could be moved outside of the if because
the stores we don't want will just be overwritten */
+ if (count==0)
+ *y = SCALEOUT(SIG2WORD16(tmp));
if (++count==downsample)
{
- *y = SCALEOUT(SIG2WORD16(tmp));
y+=C;
count=0;
}
diff --git a/celt/float_cast.h b/celt/float_cast.h
index 39f63d42..079307a0 100644
--- a/celt/float_cast.h
+++ b/celt/float_cast.h
@@ -29,6 +29,9 @@
#ifndef FLOAT_CAST_H
#define FLOAT_CAST_H
+
+#include "arch.h"
+
/*============================================================================
** On Intel Pentium processors (especially PIII and probably P4), converting
** from float to int is very slow. To meet the C specs, the code produced by