summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2013-10-29 12:05:27 -0700
committerJohann <johannkoenig@google.com>2013-10-29 13:51:51 -0700
commit0f20c839d7f5c6944ce5eac5a391aa441991cd82 (patch)
tree40b626166d5562ed7153a3228bec407160e564db /vp8/decoder
parent7e5f5e26ba508ef85a9dd0837031e28cc9b9e6c2 (diff)
downloadlibvpx-0f20c839d7f5c6944ce5eac5a391aa441991cd82.tar
libvpx-0f20c839d7f5c6944ce5eac5a391aa441991cd82.tar.gz
libvpx-0f20c839d7f5c6944ce5eac5a391aa441991cd82.tar.bz2
libvpx-0f20c839d7f5c6944ce5eac5a391aa441991cd82.zip
decodframe.c: use vpx_memset instead of cast
Fix warning with -Wstrict-aliasing=1 Change-Id: Ic4e511af924247800e87d5f990636565f3dd91d2
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/decodframe.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 50ee9c52f..16da78a2c 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -211,7 +211,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
(b->qcoeff[0] * DQC[0],
dst, dst_stride,
dst, dst_stride);
- ((int *)b->qcoeff)[0] = 0;
+ vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
}
}
}
@@ -248,21 +248,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
vp8_short_inv_walsh4x4(&b->dqcoeff[0],
xd->qcoeff);
- ((int *)b->qcoeff)[0] = 0;
- ((int *)b->qcoeff)[1] = 0;
- ((int *)b->qcoeff)[2] = 0;
- ((int *)b->qcoeff)[3] = 0;
- ((int *)b->qcoeff)[4] = 0;
- ((int *)b->qcoeff)[5] = 0;
- ((int *)b->qcoeff)[6] = 0;
- ((int *)b->qcoeff)[7] = 0;
+ vpx_memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
}
else
{
b->dqcoeff[0] = b->qcoeff[0] * xd->dequant_y2[0];
vp8_short_inv_walsh4x4_1(&b->dqcoeff[0],
xd->qcoeff);
- ((int *)b->qcoeff)[0] = 0;
+ vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
}
/* override the dc dequant constant in order to preserve the