Commit 47613d07 authored by Johann's avatar Johann
Browse files

idct_blk_mmx.c: use vpx_memset instead of cast

Fix warning with -Wstrict-aliasing=1

Change-Id: Ic37013e6477cf213925830d0bd8e6f17364ff7cc
Showing with 9 additions and 8 deletions
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment