summaryrefslogtreecommitdiff
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-13 23:21:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-13 23:21:37 +0100
commit3ba0bfe71fb18e955ca0110e5a65105d84932fbc (patch)
treeb308d41d170483c23c31c87d8dcb19fc169e2eb6 /libavcodec/aacdec.c
parent36be045ed7942e07742c3cf3d3012b1d2a9ec344 (diff)
parenta99273ebf328658c183c2d267f1c2b8bfac58bb3 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: ulti: Fix invalid reads lavf: dealloc private options in av_write_trailer yadif: support 10bit YUV vc1: mark with ER_MB_ERROR bits overconsumption lavc: introduce ER_MB_END and ER_MB_ERROR error_resilience: use the ER_ namespace build: move inclusion of subdir.mak to main subdir loop rv34: NEON optimised 4x4 dequant rv34: move 4x4 dequant to RV34DSPContext aacdec: Use intfloat.h rather than local punning union. Conflicts: libavcodec/h264.c libavcodec/vc1dec.c libavfilter/vf_yadif.c libavformat/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 2b2ae8a80d..3183ff2373 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -98,6 +98,7 @@
#include "aacsbr.h"
#include "mpeg4audio.h"
#include "aacadtsdec.h"
+#include "libavutil/intfloat.h"
#include <assert.h>
#include <errno.h>
@@ -108,11 +109,6 @@
# include "arm/aac.h"
#endif
-union float754 {
- float f;
- uint32_t i;
-};
-
static VLC vlc_scalefactors;
static VLC vlc_spectral[11];
@@ -1023,7 +1019,7 @@ static inline float *VMUL4(float *dst, const float *v, unsigned idx,
static inline float *VMUL2S(float *dst, const float *v, unsigned idx,
unsigned sign, const float *scale)
{
- union float754 s0, s1;
+ union av_intfloat32 s0, s1;
s0.f = s1.f = *scale;
s0.i ^= sign >> 1 << 31;
@@ -1041,8 +1037,8 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx,
unsigned sign, const float *scale)
{
unsigned nz = idx >> 12;
- union float754 s = { .f = *scale };
- union float754 t;
+ union av_intfloat32 s = { .f = *scale };
+ union av_intfloat32 t;
t.i = s.i ^ (sign & 1U<<31);
*dst++ = v[idx & 3] * t.f;
@@ -1291,7 +1287,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024],
static av_always_inline float flt16_round(float pf)
{
- union float754 tmp;
+ union av_intfloat32 tmp;
tmp.f = pf;
tmp.i = (tmp.i + 0x00008000U) & 0xFFFF0000U;
return tmp.f;
@@ -1299,7 +1295,7 @@ static av_always_inline float flt16_round(float pf)
static av_always_inline float flt16_even(float pf)
{
- union float754 tmp;
+ union av_intfloat32 tmp;
tmp.f = pf;
tmp.i = (tmp.i + 0x00007FFFU + (tmp.i & 0x00010000U >> 16)) & 0xFFFF0000U;
return tmp.f;
@@ -1307,7 +1303,7 @@ static av_always_inline float flt16_even(float pf)
static av_always_inline float flt16_trunc(float pf)
{
- union float754 pun;
+ union av_intfloat32 pun;
pun.f = pf;
pun.i &= 0xFFFF0000U;
return pun.f;