Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy B. Terriberry <tterribe@xiph.org>2011-09-17 23:44:19 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-09-28 04:28:31 +0400
commit748c960cf7ab61a92adc323fe5bbae03af9949f4 (patch)
treef35748461ac7a2906a76e3195c9af129960c989d /silk/tables_pulses_per_block.c
parent9826ed99c36504ad466feeadacf5e2ced1518c4a (diff)
Add support for coding signs with 0 pulses.
The SILK bitstream allowed coding 0 pulses in a shell block, but a non-zero number of LSb's, meaning some excitation coefficients could be non-zero, but would not have a corresponding sign. To fix this without breaking already-encoded bitstreams, this patch adds a set of sign PDFs for the 0 pulses case. This is occasionally more efficient than the normal encoding if there are a large number of coefficients with positive signs, since these cost more than 1 bit when using the > 0 pulse PDFs. It only saves 0.33 bits per second (on average: it does better at high rates), but that's probably enough to justify the two redundant ways of coding things (and it's too late now to remove the second one entirely, anyway). This patch does not include the encoder modifications required to check if this coding method is more efficient and switch to it.
Diffstat (limited to 'silk/tables_pulses_per_block.c')
-rw-r--r--silk/tables_pulses_per_block.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/silk/tables_pulses_per_block.c b/silk/tables_pulses_per_block.c
index 51c9e554..9859e326 100644
--- a/silk/tables_pulses_per_block.c
+++ b/silk/tables_pulses_per_block.c
@@ -254,10 +254,11 @@ const opus_uint8 silk_shell_code_table_offsets[ 17 ] = {
135
};
-const opus_uint8 silk_sign_iCDF[ 36 ] = {
- 49, 67, 77, 82, 93, 99, 11, 18,
- 24, 31, 36, 45, 46, 66, 78, 87,
- 94, 104, 14, 21, 32, 42, 51, 66,
- 94, 104, 109, 112, 115, 118, 53, 69,
- 80, 88, 95, 102
+const opus_uint8 silk_sign_iCDF[ 42 ] = {
+ 254, 49, 67, 77, 82, 93, 99,
+ 198, 11, 18, 24, 31, 36, 45,
+ 255, 46, 66, 78, 87, 94, 104,
+ 208, 14, 21, 32, 42, 51, 66,
+ 255, 94, 104, 109, 112, 115, 118,
+ 248, 53, 69, 80, 88, 95, 102
};