Limits the propagated error in the upcoming synth_filter_float checkasm
test.
---
libavcodec/arm/asm-offsets.h | 3 +++
libavcodec/arm/dcadsp_init_arm.c | 8 ++++++++
libavcodec/arm/synth_filter_neon.S | 5 ++++-
libavcodec/arm/synth_filter_vfp.S | 5 ++++-
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/libavcodec/arm/asm-offsets.h b/libavcodec/arm/asm-offsets.h
index 0ea2f04..62cdd15 100644
--- a/libavcodec/arm/asm-offsets.h
+++ b/libavcodec/arm/asm-offsets.h
@@ -29,4 +29,7 @@
#define H263_AIC 0x40
#define INTER_SCANTAB_RASTER_END 0x88
+/* FFTContex */
+#define IMDCT_HALF 0x2c
+
#endif /* AVCODEC_ARM_ASM_OFFSETS_H */
diff --git a/libavcodec/arm/dcadsp_init_arm.c b/libavcodec/arm/dcadsp_init_arm.c
index 252f4ae..0d4c4c7 100644
--- a/libavcodec/arm/dcadsp_init_arm.c
+++ b/libavcodec/arm/dcadsp_init_arm.c
@@ -21,8 +21,16 @@
#include "config.h"
#include "libavutil/arm/cpu.h"
+#include "libavutil/internal.h"
#include "libavutil/attributes.h"
#include "libavcodec/dcadsp.h"
+#include "libavcodec/fft.h"
+
+#include "asm-offsets.h"
+
+#if HAVE_NEON || HAVE_VFP
+AV_CHECK_OFFSET(FFTContext, imdct_half, IMDCT_HALF);
+#endif
void ff_dca_lfe_fir0_neon(float *out, const float *in, const float *coefs);
void ff_dca_lfe_fir1_neon(float *out, const float *in, const float *coefs);
diff --git a/libavcodec/arm/synth_filter_neon.S
b/libavcodec/arm/synth_filter_neon.S
index 62bb667..5e4ae57 100644
--- a/libavcodec/arm/synth_filter_neon.S
+++ b/libavcodec/arm/synth_filter_neon.S
@@ -18,12 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "asm-offsets.h"
+
#include "libavutil/arm/asm.S"
function ff_synth_filter_float_neon, export=1
push {r3-r11,lr}
ldr r4, [r2] @ synth_buf_offset
+ ldr r3, [r0, #IMDCT_HALF] @ load imdct_half function
pointer
add r1, r1, r4, lsl #2 @ synth_buf
sub r12, r4, #32
bfc r12, #9, #23
@@ -34,7 +37,7 @@ function ff_synth_filter_float_neon, export=1
mov r9, r1 @ synth_buf
VFP vpush {d0}
- bl X(ff_imdct_half_neon)
+ blx r3
VFP vpop {d0}
pop {r3}
diff --git a/libavcodec/arm/synth_filter_vfp.S
b/libavcodec/arm/synth_filter_vfp.S
index 5d79e50..34e9329 100644
--- a/libavcodec/arm/synth_filter_vfp.S
+++ b/libavcodec/arm/synth_filter_vfp.S
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "asm-offsets.h"
+
#include "libavutil/arm/asm.S"
IMDCT .req r0
@@ -130,9 +132,10 @@ function ff_synth_filter_float_vfp, export=1
sub lr, lr, #32
and lr, lr, #512-32
str lr, [P_SB_OFF] @ rotate offset, modulo buffer size,
ready for next call
+ ldr r3, [IMDCT, #IMDCT_HALF]
ldr a3, [sp, #(16+6+2)*4] @ fetch in from stack, to pass to
imdct_half
VFP vmov s16, SCALE @ imdct_half is free to corrupt s0,
but it contains one of our arguments in hardfp case
- bl X(ff_imdct_half_vfp)
+ blx r3
VFP vmov SCALE, s16
fmrx OLDFPSCR, FPSCR
--
2.6.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel