idct_blk_mmx.c: use vpx_memset instead of cast

Fix warning with -Wstrict-aliasing=1

Change-Id: Ic37013e6477cf213925830d0bd8e6f17364ff7cc
This commit is contained in:
Johann 2013-10-29 12:16:26 -07:00
parent 0f20c839d7
commit 47613d071c

View File

@ -11,6 +11,7 @@
#include "vpx_config.h"
#include "vp8_rtcd.h"
#include "vp8/common/blockd.h"
#include "vpx_mem/vpx_mem.h"
extern void vp8_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
@ -35,7 +36,7 @@ void vp8_dequant_idct_add_y_block_mmx
else if (eobs[0] == 1)
{
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dst, stride, dst, stride);
((int *)q)[0] = 0;
vpx_memset(q, 0, 2 * sizeof(q[0]));
}
if (eobs[1] > 1)
@ -44,7 +45,7 @@ void vp8_dequant_idct_add_y_block_mmx
{
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dst+4, stride,
dst+4, stride);
((int *)(q+16))[0] = 0;
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
}
if (eobs[2] > 1)
@ -53,7 +54,7 @@ void vp8_dequant_idct_add_y_block_mmx
{
vp8_dc_only_idct_add_mmx (q[32]*dq[0], dst+8, stride,
dst+8, stride);
((int *)(q+32))[0] = 0;
vpx_memset(q + 32, 0, 2 * sizeof(q[0]));
}
if (eobs[3] > 1)
@ -62,7 +63,7 @@ void vp8_dequant_idct_add_y_block_mmx
{
vp8_dc_only_idct_add_mmx (q[48]*dq[0], dst+12, stride,
dst+12, stride);
((int *)(q+48))[0] = 0;
vpx_memset(q + 48, 0, 2 * sizeof(q[0]));
}
q += 64;
@ -84,7 +85,7 @@ void vp8_dequant_idct_add_uv_block_mmx
else if (eobs[0] == 1)
{
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dstu, stride, dstu, stride);
((int *)q)[0] = 0;
vpx_memset(q, 0, 2 * sizeof(q[0]));
}
if (eobs[1] > 1)
@ -93,7 +94,7 @@ void vp8_dequant_idct_add_uv_block_mmx
{
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dstu+4, stride,
dstu+4, stride);
((int *)(q+16))[0] = 0;
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
}
q += 32;
@ -108,7 +109,7 @@ void vp8_dequant_idct_add_uv_block_mmx
else if (eobs[0] == 1)
{
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dstv, stride, dstv, stride);
((int *)q)[0] = 0;
vpx_memset(q, 0, 2 * sizeof(q[0]));
}
if (eobs[1] > 1)
@ -117,7 +118,7 @@ void vp8_dequant_idct_add_uv_block_mmx
{
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dstv+4, stride,
dstv+4, stride);
((int *)(q+16))[0] = 0;
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
}
q += 32;