summaryrefslogtreecommitdiff
path: root/silk/define.h
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2011-10-07 08:38:27 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-10-07 11:46:01 -0400
commitb5972388d7c9b0d5f5a780da23ba00dce6a2628d (patch)
tree674e0a7515fa77ae620d4cb7028f34d769e25c54 /silk/define.h
parenta5e96b84302f2008ec32e8664356dc83efd72c17 (diff)
downloadopus-b5972388d7c9b0d5f5a780da23ba00dce6a2628d.tar.gz
Proper SILK delay compensation for resampling
Adds SILK delay compensation that depends on encode and decode sampling rate, as well as SILK internal coding rate. This ensures that the SILK part of Opus is always in sync with the CELT part no matter what the sampling rates are. It also increases the resampling delay to 1.15 ms (was previously 0.48 ms).
Diffstat (limited to 'silk/define.h')
-rw-r--r--silk/define.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/silk/define.h b/silk/define.h
index dcfeb1d3..c7cbdcf8 100644
--- a/silk/define.h
+++ b/silk/define.h
@@ -86,6 +86,9 @@ extern "C"
#define MAX_FRAME_LENGTH_MS ( SUB_FRAME_LENGTH_MS * MAX_NB_SUBFR )
#define MAX_FRAME_LENGTH ( MAX_FRAME_LENGTH_MS * MAX_FS_KHZ )
+#define MAX_ENCODER_DELAY 18
+#define MAX_DECODER_DELAY 8
+
/* Milliseconds of lookahead for pitch analysis */
#define LA_PITCH_MS 2
#define LA_PITCH_MAX ( LA_PITCH_MS * MAX_FS_KHZ )