[FFmpeg-devel] [PATCH] Higher bit-depth x86 SIMD assembly for yadif

James Darnley james.darnley at gmail.com
Thu Jan 26 18:40:39 CET 2012


On 2012-01-23 07:20, Michael Niedermayer wrote:
>>> @@ -261,6 +263,7 @@ void RENAME(ff_yadif_filter_line_16bit)(uint8_t *dst,
>>>              PMAXSD(MM"2",MM"1",MM"7")\
>>>              PMINSD(MM"3",MM"1",MM"7")\
>>>              PACK(MM"1")\
>>> +            MOVH" "MM"1, (%[dst])"\
>>>  \
>>>              :\
>>>              :[tmpA] "r"(tmpA),\
>>> @@ -269,9 +272,10 @@ void RENAME(ff_yadif_filter_line_16bit)(uint8_t *dst,
>>>               [next] "r"(next),\
>>>               [prefs]"r"(prefs),\
>>>               [mrefs]"r"(mrefs),\
>>> -             [mode] "g"(mode)\
>>> +             [mode] "g"(mode),\
>>> +             [dst]  "r"(dst)\
>>> +            :CLOBBER_LIST\
>>>          );\
> 
> this uses quite a few registers, i suspect it wont reliably compile
> on x86_32,

You are, no doubt, correct.  I tried using "=m"(*dst) as an output
constraint (like in the original code) and that did give me an error
about not being able to find a
register.  Specifically:
> error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
> error: ‘asm’ operand has impossible constraints

Do you have any suggestions?  Or should I just manage a register myself?


More information about the ffmpeg-devel mailing list