diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-05-14 23:08:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-05-14 23:08:01 +0000 |
commit | d8085ea727f8768c3ef62d988df79cda6c052301 (patch) | |
tree | 896e0b92005e09ccb8ab3b93abc8ff16f0be49f0 /libavcodec/sh4/dsputil_align.c | |
parent | 3bb10888ff7a845efa30fd64d5978a8708db01d7 (diff) | |
download | ffmpeg-d8085ea727f8768c3ef62d988df79cda6c052301.tar.gz |
cleanup
Originally committed as revision 1882 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sh4/dsputil_align.c')
-rw-r--r-- | libavcodec/sh4/dsputil_align.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/libavcodec/sh4/dsputil_align.c b/libavcodec/sh4/dsputil_align.c index 46205602cc..a808dd1f82 100644 --- a/libavcodec/sh4/dsputil_align.c +++ b/libavcodec/sh4/dsputil_align.c @@ -26,15 +26,13 @@ #define LP(p) *(uint32_t*)(p) -#define BYTE_VEC(c) ((c)*0x01010101UL) - #define UNPACK(ph,pl,tt0,tt1) do { \ uint32_t t0,t1; t0=tt0;t1=tt1; \ - ph = ( (t0 & ~BYTE_VEC(0x03))>>2) + ( (t1 & ~BYTE_VEC(0x03))>>2); \ - pl = (t0 & BYTE_VEC(0x03)) + (t1 & BYTE_VEC(0x03)); } while(0) + ph = ( (t0 & ~BYTE_VEC32(0x03))>>2) + ( (t1 & ~BYTE_VEC32(0x03))>>2); \ + pl = (t0 & BYTE_VEC32(0x03)) + (t1 & BYTE_VEC32(0x03)); } while(0) -#define rnd_PACK(ph,pl,nph,npl) ph + nph + (((pl + npl + BYTE_VEC(0x02))>>2) & BYTE_VEC(0x03)) -#define no_rnd_PACK(ph,pl,nph,npl) ph + nph + (((pl + npl + BYTE_VEC(0x01))>>2) & BYTE_VEC(0x03)) +#define rnd_PACK(ph,pl,nph,npl) ph + nph + (((pl + npl + BYTE_VEC32(0x02))>>2) & BYTE_VEC32(0x03)) +#define no_rnd_PACK(ph,pl,nph,npl) ph + nph + (((pl + npl + BYTE_VEC32(0x01))>>2) & BYTE_VEC32(0x03)) /* little endian */ #define MERGE1(a,b,ofs) (ofs==0)?a:( ((a)>>(8*ofs))|((b)<<(32-8*ofs)) ) @@ -46,18 +44,7 @@ #define put(d,s) d = s -#define avg(d,s) d = rnd_avg2(s,d) - -static inline uint32_t rnd_avg2(uint32_t a, uint32_t b) -{ - return (a | b) - (((a ^ b) & ~BYTE_VEC(0x01)) >> 1); -} - -static inline uint32_t no_rnd_avg2(uint32_t a, uint32_t b) -{ - return (a & b) + (((a ^ b) & ~BYTE_VEC(0x01)) >> 1); -} - +#define avg(d,s) d = rnd_avg32(s,d) #define OP_C4(ofs) \ ref-=ofs; \ |