diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-07 08:38:27 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-07 11:46:01 -0400 |
commit | b5972388d7c9b0d5f5a780da23ba00dce6a2628d (patch) | |
tree | 674e0a7515fa77ae620d4cb7028f34d769e25c54 /silk/main.h | |
parent | a5e96b84302f2008ec32e8664356dc83efd72c17 (diff) | |
download | opus-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/main.h')
-rw-r--r-- | silk/main.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/silk/main.h b/silk/main.h index d7ed22ce..981c7cab 100644 --- a/silk/main.h +++ b/silk/main.h @@ -43,6 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* Uncomment the next line to force a fixed internal sampling rate (independent of what bitrate is used */ /*#define FORCE_INTERNAL_FS_KHZ 16*/ +/* Simple way to make [8000, 12000, 16000, 24000, 48000] to [0,1,2,3,4] */ +#define rateID(R) ( ( ( ((R)>>12) - ((R)>16000) ) >> ((R)>24000) ) - 1 ) /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ void silk_stereo_LR_to_MS( |