[FFmpeg-devel] [PATCH] Higher bit-depth x86 SIMD assembly for yadif
Michael Niedermayer
michaelni at gmx.at
Fri Jan 27 06:21:56 CET 2012
On Fri, Jan 27, 2012 at 06:20:11AM +0100, Michael Niedermayer wrote:
> 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.
of course putting it under ARCH_X86_64 sucks for the people who have
32bit machines but i guess that goes without saying ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- 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/465020af/attachment.asc>
More information about the ffmpeg-devel
mailing list