mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-02 16:07:42 +00:00
Make toolchain configration to fix mpg123 global and move to Makefile
This commit is contained in:
parent
b3f1b6a02e
commit
81a9f04114
@ -88,6 +88,14 @@ ifeq ($(BR2_LARGEFILE),y)
|
|||||||
TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Handle bug fixes in toolchain
|
||||||
|
ifeq ($(BR2_arm),y)
|
||||||
|
ifeq ($(BR2_GCC_VERSION_4_3_2),y)
|
||||||
|
# Removes segment violation in mpg123.
|
||||||
|
TARGET_CFLAGS+=-DARM_UNROLL_FIX
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
|
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
|
||||||
|
|
||||||
# else it's an external toolchain
|
# else it's an external toolchain
|
||||||
|
@ -11,6 +11,3 @@ config BR2_PACKAGE_MPG123_ALSA
|
|||||||
default y
|
default y
|
||||||
depends on BR2_PACKAGE_ALSA_LIB
|
depends on BR2_PACKAGE_ALSA_LIB
|
||||||
|
|
||||||
config BR2_PACKAGE_MPG123_ARM_UNROLL_FIX
|
|
||||||
bool
|
|
||||||
default y if BR2_arm && BR2_GCC_VERSION_4_3_2
|
|
||||||
|
@ -5,7 +5,7 @@ diff -urN mpg123-0.66-0rig//src/layer2.c mpg123-0.66/src/layer2.c
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+static int al_table_get_d_out;
|
+static int al_table_get_d_out;
|
||||||
+void al_table_get_d(struct al_table * al)
|
+void al_table_get_d(struct al_table * al)
|
||||||
+{
|
+{
|
||||||
@ -28,7 +28,7 @@ diff -urN mpg123-0.66-0rig//src/layer2.c mpg123-0.66/src/layer2.c
|
|||||||
if ( (ba=*bita++) )
|
if ( (ba=*bita++) )
|
||||||
{
|
{
|
||||||
k=(alloc2 = alloc1+ba)->bits;
|
k=(alloc2 = alloc1+ba)->bits;
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ al_table_get_d(alloc2);
|
+ al_table_get_d(alloc2);
|
||||||
+ d1 = al_table_get_d_out;
|
+ d1 = al_table_get_d_out;
|
||||||
+ if( (d1) < 0)
|
+ if( (d1) < 0)
|
||||||
@ -42,7 +42,7 @@ diff -urN mpg123-0.66-0rig//src/layer2.c mpg123-0.66/src/layer2.c
|
|||||||
if ( (ba=*bita++) )
|
if ( (ba=*bita++) )
|
||||||
{
|
{
|
||||||
k=(alloc2 = alloc1+ba)->bits;
|
k=(alloc2 = alloc1+ba)->bits;
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ al_table_get_d(alloc2);
|
+ al_table_get_d(alloc2);
|
||||||
+ d1 = al_table_get_d_out;
|
+ d1 = al_table_get_d_out;
|
||||||
+ if( (d1) < 0)
|
+ if( (d1) < 0)
|
||||||
@ -60,7 +60,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c mpg123-0.66/src/layer3.c
|
|||||||
static int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0};
|
static int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0};
|
||||||
static int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
static int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
-
|
-
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+extern int arm_funroll_data;
|
+extern int arm_funroll_data;
|
||||||
+extern void arm_funroll_fix(short *val);
|
+extern void arm_funroll_fix(short *val);
|
||||||
+#endif
|
+#endif
|
||||||
@ -71,7 +71,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c mpg123-0.66/src/layer3.c
|
|||||||
step = 3;
|
step = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ {
|
+ {
|
||||||
+ register short *val = h->table;
|
+ register short *val = h->table;
|
||||||
+ REFRESH_MASK;
|
+ REFRESH_MASK;
|
||||||
@ -104,7 +104,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c mpg123-0.66/src/layer3.c
|
|||||||
v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
|
v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
|
||||||
|
|
||||||
}
|
}
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ {
|
+ {
|
||||||
+ register short *val = h->table;
|
+ register short *val = h->table;
|
||||||
+ REFRESH_MASK;
|
+ REFRESH_MASK;
|
||||||
@ -789,7 +789,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c~ mpg123-0.66/src/layer3.c~
|
|||||||
+
|
+
|
||||||
+static int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0};
|
+static int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0};
|
||||||
+static int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
+static int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+extern int arm_funroll_data;
|
+extern int arm_funroll_data;
|
||||||
+extern void arm_funroll_fix(short *val);
|
+extern void arm_funroll_fix(short *val);
|
||||||
+#endif
|
+#endif
|
||||||
@ -1081,7 +1081,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c~ mpg123-0.66/src/layer3.c~
|
|||||||
+ v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
|
+ v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
|
||||||
+
|
+
|
||||||
+ }
|
+ }
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ {
|
+ {
|
||||||
+ register short *val = h->table;
|
+ register short *val = h->table;
|
||||||
+ REFRESH_MASK;
|
+ REFRESH_MASK;
|
||||||
@ -1171,7 +1171,7 @@ diff -urN mpg123-0.66-0rig//src/layer3.c~ mpg123-0.66/src/layer3.c~
|
|||||||
+ register short *val = h->table,a;
|
+ register short *val = h->table,a;
|
||||||
+
|
+
|
||||||
+ REFRESH_MASK;
|
+ REFRESH_MASK;
|
||||||
+#if defined(MPG123_ARM_UNROLL_FIX)
|
+#if defined(ARM_UNROLL_FIX)
|
||||||
+ do {
|
+ do {
|
||||||
+ arm_funroll_fix(val); val++;
|
+ arm_funroll_fix(val); val++;
|
||||||
+ a = arm_funroll_data;
|
+ a = arm_funroll_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user