| 1 | /*********************************************************************** |
| 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
| 3 | Redistribution and use in source and binary forms, with or without |
| 4 | modification, are permitted provided that the following conditions |
| 5 | are met: |
| 6 | - Redistributions of source code must retain the above copyright notice, |
| 7 | this list of conditions and the following disclaimer. |
| 8 | - Redistributions in binary form must reproduce the above copyright |
| 9 | notice, this list of conditions and the following disclaimer in the |
| 10 | documentation and/or other materials provided with the distribution. |
| 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the |
| 12 | names of specific contributors, may be used to endorse or promote |
| 13 | products derived from this software without specific prior written |
| 14 | permission. |
| 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 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 |
| 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 |
| 25 | POSSIBILITY OF SUCH DAMAGE. |
| 26 | ***********************************************************************/ |
| 27 | |
| 28 | //#ifdef HAVE_CONFIG_H |
| 29 | #include "opus__config.h"cxx . . $ `<file>/external/opusfile/opus/opus__config.h`/ |
| 30 | //#endif |
| 31 | |
| 32 | #include "SigProc_FIX.h"cxx . . $ `<file>/external/opusfile/opus/silk/SigProc_FIX.h`/ |
| 33 | #include "resampler_private.h"cxx . . $ `<file>/external/opusfile/opus/silk/resampler_private.h`/ |
| 34 | #include "stack_alloc.h"cxx . . $ `<file>/external/opusfile/opus/celt/stack_alloc.h`/ |
| 35 | |
| 36 | static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int16cxx . . $ opus_int16# *silk_resampler_private_down_FIR_INTERPOLcxx . . $ silk_resampler_private_down_FIR_INTERPOL(457d5229e09d9927).( |
| 37 | opus_int16cxx . . $ opus_int16# *out, |
| 38 | opus_int32cxx . . $ opus_int32# *buf, |
| 39 | const opus_int16cxx . . $ opus_int16# *FIR_Coefs, |
| 40 | opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! FIR_Order, |
| 41 | opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! FIR_Fracs, |
| 42 | opus_int32cxx . . $ opus_int32# max_index_Q16, |
| 43 | opus_int32cxx . . $ opus_int32# index_increment_Q16 |
| 44 | ) |
| 45 | { |
| 46 | opus_int32cxx . . $ opus_int32# index_Q16, res_Q6; |
| 47 | opus_int32cxx . . $ opus_int32# *buf_ptr; |
| 48 | opus_int32cxx . . $ opus_int32# interpol_ind; |
| 49 | const opus_int16cxx . . $ opus_int16# *interpol_ptr; |
| 50 | |
| 51 | switch( FIR_Order ) { |
| 52 | case RESAMPLER_DOWN_ORDER_FIR0cxx . . $ `external/opusfile/opus/silk/resampler_rom.h:39:9`!: |
| 53 | for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) { |
| 54 | /* Integer part gives pointer to buffered input */ |
| 55 | buf_ptr = buf + silk_RSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:511:9`!( index_Q16, 16 ); |
| 56 | |
| 57 | /* Fractional part gives interpolation coefficients */ |
| 58 | interpol_ind = silk_SMULWBcxx . . $ `external/opusfile/opus/silk/macros.h:43:9`!( index_Q16 & 0xFFFF, FIR_Fracs ); |
| 59 | |
| 60 | /* Inner product */ |
| 61 | interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0cxx . . $ `external/opusfile/opus/silk/resampler_rom.h:39:9`! / 2 * interpol_ind ]; |
| 62 | res_Q6 = silk_SMULWBcxx . . $ `external/opusfile/opus/silk/macros.h:43:9`!( buf_ptr[ 0 ], interpol_ptr[ 0 ] ); |
| 63 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 1 ], interpol_ptr[ 1 ] ); |
| 64 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 2 ], interpol_ptr[ 2 ] ); |
| 65 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 3 ], interpol_ptr[ 3 ] ); |
| 66 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 4 ], interpol_ptr[ 4 ] ); |
| 67 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 5 ], interpol_ptr[ 5 ] ); |
| 68 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 6 ], interpol_ptr[ 6 ] ); |
| 69 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 7 ], interpol_ptr[ 7 ] ); |
| 70 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 8 ], interpol_ptr[ 8 ] ); |
| 71 | interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0cxx . . $ `external/opusfile/opus/silk/resampler_rom.h:39:9`! / 2 * ( FIR_Fracs - 1 - interpol_ind ) ]; |
| 72 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 17 ], interpol_ptr[ 0 ] ); |
| 73 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 16 ], interpol_ptr[ 1 ] ); |
| 74 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 15 ], interpol_ptr[ 2 ] ); |
| 75 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 14 ], interpol_ptr[ 3 ] ); |
| 76 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 13 ], interpol_ptr[ 4 ] ); |
| 77 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 12 ], interpol_ptr[ 5 ] ); |
| 78 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 6 ] ); |
| 79 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 7 ] ); |
| 80 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, buf_ptr[ 9 ], interpol_ptr[ 8 ] ); |
| 81 | |
| 82 | /* Scale down, saturate and store in output array */ |
| 83 | *out++ = (opus_int16cxx . . $ opus_int16#)silk_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:474:9`!( silk_RSHIFT_ROUNDcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:531:9`!( res_Q6, 6 ) ); |
| 84 | } |
| 85 | break; |
| 86 | case RESAMPLER_DOWN_ORDER_FIR1cxx . . $ `external/opusfile/opus/silk/resampler_rom.h:40:9`!: |
| 87 | for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) { |
| 88 | /* Integer part gives pointer to buffered input */ |
| 89 | buf_ptr = buf + silk_RSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:511:9`!( index_Q16, 16 ); |
| 90 | |
| 91 | /* Inner product */ |
| 92 | res_Q6 = silk_SMULWBcxx . . $ `external/opusfile/opus/silk/macros.h:43:9`!( silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 0 ], buf_ptr[ 23 ] ), FIR_Coefs[ 0 ] ); |
| 93 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 1 ], buf_ptr[ 22 ] ), FIR_Coefs[ 1 ] ); |
| 94 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 2 ], buf_ptr[ 21 ] ), FIR_Coefs[ 2 ] ); |
| 95 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 3 ], buf_ptr[ 20 ] ), FIR_Coefs[ 3 ] ); |
| 96 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 4 ], buf_ptr[ 19 ] ), FIR_Coefs[ 4 ] ); |
| 97 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 5 ], buf_ptr[ 18 ] ), FIR_Coefs[ 5 ] ); |
| 98 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 6 ], buf_ptr[ 17 ] ), FIR_Coefs[ 6 ] ); |
| 99 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 7 ], buf_ptr[ 16 ] ), FIR_Coefs[ 7 ] ); |
| 100 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 8 ], buf_ptr[ 15 ] ), FIR_Coefs[ 8 ] ); |
| 101 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 9 ], buf_ptr[ 14 ] ), FIR_Coefs[ 9 ] ); |
| 102 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 10 ], buf_ptr[ 13 ] ), FIR_Coefs[ 10 ] ); |
| 103 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 11 ], buf_ptr[ 12 ] ), FIR_Coefs[ 11 ] ); |
| 104 | |
| 105 | /* Scale down, saturate and store in output array */ |
| 106 | *out++ = (opus_int16cxx . . $ opus_int16#)silk_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:474:9`!( silk_RSHIFT_ROUNDcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:531:9`!( res_Q6, 6 ) ); |
| 107 | } |
| 108 | break; |
| 109 | case RESAMPLER_DOWN_ORDER_FIR2cxx . . $ `external/opusfile/opus/silk/resampler_rom.h:41:9`!: |
| 110 | for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) { |
| 111 | /* Integer part gives pointer to buffered input */ |
| 112 | buf_ptr = buf + silk_RSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:511:9`!( index_Q16, 16 ); |
| 113 | |
| 114 | /* Inner product */ |
| 115 | res_Q6 = silk_SMULWBcxx . . $ `external/opusfile/opus/silk/macros.h:43:9`!( silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 0 ], buf_ptr[ 35 ] ), FIR_Coefs[ 0 ] ); |
| 116 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 1 ], buf_ptr[ 34 ] ), FIR_Coefs[ 1 ] ); |
| 117 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 2 ], buf_ptr[ 33 ] ), FIR_Coefs[ 2 ] ); |
| 118 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 3 ], buf_ptr[ 32 ] ), FIR_Coefs[ 3 ] ); |
| 119 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 4 ], buf_ptr[ 31 ] ), FIR_Coefs[ 4 ] ); |
| 120 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 5 ], buf_ptr[ 30 ] ), FIR_Coefs[ 5 ] ); |
| 121 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 6 ], buf_ptr[ 29 ] ), FIR_Coefs[ 6 ] ); |
| 122 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 7 ], buf_ptr[ 28 ] ), FIR_Coefs[ 7 ] ); |
| 123 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 8 ], buf_ptr[ 27 ] ), FIR_Coefs[ 8 ] ); |
| 124 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 9 ], buf_ptr[ 26 ] ), FIR_Coefs[ 9 ] ); |
| 125 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 10 ], buf_ptr[ 25 ] ), FIR_Coefs[ 10 ] ); |
| 126 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 11 ], buf_ptr[ 24 ] ), FIR_Coefs[ 11 ] ); |
| 127 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 12 ], buf_ptr[ 23 ] ), FIR_Coefs[ 12 ] ); |
| 128 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 13 ], buf_ptr[ 22 ] ), FIR_Coefs[ 13 ] ); |
| 129 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 14 ], buf_ptr[ 21 ] ), FIR_Coefs[ 14 ] ); |
| 130 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 15 ], buf_ptr[ 20 ] ), FIR_Coefs[ 15 ] ); |
| 131 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 16 ], buf_ptr[ 19 ] ), FIR_Coefs[ 16 ] ); |
| 132 | res_Q6 = silk_SMLAWBcxx . . $ `external/opusfile/opus/silk/macros.h:50:9`!( res_Q6, silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!( buf_ptr[ 17 ], buf_ptr[ 18 ] ), FIR_Coefs[ 17 ] ); |
| 133 | |
| 134 | /* Scale down, saturate and store in output array */ |
| 135 | *out++ = (opus_int16cxx . . $ opus_int16#)silk_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:474:9`!( silk_RSHIFT_ROUNDcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:531:9`!( res_Q6, 6 ) ); |
| 136 | } |
| 137 | break; |
| 138 | default: |
| 139 | celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( 0 ); |
| 140 | } |
| 141 | return out; |
| 142 | } |
| 143 | |
| 144 | /* Resample with a 2nd order AR filter followed by FIR interpolation */ |
| 145 | void silk_resampler_private_down_FIRcxx . . $ silk_resampler_private_down_FIR(28ed3a6666ac3567).( |
| 146 | void *SS, /* I/O Resampler state */ |
| 147 | opus_int16cxx . . $ opus_int16# out[], /* O Output signal */ |
| 148 | const opus_int16cxx . . $ opus_int16# in[], /* I Input signal */ |
| 149 | opus_int32cxx . . $ opus_int32# inLen /* I Number of input samples */ |
| 150 | ) |
| 151 | { |
| 152 | silk_resampler_state_structcxx . . $ silk_resampler_state_struct# *S = (silk_resampler_state_structcxx . . $ silk_resampler_state_struct# *)SS; |
| 153 | opus_int32cxx . . $ opus_int32# nSamplesIn; |
| 154 | opus_int32cxx . . $ opus_int32# max_index_Q16, index_increment_Q16; |
| 155 | VARDECLcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:94:9`!( opus_int32, buf ); |
| 156 | const opus_int16cxx . . $ opus_int16# *FIR_Coefs; |
| 157 | SAVE_STACKcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:96:9`!; |
| 158 | |
| 159 | ALLOCcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:95:9`!( buf, S->batchSize + S->FIR_Order, opus_int32 ); |
| 160 | |
| 161 | /* Copy buffered samples to start of buffer */ |
| 162 | silk_memcpycxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:420:9`!( buf, S->sFIR.i32, S->FIR_Order * sizeof( opus_int32 ) ); |
| 163 | |
| 164 | FIR_Coefs = &S->Coefscxx . . $ _silk_resampler_state_struct#Coefs.[ 2 ]; |
| 165 | |
| 166 | /* Iterate over blocks of frameSizeIn input samples */ |
| 167 | index_increment_Q16 = S->invRatio_Q16cxx . . $ _silk_resampler_state_struct#invRatio_Q16.; |
| 168 | while( 1 ) { |
| 169 | nSamplesIn = silk_mincxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:539:9`!( inLen, S->batchSize ); |
| 170 | |
| 171 | /* Second-order AR filter (output in Q8) */ |
| 172 | silk_resampler_private_AR2cxx . . $ silk_resampler_private_AR2(c465ea2e75c83245).( S->sIIRcxx . . $ _silk_resampler_state_struct#sIIR., &buf[ S->FIR_Ordercxx . . $ _silk_resampler_state_struct#FIR_Order. ], in, S->Coefscxx . . $ _silk_resampler_state_struct#Coefs., nSamplesIn ); |
| 173 | |
| 174 | max_index_Q16 = silk_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:503:9`!( nSamplesIn, 16 ); |
| 175 | |
| 176 | /* Interpolate filtered signal */ |
| 177 | out = silk_resampler_private_down_FIR_INTERPOLcxx . . $ silk_resampler_private_down_FIR_INTERPOL(457d5229e09d9927).( out, buf, FIR_Coefs, S->FIR_Ordercxx . . $ _silk_resampler_state_struct#FIR_Order., |
| 178 | S->FIR_Fracscxx . . $ _silk_resampler_state_struct#FIR_Fracs., max_index_Q16, index_increment_Q16 ); |
| 179 | |
| 180 | in += nSamplesIn; |
| 181 | inLen -= nSamplesIn; |
| 182 | |
| 183 | if( inLen > 1 ) { |
| 184 | /* More iterations to do; copy last part of filtered signal to beginning of buffer */ |
| 185 | silk_memcpycxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:420:9`!( buf, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) ); |
| 186 | } else { |
| 187 | break; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /* Copy last part of filtered signal to the state for the next call */ |
| 192 | silk_memcpycxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:420:9`!( S->sFIR.i32, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) ); |
| 193 | RESTORE_STACKcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:97:9`!; |
| 194 | } |