Revision 3d05c1fb
libavcodec/x86/fft_mmx.asm  

419  419 
%define pass_3dn2 pass_3dn 
420  420 
%define pass_interleave_3dn2 pass_interleave_3dn 
421  421  
422 
%ifdef PIC 

423 
%define SECTION_REL  $$ 

424 
%else 

425 
%define SECTION_REL 

426 
%endif 

422  427  
423  428 
%macro DECL_FFT 23 ; nbits, cpu, suffix 
424 
%xdefine list_of_fft fft4%2, fft8%2


429 
%xdefine list_of_fft fft4%2 SECTION_REL, fft8%2 SECTION_REL


425  430 
%if %1==5 
426 
%xdefine list_of_fft list_of_fft, fft16%2 

431 
%xdefine list_of_fft list_of_fft, fft16%2 SECTION_REL


427  432 
%endif 
428  433  
429  434 
%assign n 1<<%1 
430  435 
%rep 17%1 
431  436 
%assign n2 n/2 
432  437 
%assign n4 n/4 
433 
%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2 

438 
%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2 SECTION_REL


434  439  
435  440 
align 16 
436  441 
fft %+ n %+ %3%2: 
...  ...  
448  453 
%endrep 
449  454 
%undef n 
450  455  
451 
%ifidn __OUTPUT_FORMAT__,macho64 

452 
section .rodata 

453 
%endif 

454  
455  456 
align 8 
456  457 
dispatch_tab%3%2: pointer list_of_fft 
457  458  
...  ...  
462  463 
cglobal fft_dispatch%3%2, 2,5,8, z, nbits 
463  464 
lea r2, [dispatch_tab%3%2 GLOBAL] 
464  465 
mov r2, [r2 + (nbitsq2)*gprsize] 
466 
%ifdef PIC 

467 
lea r3, [$$ GLOBAL] 

468 
add r2, r3 

469 
%endif 

465  470 
call r2 
466  471 
RET 
467  472 
%endmacro ; DECL_FFT 
Also available in: Unified diff