changeset 11606:93db59ec6eb7 libavcodec

DCA: use some type-punning in qmf_32_subbands()
author mru
date Mon, 12 Apr 2010 11:14:48 +0000
parents 414a7cdaa54d
children 554450259db8
files dca.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 <stddef.h>
 #include <stdio.h>
 
+#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;