[FFmpeg-devel] [PATCH] x86: sbrdsp: force PIC addressing for Win64
Christophe Gisquet
christophe.gisquet at gmail.com
Tue May 7 22:35:22 CEST 2013
MSVC complains about the 32bits addressing, while mingw/gcc does not.
---
libavcodec/x86/sbrdsp.asm | 13 ++-----------
libavcodec/x86/sbrdsp_init.c | 2 --
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm
index 624f9a3..9234876 100644
--- a/libavcodec/x86/sbrdsp.asm
+++ b/libavcodec/x86/sbrdsp.asm
@@ -322,12 +322,6 @@ cglobal sbr_qmf_pre_shuffle, 1,4,7,z
movq [r2q], m2
REP_RET
-%if WIN64 == 0
-
-%if WIN64
-%define NREGS 0
-%define NOISE_TABLE sbr_noise_table
-%else
%ifdef PIC
%define NREGS 1
%if UNIX64
@@ -339,10 +333,9 @@ cglobal sbr_qmf_pre_shuffle, 1,4,7,z
%define NREGS 0
%define NOISE_TABLE sbr_noise_table
%endif
-%endif
%macro LOAD_NST 1
-%if NREGS
+%ifdef PIC
lea NOISE_TABLE, [%1]
mova m0, [kxq + NOISE_TABLE]
%else
@@ -391,7 +384,7 @@ apply_noise_main:
%endif
dec noiseq
shl count, 2
-%if NREGS
+%ifdef PIC
lea NOISE_TABLE, [sbr_noise_table]
%endif
lea Yq, [Yq + 2*count]
@@ -432,8 +425,6 @@ apply_noise_main:
jl .loop
RET
-%endif ; WIN64 == 0
-
INIT_XMM sse
cglobal sbr_qmf_deint_neg, 2,4,4,v,src,vrev,c
%define COUNT 32*4
diff --git a/libavcodec/x86/sbrdsp_init.c b/libavcodec/x86/sbrdsp_init.c
index 81bbe49..37a6655 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -71,11 +71,9 @@ av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s)
if (EXTERNAL_SSE2(mm_flags)) {
s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_sse2;
s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_sse2;
-#if ARCH_X86_32 || !defined(_WIN32)
s->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_sse2;
s->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_sse2;
s->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_sse2;
s->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_sse2;
-#endif
}
}
--
1.8.0.msysgit.0
More information about the ffmpeg-devel
mailing list