# HG changeset patch # User mru # Date 1271070888 0 # Node ID 93db59ec6eb710834d76d7010369ccbf7423a4bb # Parent 414a7cdaa54d806639ad0231f32c5ae2eba1067e DCA: use some type-punning in qmf_32_subbands() diff -r 414a7cdaa54d -r 93db59ec6eb7 dca.c --- a/dca.c Sun Apr 11 22:32:04 2010 +0000 +++ b/dca.c Mon Apr 12 11:14:48 2010 +0000 @@ -30,6 +30,7 @@ #include #include +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "dsputil.h" #include "fft.h" @@ -770,8 +771,8 @@ for (subindex = 0; subindex < 8; subindex++) { /* Load in one sample from each subband and clear inactive subbands */ for (i = 0; i < s->subband_activity[chans]; i++){ - if((i-1)&2) s->raXin[i] = -samples_in[i][subindex]; - else s->raXin[i] = samples_in[i][subindex]; + uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30; + AV_WN32A(&s->raXin[i], v); } for (; i < 32; i++) s->raXin[i] = 0.0;