On Sat, Jan 5, 2013 at 12:17 PM, Ronald S. Bultje <[email protected]> wrote:
> Hi,
>
> On Sat, Jan 5, 2013 at 9:01 AM, Daniel Kang <[email protected]> wrote:
>> --- a/libavfilter/x86/yadif.c
>> +++ b/libavfilter/x86/yadif.c
>> @@ -26,49 +26,34 @@
>>  #include "libavcodec/x86/dsputil_mmx.h"
>>  #include "libavfilter/yadif.h"
>>
>> -#if HAVE_INLINE_ASM
>> +#if HAVE_YASM
>>
>>  DECLARE_ASM_CONST(16, const xmm_reg, pb_1) = {0x0101010101010101ULL, 
>> 0x0101010101010101ULL};
>>  DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 
>> 0x0001000100010001ULL};
>
> Move to .asm file also (SECTION_RODATA). Just remove the whole _mmx.c
> file except for the glue bits.

Fixed.

>> +%macro YADIF 0
>> +cglobal yadif_filter_line, 9, 9, 8, dst, prev, cur, next, w, prefs, \
>> +                                    mrefs, parity, mode
>> +%assign pad 16*5-gprsize-(stack_offset&15)
>> +    SUB        rsp, pad
> [..]
>> +    ADD        rsp, pad
>> +    RET
>> +%endmacro
>
> cglobal yadif_filter_line, 9, 9, 8, 16*5, names...

Fixed.

> That way stack alignment works on msvc also. Now, this is harder
> because you'll need to use only 6 regs on msvc (instead of 7), because
> the 7th one needs to hold the stack pointer. You can test locally by
> changing HAVE_INLINE_ASM from 1 to 0 in your config.{mak,h,asm}.

Sorry, how changing that test MSVC?

>> +INIT_XMM sse2
>> +YADIF
>> +INIT_MMX mmxext
>> +YADIF
>
> %if ARCH_X86_32
> INIT_MMX mmxext
> YADIF
> %endif
>
> Same change in c wrapper glue, gives smaller object files.

Fixed.

> Is there a fate test?

Yes, filter-yadif-mode1 and filter-yadif-mode0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to