summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-26 14:23:54 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-26 14:24:31 +0100
commit075eaf8d6afcbce4a17380231c80a1c945e53239 (patch)
treed41981ac108ae268e0e3659ec4d561ef79fa50e4 /libavcodec
parent955c7c7bc69a50a78c93dc4e950c75e4d93de538 (diff)
vc1dsp: fix the warning fix, make it work with --disable-asm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dsp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c
index 391d4c3895..6963736578 100644
--- a/libavcodec/vc1dsp.c
+++ b/libavcodec/vc1dsp.c
@@ -562,7 +562,7 @@ static av_always_inline int vc1_mspel_filter(const uint8_t *src, int stride, int
/** Function used to do motion compensation with bicubic interpolation
*/
-#define VC1_MSPEL_MC(OP, OPNAME)\
+#define VC1_MSPEL_MC(OP, OP4, OPNAME)\
static av_always_inline void OPNAME ## vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int hmode, int vmode, int rnd)\
{\
int i, j;\
@@ -620,8 +620,8 @@ static av_always_inline void OPNAME ## vc1_mspel_mc(uint8_t *dst, const uint8_t
static void OPNAME ## pixels8x8_c(uint8_t *block, const uint8_t *pixels, int line_size, int rnd){\
int i;\
for(i=0; i<8; i++){\
- OP(*(block ), AV_RN32(pixels ));\
- OP(*(block+4), AV_RN32(pixels+4));\
+ OP4(*(uint32_t*)(block ), AV_RN32(pixels ));\
+ OP4(*(uint32_t*)(block+4), AV_RN32(pixels+4));\
pixels+=line_size;\
block +=line_size;\
}\
@@ -629,9 +629,11 @@ static void OPNAME ## pixels8x8_c(uint8_t *block, const uint8_t *pixels, int lin
#define op_put(a, b) a = av_clip_uint8(b)
#define op_avg(a, b) a = (a + av_clip_uint8(b) + 1) >> 1
+#define op4_avg(a, b) a = rnd_avg32(a, b)
+#define op4_put(a, b) a = b
-VC1_MSPEL_MC(op_put, put_)
-VC1_MSPEL_MC(op_avg, avg_)
+VC1_MSPEL_MC(op_put, op4_put, put_)
+VC1_MSPEL_MC(op_avg, op4_avg, avg_)
/* pixel functions - really are entry points to vc1_mspel_mc */