Skip to content

Commit aec2ba0

Browse files
committed
Merged revision(s) 21443 from trunk/OpenMPT:
[Var] minimp3: Update to fork <https://github.com/manxorist/minimp3/releases/tag/openmpt-2024-08-15-v2> commit 30b5aea9b6d000f197798ddd44476b641a4d0ba7 (2024-08-15). This applies the following pull requests: <lieff/minimp3#126>, <lieff/minimp3#96>, <lieff/minimp3#97>. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@21444 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent 73b50b7 commit aec2ba0

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

include/minimp3/OpenMPT.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
minimp3 library from https://github.com/lieff/minimp3
2-
commit 50d2aaf360a53653b718fead8e258d654c3a7e41 (2021-11-27)
2+
Fork https://github.com/manxorist/minimp3/releases/tag/openmpt-2024-08-15-v2
3+
commit 30b5aea9b6d000f197798ddd44476b641a4d0ba7 (2024-08-15)
34
The following changes have been made:
45
* minimp3.c has been added
5-
* some warnings have been fixed
6+
* The following pull rquests have been merged:
7+
* https://github.com/lieff/minimp3/pull/126
8+
* https://github.com/lieff/minimp3/pull/96
9+
* https://github.com/lieff/minimp3/pull/97
610
* all modifications are marked by /* OpenMPT */

include/minimp3/minimp3.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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)))
178178
typedef float32x4_t f4;
179-
#if 1 /* OpenMPT */
180179
static 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
200196
static __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
945941
static 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

Comments
 (0)