[FFmpeg-devel] [PATCH] Higher bit-depth x86 SIMD assembly for yadif
Michael Niedermayer
michaelni at gmx.at
Fri Jan 27 06:20:11 CET 2012
On Thu, Jan 26, 2012 at 06:40:39PM +0100, James Darnley wrote:
> 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?
ive no specific suggestion, but iam happy with anything that works.
managing registers in a more manual fashion may help but is possibly
not easy.
simply putting the code under #if ARCH_X86_64 or leaving it split
if you plan to convert it to yasm are probably easier.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120127/47917c82/attachment.asc>
More information about the ffmpeg-devel
mailing list