@@ -176,11 +176,7 @@ static int have_simd(void)
176176#define VMUL_S (x , s ) vmulq_f32(x, vmovq_n_f32(s))
177177#define VREV (x ) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x)))
178178typedef float32x4_t f4 ;
179- #if 1 /* OpenMPT */
180179static int have_simd (void )
181- #else /* OpenMPT */
182- static int have_simd ()
183- #endif /* OpenMPT */
184180{ /* TODO: detect neon for !MINIMP3_ONLY_SIMD */
185181 return 1 ;
186182}
@@ -195,7 +191,7 @@ static int have_simd()
195191#define HAVE_SIMD 0
196192#endif /* !defined(MINIMP3_NO_SIMD) */
197193
198- #if defined(__ARM_ARCH ) && (__ARM_ARCH >= 6 ) && !defined(__aarch64__ ) && !defined(_M_ARM64 )
194+ #if defined(__ARM_ARCH ) && (__ARM_ARCH >= 6 ) && !defined(__aarch64__ ) && !defined(_M_ARM64 ) && !defined( __ARM_ARCH_6M__ )
199195#define HAVE_ARMV6 1
200196static __inline__ __attribute__((always_inline )) int32_t minimp3_clip_int16_arm (int32_t a )
201197{
@@ -945,15 +941,16 @@ static void L3_stereo_top_band(const float *right, const uint8_t *sfb, int nband
945941static void L3_stereo_process (float * left , const uint8_t * ist_pos , const uint8_t * sfb , const uint8_t * hdr , int max_band [3 ], int mpeg2_sh )
946942{
947943 static const float g_pan [7 * 2 ] = { 0 ,1 ,0.21132487f ,0.78867513f ,0.36602540f ,0.63397460f ,0.5f ,0.5f ,0.63397460f ,0.36602540f ,0.78867513f ,0.21132487f ,1 ,0 };
948- unsigned i , max_pos = HDR_TEST_MPEG1 (hdr ) ? 7 : 64 ;
944+ const uint8_t mpeg1 = HDR_TEST_MPEG1 (hdr );
945+ unsigned i , max_pos = mpeg1 ? 7 : 64 ;
949946
950947 for (i = 0 ; sfb [i ]; i ++ )
951948 {
952949 unsigned ipos = ist_pos [i ];
953950 if ((int )i > max_band [i % 3 ] && ipos < max_pos )
954951 {
955952 float kl , kr , s = HDR_TEST_MS_STEREO (hdr ) ? 1.41421356f : 1 ;
956- if (HDR_TEST_MPEG1 ( hdr ) )
953+ if (mpeg1 )
957954 {
958955 kl = g_pan [2 * ipos ];
959956 kr = g_pan [2 * ipos + 1 ];
@@ -1773,7 +1770,7 @@ int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_s
17731770 {
17741771 for (igr = 0 ; igr < (HDR_TEST_MPEG1 (hdr ) ? 2 : 1 ); igr ++ , pcm += 576 * info -> channels )
17751772 {
1776- memset (scratch .grbuf [ 0 ] , 0 , 576 * 2 * sizeof (float ));
1773+ memset (scratch .grbuf , 0 , sizeof (scratch . grbuf ));
17771774 L3_decode (dec , & scratch , scratch .gr_info + igr * info -> channels , info -> channels );
17781775 mp3d_synth_granule (dec -> qmf_state , scratch .grbuf [0 ], 18 , info -> channels , pcm , scratch .syn [0 ]);
17791776 }
@@ -1787,15 +1784,15 @@ int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_s
17871784 L12_scale_info sci [1 ];
17881785 L12_read_scale_info (hdr , bs_frame , sci );
17891786
1790- memset (scratch .grbuf [ 0 ] , 0 , 576 * 2 * sizeof (float ));
1787+ memset (scratch .grbuf , 0 , sizeof (scratch . grbuf ));
17911788 for (i = 0 , igr = 0 ; igr < 3 ; igr ++ )
17921789 {
17931790 if (12 == (i += L12_dequantize_granule (scratch .grbuf [0 ] + i , bs_frame , sci , info -> layer | 1 )))
17941791 {
17951792 i = 0 ;
17961793 L12_apply_scf_384 (sci , sci -> scf + igr , scratch .grbuf [0 ]);
17971794 mp3d_synth_granule (dec -> qmf_state , scratch .grbuf [0 ], 12 , info -> channels , pcm , scratch .syn [0 ]);
1798- memset (scratch .grbuf [ 0 ] , 0 , 576 * 2 * sizeof (float ));
1795+ memset (scratch .grbuf , 0 , sizeof (scratch . grbuf ));
17991796 pcm += 384 * info -> channels ;
18001797 }
18011798 if (bs_frame -> pos > bs_frame -> limit )
0 commit comments