diff options
| author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-07-19 20:30:38 +0000 |
|---|---|---|
| committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-07-19 20:30:38 +0000 |
| commit | fcc9a6282dd3c541055636ac49882d1639da251b (patch) | |
| tree | 588b324e232caccf8085c85c7119d8d29ee2b6e8 /src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c | |
| parent | 6bfc655ee19aa82cce3277e6f9c861661cca5fb4 (diff) | |
| download | xine-lib-fcc9a6282dd3c541055636ac49882d1639da251b.tar.gz xine-lib-fcc9a6282dd3c541055636ac49882d1639da251b.tar.bz2 | |
here is cvs update people requested - somebody please check for gcc4 compatibility
CVS patchset: 7668
CVS date: 2005/07/19 20:30:38
Diffstat (limited to 'src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c')
| -rw-r--r-- | src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c b/src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c index 889fd2ae1..293a2f970 100644 --- a/src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c +++ b/src/libffmpeg/libavcodec/alpha/simple_idct_alpha.c @@ -235,25 +235,22 @@ static inline void idct_col2(DCTELEM *col) { int i; uint64_t l, r; - uint64_t *lcol = (uint64_t *) col; for (i = 0; i < 8; ++i) { - int_fast32_t a0 = col[0] + (1 << (COL_SHIFT - 1)) / W4; + int_fast32_t a0 = col[i] + (1 << (COL_SHIFT - 1)) / W4; a0 *= W4; - col[0] = a0 >> COL_SHIFT; - ++col; + col[i] = a0 >> COL_SHIFT; } - l = lcol[0]; - r = lcol[1]; - lcol[ 2] = l; lcol[ 3] = r; - lcol[ 4] = l; lcol[ 5] = r; - lcol[ 6] = l; lcol[ 7] = r; - lcol[ 8] = l; lcol[ 9] = r; - lcol[10] = l; lcol[11] = r; - lcol[12] = l; lcol[13] = r; - lcol[14] = l; lcol[15] = r; + l = ldq(col + 0 * 4); r = ldq(col + 1 * 4); + stq(l, col + 2 * 4); stq(r, col + 3 * 4); + stq(l, col + 4 * 4); stq(r, col + 5 * 4); + stq(l, col + 6 * 4); stq(r, col + 7 * 4); + stq(l, col + 8 * 4); stq(r, col + 9 * 4); + stq(l, col + 10 * 4); stq(r, col + 11 * 4); + stq(l, col + 12 * 4); stq(r, col + 13 * 4); + stq(l, col + 14 * 4); stq(r, col + 15 * 4); } void simple_idct_axp(DCTELEM *block) @@ -275,22 +272,20 @@ void simple_idct_axp(DCTELEM *block) if (rowsZero) { idct_col2(block); } else if (rowsConstant) { - uint64_t *lblock = (uint64_t *) block; - idct_col(block); for (i = 0; i < 8; i += 2) { - uint64_t v = (uint16_t) block[i * 8]; - uint64_t w = (uint16_t) block[i * 8 + 8]; + uint64_t v = (uint16_t) block[0]; + uint64_t w = (uint16_t) block[8]; v |= v << 16; w |= w << 16; v |= v << 32; w |= w << 32; - lblock[0] = v; - lblock[1] = v; - lblock[2] = w; - lblock[3] = w; - lblock += 4; + stq(v, block + 0 * 4); + stq(v, block + 1 * 4); + stq(w, block + 2 * 4); + stq(w, block + 3 * 4); + block += 4 * 4; } } else { for (i = 0; i < 8; i++) |
