diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-20 08:39:41 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-20 08:39:41 +0400 |
commit | 294bfec27b82f879e3c3004d31bb91bcb34014f4 (patch) | |
tree | 94a6332cc1df41ec84b453ef76ee8118b95bfd8f /silk/biquad_alt.c | |
parent | dbf2ea841e5b022f0b6d15a606dd7288f25c35dd (diff) |
Implements hard CBR for SILK
This is achieved by running the encoding process in a loop and
padding when we don't reach the exact rate. It also implements
VBR-with-cap, which means we no longer need to artificially decrease
the SILK bandwidth when it's close to the cap.
Diffstat (limited to 'silk/biquad_alt.c')
-rw-r--r-- | silk/biquad_alt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/silk/biquad_alt.c b/silk/biquad_alt.c index 617b33ab..74a66a5c 100644 --- a/silk/biquad_alt.c +++ b/silk/biquad_alt.c @@ -47,7 +47,7 @@ void silk_biquad_alt( opus_int32 *S, /* I/O: State vector [2] */ opus_int16 *out, /* O: Output signal */ const opus_int32 len, /* I: Signal length (must be even) */ - int stride + opus_int stride /* I: Operate on interleaved signal if > 1 */ ) { /* DIRECT FORM II TRANSPOSED (uses 2 element state vector) */ @@ -62,7 +62,7 @@ void silk_biquad_alt( for( k = 0; k < len; k++ ) { /* S[ 0 ], S[ 1 ]: Q12 */ - inval = in[ k*stride ]; + inval = in[ k * stride ]; out32_Q14 = silk_LSHIFT( silk_SMLAWB( S[ 0 ], B_Q28[ 0 ], inval ), 2 ); S[ 0 ] = S[1] + silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A0_L_Q28 ), 14 ); @@ -74,6 +74,6 @@ void silk_biquad_alt( S[ 1 ] = silk_SMLAWB( S[ 1 ], B_Q28[ 2 ], inval ); /* Scale back to Q0 and saturate */ - out[ k*stride ] = (opus_int16)silk_SAT16( silk_RSHIFT( out32_Q14 + (1<<14) - 1, 14 ) ); + out[ k * stride ] = (opus_int16)silk_SAT16( silk_RSHIFT( out32_Q14 + (1<<14) - 1, 14 ) ); } } |