OLD | NEW |
1 /*********************************************************************** | 1 /*********************************************************************** |
2 Copyright (C) 2014 Vidyo | 2 Copyright (C) 2014 Vidyo |
3 Redistribution and use in source and binary forms, with or without | 3 Redistribution and use in source and binary forms, with or without |
4 modification, are permitted provided that the following conditions | 4 modification, are permitted provided that the following conditions |
5 are met: | 5 are met: |
6 - Redistributions of source code must retain the above copyright notice, | 6 - Redistributions of source code must retain the above copyright notice, |
7 this list of conditions and the following disclaimer. | 7 this list of conditions and the following disclaimer. |
8 - Redistributions in binary form must reproduce the above copyright | 8 - Redistributions in binary form must reproduce the above copyright |
9 notice, this list of conditions and the following disclaimer in the | 9 notice, this list of conditions and the following disclaimer in the |
10 documentation and/or other materials provided with the distribution. | 10 documentation and/or other materials provided with the distribution. |
(...skipping 10 matching lines...) Expand all Loading... |
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 POSSIBILITY OF SUCH DAMAGE. | 25 POSSIBILITY OF SUCH DAMAGE. |
26 ***********************************************************************/ | 26 ***********************************************************************/ |
27 #ifdef HAVE_CONFIG_H | 27 #ifdef HAVE_CONFIG_H |
28 # include "config.h" | 28 # include "config.h" |
29 #endif | 29 #endif |
30 | 30 |
| 31 #include "main_FIX.h" |
31 #include "NSQ.h" | 32 #include "NSQ.h" |
| 33 #include "SigProc_FIX.h" |
32 | 34 |
33 #if defined(OPUS_HAVE_RTCD) | 35 #if defined(OPUS_HAVE_RTCD) |
34 | 36 |
35 # if (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && \ | 37 # if (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && \ |
36 !defined(OPUS_ARM_PRESUME_NEON_INTR)) | 38 !defined(OPUS_ARM_PRESUME_NEON_INTR)) |
37 | 39 |
| 40 void (*const SILK_BIQUAD_ALT_STRIDE2_IMPL[OPUS_ARCHMASK + 1])( |
| 41 const opus_int16 *in, /* I input signal
*/ |
| 42 const opus_int32 *B_Q28, /* I MA coefficients
[3] */ |
| 43 const opus_int32 *A_Q28, /* I AR coefficients
[2] */ |
| 44 opus_int32 *S, /* I/O State vector [4
] */ |
| 45 opus_int16 *out, /* O output signal
*/ |
| 46 const opus_int32 len /* I signal length (
must be even) */ |
| 47 ) = { |
| 48 silk_biquad_alt_stride2_c, /* ARMv4 */ |
| 49 silk_biquad_alt_stride2_c, /* EDSP */ |
| 50 silk_biquad_alt_stride2_c, /* Media */ |
| 51 silk_biquad_alt_stride2_neon, /* Neon */ |
| 52 }; |
| 53 |
| 54 opus_int32 (*const SILK_LPC_INVERSE_PRED_GAIN_IMPL[OPUS_ARCHMASK + 1])( /* O R
eturns inverse prediction gain in energy domain, Q30 */ |
| 55 const opus_int16 *A_Q12, /* I P
rediction coefficients, Q12 [order] */ |
| 56 const opus_int order /* I P
rediction order */ |
| 57 ) = { |
| 58 silk_LPC_inverse_pred_gain_c, /* ARMv4 */ |
| 59 silk_LPC_inverse_pred_gain_c, /* EDSP */ |
| 60 silk_LPC_inverse_pred_gain_c, /* Media */ |
| 61 silk_LPC_inverse_pred_gain_neon, /* Neon */ |
| 62 }; |
| 63 |
| 64 void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( |
| 65 const silk_encoder_state *psEncC,
/* I Encoder State */ |
| 66 silk_nsq_state *NSQ,
/* I/O NSQ state */ |
| 67 SideInfoIndices *psIndices,
/* I/O Quantization Indices */ |
| 68 const opus_int16 x16[],
/* I Input */ |
| 69 opus_int8 pulses[],
/* O Quantized pulse signal */ |
| 70 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],
/* I Short term prediction coefs */ |
| 71 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],
/* I Long term prediction coefs */ |
| 72 const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ]
, /* I Noise shaping coefs */ |
| 73 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ],
/* I Long term shaping coefs */ |
| 74 const opus_int Tilt_Q14[ MAX_NB_SUBFR ],
/* I Spectral tilt */ |
| 75 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ],
/* I Low frequency shaping coefs */ |
| 76 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ],
/* I Quantization step sizes */ |
| 77 const opus_int pitchL[ MAX_NB_SUBFR ],
/* I Pitch lags */ |
| 78 const opus_int Lambda_Q10,
/* I Rate/distortion tradeoff */ |
| 79 const opus_int LTP_scale_Q14
/* I LTP state scaling */ |
| 80 ) = { |
| 81 silk_NSQ_del_dec_c, /* ARMv4 */ |
| 82 silk_NSQ_del_dec_c, /* EDSP */ |
| 83 silk_NSQ_del_dec_c, /* Media */ |
| 84 silk_NSQ_del_dec_neon, /* Neon */ |
| 85 }; |
| 86 |
38 /*There is no table for silk_noise_shape_quantizer_short_prediction because the | 87 /*There is no table for silk_noise_shape_quantizer_short_prediction because the |
39 NEON version takes different parameters than the C version. | 88 NEON version takes different parameters than the C version. |
40 Instead RTCD is done via if statements at the call sites. | 89 Instead RTCD is done via if statements at the call sites. |
41 See NSQ_neon.h for details.*/ | 90 See NSQ_neon.h for details.*/ |
42 | 91 |
43 opus_int32 | 92 opus_int32 |
44 (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( | 93 (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( |
45 const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, | 94 const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, |
46 opus_int order) = { | 95 opus_int order) = { |
47 silk_NSQ_noise_shape_feedback_loop_c, /* ARMv4 */ | 96 silk_NSQ_noise_shape_feedback_loop_c, /* ARMv4 */ |
48 silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ | 97 silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ |
49 silk_NSQ_noise_shape_feedback_loop_c, /* Media */ | 98 silk_NSQ_noise_shape_feedback_loop_c, /* Media */ |
50 silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ | 99 silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ |
51 }; | 100 }; |
52 | 101 |
53 # endif | 102 # endif |
54 | 103 |
| 104 # if defined(FIXED_POINT) && \ |
| 105 defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && !defined(OPUS_ARM_PRESUME_NEON_INTR) |
| 106 |
| 107 void (*const SILK_WARPED_AUTOCORRELATION_FIX_IMPL[OPUS_ARCHMASK + 1])( |
| 108 opus_int32 *corr, /* O
Result [order + 1]
*/ |
| 109 opus_int *scale, /* O
Scaling of the correlation vector
*/ |
| 110 const opus_int16 *input, /* I
Input data to correlate
*/ |
| 111 const opus_int warping_Q16, /* I
Warping coefficient
*/ |
| 112 const opus_int length, /* I
Length of input
*/ |
| 113 const opus_int order /* I
Correlation order (even)
*/ |
| 114 ) = { |
| 115 silk_warped_autocorrelation_FIX_c, /* ARMv4 */ |
| 116 silk_warped_autocorrelation_FIX_c, /* EDSP */ |
| 117 silk_warped_autocorrelation_FIX_c, /* Media */ |
| 118 silk_warped_autocorrelation_FIX_neon, /* Neon */ |
| 119 }; |
| 120 |
| 121 # endif |
| 122 |
55 #endif /* OPUS_HAVE_RTCD */ | 123 #endif /* OPUS_HAVE_RTCD */ |
OLD | NEW |