ref: 62b88c3b28abd2896adef63382fe1c19bd42e0e7
parent: 1c09febec7eeb4f654d1b0692da7ef0e28dc81d2
author: Jean-Marc Valin <[email protected]>
date: Thu Feb 3 06:34:43 EST 2011
Some more hybrid tuning (mostly for CBR)
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -113,18 +113,18 @@
if( st->bandwidth == BANDWIDTH_SUPERWIDEBAND ) {
if( st->Fs == 100 * frame_size ) {
/* 24 kHz, 10 ms */
- st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 14000 ) * 2 ) / 3;
+ st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 14000 - ( 1 - st->use_vbr ) * 10000 ) * 2 ) / 3;
} else {
/* 24 kHz, 20 ms */
- st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 10000 ) * 2 ) / 3;
+ st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 12000 - ( 1 - st->use_vbr ) * 10000 ) * 2 ) / 3;
}
} else {
if( st->Fs == 100 * frame_size ) {
/* 48 kHz, 10 ms */
- st->silk_mode.bitRate = ( st->silk_mode.bitRate + 18000 ) / 2;
+ st->silk_mode.bitRate = ( st->silk_mode.bitRate + 16000 - ( 1 - st->use_vbr ) * 8000 ) / 2;
} else {
/* 48 kHz, 20 ms */
- st->silk_mode.bitRate = ( st->silk_mode.bitRate + 16000 ) / 2;
+ st->silk_mode.bitRate = ( st->silk_mode.bitRate + 14000 - ( 1 - st->use_vbr ) * 5000 ) / 2;
}
}
}