Skip to content

Commit

Permalink
Merge pull request #83 from xiaoxiang781216/warn
Browse files Browse the repository at this point in the history
fix warning with clang on HiFi4
  • Loading branch information
kn007 committed Sep 10, 2022
2 parents d216599 + ac5efef commit 07bfa0f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion silk/interface/SKP_Silk_SDK_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void SKP_Silk_SDK_get_TOC(
/* Get the version number */
/**************************/
/* Return a pointer to string specifying the version */
const char *SKP_Silk_SDK_get_version();
const char *SKP_Silk_SDK_get_version(void);

#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions silk/src/SKP_Silk_AsmPreproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#elif defined (__ARM_ARCH_7A__)
#define EMBEDDED_ARM 6
#define EMBEDDED_ARMv6
#else
#define EMBEDDED_ARM 0
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/src/SKP_Silk_Inlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ SKP_INLINE SKP_int32 SKP_Silk_SIN_APPROX_Q24( /* O returns approximate
}
if( x < 1100 ) {
/* Special case: high accuracy */
return SKP_SMLAWB( -1 << 24, SKP_MUL( x, x ), 5053 );
return SKP_SMLAWB( -(1 << 24), SKP_MUL( x, x ), 5053 );
}
x = SKP_SMULWB( SKP_LSHIFT( x, 8 ), x ); /* contains x^2 in Q20 */
y_Q30 = SKP_SMLAWB( -SKP_SIN_APPROX_CONST2, x, -SKP_SIN_APPROX_CONST3 );
Expand Down
2 changes: 1 addition & 1 deletion silk/src/SKP_Silk_NSQ.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ SKP_INLINE void SKP_Silk_noise_shape_quantizer(
/* Flip sign depending on dither */
r_Q10 = ( r_Q10 ^ dither ) - dither;
r_Q10 = SKP_SUB32( r_Q10, offset_Q10 );
r_Q10 = SKP_LIMIT_32( r_Q10, -64 << 10, 64 << 10 );
r_Q10 = SKP_LIMIT_32( r_Q10, -(64 << 10), 64 << 10 );

/* Quantize */
q_Q0 = 0;
Expand Down
2 changes: 1 addition & 1 deletion silk/src/SKP_Silk_NSQ_del_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ SKP_INLINE void SKP_Silk_noise_shape_quantizer_del_dec(
/* Flip sign depending on dither */
r_Q10 = ( r_Q10 ^ dither ) - dither;
r_Q10 = SKP_SUB32( r_Q10, offset_Q10 );
r_Q10 = SKP_LIMIT_32( r_Q10, -64 << 10, 64 << 10 );
r_Q10 = SKP_LIMIT_32( r_Q10, -(64 << 10), 64 << 10 );

/* Find two quantization level candidates and measure their rate-distortion */
if( r_Q10 < -1536 ) {
Expand Down
1 change: 1 addition & 0 deletions silk/src/SKP_Silk_SigProc_FIX.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ extern "C"
# include "SKP_Silk_macros.h"
# endif
#else
# define EMBEDDED_ARM 0
# include "SKP_Silk_macros.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/src/SKP_Silk_ana_filt_bank_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Coefficients for 2-band filter bank based on first-order allpass filters */
// old
static SKP_int16 A_fb1_20[ 1 ] = { 5394 << 1 };
static SKP_int16 A_fb1_21[ 1 ] = { 20623 << 1 }; /* wrap-around to negative number is intentional */
static SKP_int16 A_fb1_21[ 1 ] = { (SKP_int16) (20623 << 1) }; /* wrap-around to negative number is intentional */

/* Split signal into two decimated bands using first-order allpass filters */
void SKP_Silk_ana_filt_bank_1(
Expand Down

0 comments on commit 07bfa0f

Please sign in to comment.