gecko/media/libtheora/lib/x86/mmxfrag.h
Matthew Gregan 2a88d989cb Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc
--HG--
rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c
rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h
rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c
rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h
rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h
rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c
rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c
rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h
rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c
rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c
rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h
rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c
rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c
rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h
rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h
rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c
rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c
rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c
rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h
rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c
rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h
rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c
rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c
rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c
rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c
rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h
rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c
rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c
rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c
rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c
rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h
rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-28 11:14:21 +13:00

65 lines
1.9 KiB
C

#if !defined(_x86_mmxfrag_H)
# define _x86_mmxfrag_H (1)
# include <stddef.h>
# include "x86int.h"
#if defined(OC_X86_ASM)
/*Copies an 8x8 block of pixels from _src to _dst, assuming _ystride bytes
between rows.*/
#define OC_FRAG_COPY_MMX(_dst,_src,_ystride) \
do{ \
const unsigned char *src; \
unsigned char *dst; \
ptrdiff_t ystride3; \
src=(_src); \
dst=(_dst); \
__asm__ __volatile__( \
/*src+0*ystride*/ \
"movq (%[src]),%%mm0\n\t" \
/*src+1*ystride*/ \
"movq (%[src],%[ystride]),%%mm1\n\t" \
/*ystride3=ystride*3*/ \
"lea (%[ystride],%[ystride],2),%[ystride3]\n\t" \
/*src+2*ystride*/ \
"movq (%[src],%[ystride],2),%%mm2\n\t" \
/*src+3*ystride*/ \
"movq (%[src],%[ystride3]),%%mm3\n\t" \
/*dst+0*ystride*/ \
"movq %%mm0,(%[dst])\n\t" \
/*dst+1*ystride*/ \
"movq %%mm1,(%[dst],%[ystride])\n\t" \
/*Pointer to next 4.*/ \
"lea (%[src],%[ystride],4),%[src]\n\t" \
/*dst+2*ystride*/ \
"movq %%mm2,(%[dst],%[ystride],2)\n\t" \
/*dst+3*ystride*/ \
"movq %%mm3,(%[dst],%[ystride3])\n\t" \
/*Pointer to next 4.*/ \
"lea (%[dst],%[ystride],4),%[dst]\n\t" \
/*src+0*ystride*/ \
"movq (%[src]),%%mm0\n\t" \
/*src+1*ystride*/ \
"movq (%[src],%[ystride]),%%mm1\n\t" \
/*src+2*ystride*/ \
"movq (%[src],%[ystride],2),%%mm2\n\t" \
/*src+3*ystride*/ \
"movq (%[src],%[ystride3]),%%mm3\n\t" \
/*dst+0*ystride*/ \
"movq %%mm0,(%[dst])\n\t" \
/*dst+1*ystride*/ \
"movq %%mm1,(%[dst],%[ystride])\n\t" \
/*dst+2*ystride*/ \
"movq %%mm2,(%[dst],%[ystride],2)\n\t" \
/*dst+3*ystride*/ \
"movq %%mm3,(%[dst],%[ystride3])\n\t" \
:[dst]"+r"(dst),[src]"+r"(src),[ystride3]"=&r"(ystride3) \
:[ystride]"r"((ptrdiff_t)(_ystride)) \
:"memory" \
); \
} \
while(0)
# endif
#endif