Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5cd56e19
Commit
5cd56e19
authored
Dec 12, 2011
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacdec: Use intfloat.h rather than local punning union.
parent
58c42af7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
aacdec.c
libavcodec/aacdec.c
+7
-11
No files found.
libavcodec/aacdec.c
View file @
5cd56e19
...
...
@@ -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
];
...
...
@@ -1004,7 +1000,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
;
...
...
@@ -1022,8 +1018,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
;
...
...
@@ -1272,7 +1268,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
;
...
...
@@ -1280,7 +1276,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
;
...
...
@@ -1288,7 +1284,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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment