[FFmpeg-devel] [PATCH] Port x264 SSE2 deblocking code to H.264 decoder
Loren Merritt
lorenm
Wed Dec 17 06:00:45 CET 2008
On Wed, 17 Dec 2008, Michael Niedermayer wrote:
>> @@ -275,10 +274,10 @@
>>
>> %ifdef ARCH_X86_64
>> ;-----------------------------------------------------------------------------
>> -; void x264_deblock_v_luma_sse2( uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0 )
>> +; void h264_v_loop_filter_luma_sse2( uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0 )
>> ;-----------------------------------------------------------------------------
>> INIT_XMM
>> -cglobal x264_deblock_v_luma_sse2
>> +cglobal h264_v_loop_filter_luma_sse2
>> movd m8, [r4] ; tc0
>> lea r4, [r1*3]
>> dec r2d ; alpha-1
>
> would it be possible to use some kind of macro to give these functions
> differnt prefixes so the .asm files could be identical?
Like this? then it'll be ff_x264_deblock_v_luma_sse2
--Loren Merritt
-------------- next part --------------
diff --git a/libavcodec/i386/dsputil_yasm.asm b/libavcodec/i386/dsputil_yasm.asm
index 2d7d465..974491f 100644
--- a/libavcodec/i386/dsputil_yasm.asm
+++ b/libavcodec/i386/dsputil_yasm.asm
@@ -38,7 +38,7 @@ section .text align=16
%macro FLOAT_TO_INT16_INTERLEAVE6 1
; void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len)
-cglobal ff_float_to_int16_interleave6_%1, 2,7,0, dst, src, src1, src2, src3, src4, src5
+cglobal float_to_int16_interleave6_%1, 2,7,0, dst, src, src1, src2, src3, src4, src5
%ifdef ARCH_X86_64
%define lend r10d
mov lend, r2d
diff --git a/libavcodec/i386/fft_mmx.asm b/libavcodec/i386/fft_mmx.asm
index c0a9bd5..3971867 100644
--- a/libavcodec/i386/fft_mmx.asm
+++ b/libavcodec/i386/fft_mmx.asm
@@ -451,7 +451,7 @@ dispatch_tab%3%2: pointer list_of_fft
; On x86_32, this function does the register saving and restoring for all of fft.
; The others pass args in registers and don't spill anything.
-cglobal ff_fft_dispatch%3%2, 2,5,0, z, nbits
+cglobal fft_dispatch%3%2, 2,5,0, z, nbits
lea r2, [dispatch_tab%3%2 GLOBAL]
mov r2, [r2 + (nbitsq-2)*gprsize]
call r2
diff --git a/libavcodec/i386/x86inc.asm b/libavcodec/i386/x86inc.asm
index 54c4679..3729b5b 100644
--- a/libavcodec/i386/x86inc.asm
+++ b/libavcodec/i386/x86inc.asm
@@ -370,20 +370,14 @@ DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28]
; Symbol prefix for C linkage
%macro cglobal 1-2+
+ %xdefine %1 ff_%1
+ %ifdef PREFIX
+ %xdefine %1 _ %+ %1
+ %endif
%ifidn __OUTPUT_FORMAT__,elf
- %ifdef PREFIX
- global _%1:function hidden
- %define %1 _%1
- %else
- global %1:function hidden
- %endif
+ global %1:function hidden
%else
- %ifdef PREFIX
- global _%1
- %define %1 _%1
- %else
- global %1
- %endif
+ global %1
%endif
align function_align
%1:
More information about the ffmpeg-devel
mailing list