| 1 |
diff -up ffmpeg-0.5.1/libavcodec/x86/fft_mmx.asm.textrel ffmpeg-0.5.1/libavcodec/x86/fft_mmx.asm
|
| 2 |
--- ffmpeg-0.5.1/libavcodec/x86/fft_mmx.asm.textrel 2009-02-13 01:57:22.000000000 +0100
|
| 3 |
+++ ffmpeg-0.5.1/libavcodec/x86/fft_mmx.asm 2010-03-05 21:40:24.000000000 +0100
|
| 4 |
@@ -417,18 +417,23 @@ DECL_PASS pass_interleave_3dn, PASS_BIG
|
| 5 |
%define pass_3dn2 pass_3dn
|
| 6 |
%define pass_interleave_3dn2 pass_interleave_3dn
|
| 7 |
|
| 8 |
+%ifdef PIC
|
| 9 |
+%define SECTION_REL - $$
|
| 10 |
+%else
|
| 11 |
+%define SECTION_REL
|
| 12 |
+%endif
|
| 13 |
|
| 14 |
%macro DECL_FFT 2-3 ; nbits, cpu, suffix
|
| 15 |
-%xdefine list_of_fft fft4%2, fft8%2
|
| 16 |
+%xdefine list_of_fft fft4%2 SECTION_REL, fft8%2 SECTION_REL
|
| 17 |
%if %1==5
|
| 18 |
-%xdefine list_of_fft list_of_fft, fft16%2
|
| 19 |
+%xdefine list_of_fft list_of_fft, fft16%2 SECTION_REL
|
| 20 |
%endif
|
| 21 |
|
| 22 |
%assign n 1<<%1
|
| 23 |
%rep 17-%1
|
| 24 |
%assign n2 n/2
|
| 25 |
%assign n4 n/4
|
| 26 |
-%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2
|
| 27 |
+%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2 SECTION_REL
|
| 28 |
|
| 29 |
align 16
|
| 30 |
fft %+ n %+ %3%2:
|
| 31 |
@@ -460,6 +465,10 @@ section .text
|
| 32 |
cglobal fft_dispatch%3%2, 2,5,0, z, nbits
|
| 33 |
lea r2, [dispatch_tab%3%2 GLOBAL]
|
| 34 |
mov r2, [r2 + (nbitsq-2)*gprsize]
|
| 35 |
+%ifdef PIC
|
| 36 |
+ lea r3, [$$ GLOBAL]
|
| 37 |
+ add r2, r3
|
| 38 |
+%endif
|
| 39 |
call r2
|
| 40 |
RET
|
| 41 |
%endmacro ; DECL_FFT
|