search for: shr16

Displaying 3 results from an estimated 3 matches for "shr16".

Did you mean: shr1
2006 Jun 01
1
Fixed-point version
...g point numbers (lots of them), I have no practice in working with fixed-point versions of such numbers. For instance, in the first source I'm trying to work with, nb_celp.c, it is hard to see that the following two lines of code yield the same result: #ifdef FIXED_POINT fact = SHR16(19661,SHR32(lsp_dist,LSP_SHIFT+2)); #else fact = .6*exp(-.2*lsp_dist); #endif Now, some questions. 1) When dealing with float constants, like .00001 or 0.05, to express them in fixed-point should I just scale them with the appropriate constants from arch.h? 2) If so, which scaling sho...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...efine SIG_SCALING 1. #define LSP_SCALING 1. #define GAMMA_SCALING 1. #define GAIN_SCALING 1. #define GAIN_SCALING_1 1. #define LPC_SHIFT 0 #define SIG_SHIFT 0 #define VERY_SMALL 1e-15 #define NEG16(x) (-(x)) #define NEG32(x) (-(x)) #define EXTRACT16(x) (x) #define EXTEND32(x) (x) #define SHR16(a,shift) (a) #define SHL16(a,shift) (a) #define SHR32(a,shift) (a) #define SHL32(a,shift) (a) #define PSHR16(a,shift) (a) #define PSHR32(a,shift) (a) #define SATURATE16(x,a) (x) #define SATURATE32(x,a) (x) #define PSHR(a,shift) (a) #define SHR(a,shift) (a) #define SHL(a,shift) (a...
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...ain_t *gains, int len) -{ - int i, id; - celt_word32_t gain_sum = 0; - /*for (i=0;i<len;i++) printf ("%f ", gains[i]);printf ("\n");*/ - /* Convert to a representation where the MSE criterion should be near-optimal */ - for (i=0;i<len;i++) - { - gains[i] = SHR16(Q15ONE-celt_sqrt(Q1515ONE-MULT16_16(gains[i],gains[i])),1); - gain_sum = ADD32(gain_sum, EXTEND32(gains[i])); - } - /* Is it worth encoding the pitch? */ - if (gain_sum > QCONST32(.3f,15)) - { - id = vq_index(gains, pgain_table, len, 128); - /* FIXME: Remove when we're...