Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
3e9409b1
Commit
3e9409b1
authored
13 years ago
by
Mans Rullgard
Browse files
Options
Downloads
Patches
Plain Diff
simple_idct: simplify some ifdeffery
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
dbb5ee8e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/simple_idct.c
+6
-18
6 additions, 18 deletions
libavcodec/simple_idct.c
with
6 additions
and
18 deletions
libavcodec/simple_idct.c
+
6
−
18
View file @
3e9409b1
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
based upon some outcommented c code from mpeg2dec (idct_mmx.c
based upon some outcommented c code from mpeg2dec (idct_mmx.c
written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>)
written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>)
*/
*/
#include
"libavutil/intreadwrite.h"
#include
"avcodec.h"
#include
"avcodec.h"
#include
"dsputil.h"
#include
"dsputil.h"
#include
"mathops.h"
#include
"mathops.h"
...
@@ -47,20 +49,11 @@
...
@@ -47,20 +49,11 @@
static
inline
void
idctRowCondDC
(
DCTELEM
*
row
)
static
inline
void
idctRowCondDC
(
DCTELEM
*
row
)
{
{
int
a0
,
a1
,
a2
,
a3
,
b0
,
b1
,
b2
,
b3
;
int
a0
,
a1
,
a2
,
a3
,
b0
,
b1
,
b2
,
b3
;
#if HAVE_FAST_64BIT
uint64_t
temp
;
#else
uint32_t
temp
;
#endif
#if HAVE_FAST_64BIT
#if HAVE_FAST_64BIT
#if HAVE_BIGENDIAN
#define ROW0_MASK (0xffffLL << 48 * HAVE_BIGENDIAN)
#define ROW0_MASK 0xffff000000000000LL
#else
#define ROW0_MASK 0xffffLL
#endif
if
(((((
uint64_t
*
)
row
)[
0
]
&
~
ROW0_MASK
)
|
((
uint64_t
*
)
row
)[
1
])
==
0
)
{
if
(((((
uint64_t
*
)
row
)[
0
]
&
~
ROW0_MASK
)
|
((
uint64_t
*
)
row
)[
1
])
==
0
)
{
temp
=
(
row
[
0
]
<<
3
)
&
0xffff
;
uint64_t
temp
=
(
row
[
0
]
<<
3
)
&
0xffff
;
temp
+=
temp
<<
16
;
temp
+=
temp
<<
16
;
temp
+=
temp
<<
32
;
temp
+=
temp
<<
32
;
((
uint64_t
*
)
row
)[
0
]
=
temp
;
((
uint64_t
*
)
row
)[
0
]
=
temp
;
...
@@ -72,7 +65,7 @@ static inline void idctRowCondDC (DCTELEM * row)
...
@@ -72,7 +65,7 @@ static inline void idctRowCondDC (DCTELEM * row)
((
uint32_t
*
)
row
)[
2
]
|
((
uint32_t
*
)
row
)[
2
]
|
((
uint32_t
*
)
row
)[
3
]
|
((
uint32_t
*
)
row
)[
3
]
|
row
[
1
]))
{
row
[
1
]))
{
temp
=
(
row
[
0
]
<<
3
)
&
0xffff
;
uint32_t
temp
=
(
row
[
0
]
<<
3
)
&
0xffff
;
temp
+=
temp
<<
16
;
temp
+=
temp
<<
16
;
((
uint32_t
*
)
row
)[
0
]
=
((
uint32_t
*
)
row
)[
1
]
=
((
uint32_t
*
)
row
)[
0
]
=
((
uint32_t
*
)
row
)[
1
]
=
((
uint32_t
*
)
row
)[
2
]
=
((
uint32_t
*
)
row
)[
3
]
=
temp
;
((
uint32_t
*
)
row
)[
2
]
=
((
uint32_t
*
)
row
)[
3
]
=
temp
;
...
@@ -100,12 +93,7 @@ static inline void idctRowCondDC (DCTELEM * row)
...
@@ -100,12 +93,7 @@ static inline void idctRowCondDC (DCTELEM * row)
b3
=
MUL16
(
W7
,
row
[
1
]);
b3
=
MUL16
(
W7
,
row
[
1
]);
MAC16
(
b3
,
-
W5
,
row
[
3
]);
MAC16
(
b3
,
-
W5
,
row
[
3
]);
#if HAVE_FAST_64BIT
if
(
AV_RN64A
(
row
+
4
))
{
temp
=
((
uint64_t
*
)
row
)[
1
];
#else
temp
=
((
uint32_t
*
)
row
)[
2
]
|
((
uint32_t
*
)
row
)[
3
];
#endif
if
(
temp
!=
0
)
{
a0
+=
W4
*
row
[
4
]
+
W6
*
row
[
6
];
a0
+=
W4
*
row
[
4
]
+
W6
*
row
[
6
];
a1
+=
-
W4
*
row
[
4
]
-
W2
*
row
[
6
];
a1
+=
-
W4
*
row
[
4
]
-
W2
*
row
[
6
];
a2
+=
-
W4
*
row
[
4
]
+
W2
*
row
[
6
];
a2
+=
-
W4
*
row
[
4
]
+
W2
*
row
[
6
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment