| OLD | NEW |
| 1 /*********************************************************************** | 1 /*********************************************************************** |
| 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. | 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
| 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 23 matching lines...) Expand all Loading... |
| 34 /* Convert input to a log scale */ | 34 /* Convert input to a log scale */ |
| 35 opus_int32 silk_lin2log( | 35 opus_int32 silk_lin2log( |
| 36 const opus_int32 inLin /* I input in linear scale
*/ | 36 const opus_int32 inLin /* I input in linear scale
*/ |
| 37 ) | 37 ) |
| 38 { | 38 { |
| 39 opus_int32 lz, frac_Q7; | 39 opus_int32 lz, frac_Q7; |
| 40 | 40 |
| 41 silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); | 41 silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); |
| 42 | 42 |
| 43 /* Piece-wise parabolic approximation */ | 43 /* Piece-wise parabolic approximation */ |
| 44 return silk_LSHIFT( 31 - lz, 7 ) + silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7,
128 - frac_Q7 ), 179 ); | 44 return silk_ADD_LSHIFT32( silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - fra
c_Q7 ), 179 ), 31 - lz, 7 ); |
| 45 } | 45 } |
| 46 | 46 |
| OLD | NEW |