Mercurial > libavcodec.hg
comparison dca.c @ 11606:93db59ec6eb7 libavcodec
DCA: use some type-punning in qmf_32_subbands()
| author | mru |
|---|---|
| date | Mon, 12 Apr 2010 11:14:48 +0000 |
| parents | 18f17f44de37 |
| children | 554450259db8 |
comparison
equal
deleted
inserted
replaced
| 11605:414a7cdaa54d | 11606:93db59ec6eb7 |
|---|---|
| 28 | 28 |
| 29 #include <math.h> | 29 #include <math.h> |
| 30 #include <stddef.h> | 30 #include <stddef.h> |
| 31 #include <stdio.h> | 31 #include <stdio.h> |
| 32 | 32 |
| 33 #include "libavutil/intreadwrite.h" | |
| 33 #include "avcodec.h" | 34 #include "avcodec.h" |
| 34 #include "dsputil.h" | 35 #include "dsputil.h" |
| 35 #include "fft.h" | 36 #include "fft.h" |
| 36 #include "get_bits.h" | 37 #include "get_bits.h" |
| 37 #include "put_bits.h" | 38 #include "put_bits.h" |
| 768 | 769 |
| 769 /* Reconstructed channel sample index */ | 770 /* Reconstructed channel sample index */ |
| 770 for (subindex = 0; subindex < 8; subindex++) { | 771 for (subindex = 0; subindex < 8; subindex++) { |
| 771 /* Load in one sample from each subband and clear inactive subbands */ | 772 /* Load in one sample from each subband and clear inactive subbands */ |
| 772 for (i = 0; i < s->subband_activity[chans]; i++){ | 773 for (i = 0; i < s->subband_activity[chans]; i++){ |
| 773 if((i-1)&2) s->raXin[i] = -samples_in[i][subindex]; | 774 uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30; |
| 774 else s->raXin[i] = samples_in[i][subindex]; | 775 AV_WN32A(&s->raXin[i], v); |
| 775 } | 776 } |
| 776 for (; i < 32; i++) | 777 for (; i < 32; i++) |
| 777 s->raXin[i] = 0.0; | 778 s->raXin[i] = 0.0; |
| 778 | 779 |
| 779 s->synth.synth_filter_float(&s->imdct, | 780 s->synth.synth_filter_float(&s->imdct, |
