diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-05-17 13:01:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-05-17 13:01:01 +0000 |
commit | a7bd879798eb9b87c9558805b023082b9967fe1a (patch) | |
tree | 9c8ac8ed62de86f883c6c766c085d326728e6eb0 /libavcodec/i386/dsputil_mmx.c | |
parent | 96c7b5356144d09ab42db283d5cfc1083d44395b (diff) | |
download | ffmpeg-a7bd879798eb9b87c9558805b023082b9967fe1a.tar.gz |
shared lib support (req by kabi) ...
Originally committed as revision 510 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx.c')
-rw-r--r-- | libavcodec/i386/dsputil_mmx.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index d01e6afcd7..1354e188b6 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -50,9 +50,9 @@ void ff_mmx_idct(DCTELEM *block); void ff_mmxext_idct(DCTELEM *block); /* pixel operations */ -static const unsigned long long int mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101LL; -static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001LL; -static const unsigned long long int mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002LL; +static const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL; +static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; +static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL; //static const unsigned short mm_wone[4] __attribute__ ((aligned(8))) = { 0x1, 0x1, 0x1, 0x1 }; //static const unsigned short mm_wtwo[4] __attribute__ ((aligned(8))) = { 0x2, 0x2, 0x2, 0x2 }; @@ -62,6 +62,7 @@ static const unsigned long long int mm_wtwo __attribute__ ((aligned(8))) = 0x000 #ifndef PIC #define MOVQ_WONE(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_wone)) #define MOVQ_WTWO(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_wtwo)) +#define MOVQ_BONE(regd) "movq "MANGLE(mm_bone)", "#regd" \n\t" #else // for shared library it's better to use this way for accessing constants // pcmpeqd -> -1 @@ -75,8 +76,14 @@ static const unsigned long long int mm_wtwo __attribute__ ((aligned(8))) = 0x000 "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ "psrlw $15, %%" #regd " \n\t" \ "psllw $1, %%" #regd ::) + +#define MOVQ_BONE(regd) \ + "pcmpeqd " #regd ", " #regd " \n\t" \ + "psrlw $15, " #regd " \n\t"\ + "packuswb " #regd ", " #regd " \n\t" #endif + /***********************************/ /* 3Dnow specific */ |