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
b045283f
Commit
b045283f
authored
11 years ago
by
Diego Biurrun
Browse files
Options
Downloads
Patches
Plain Diff
ppc: dsputil: Simplify some ifdeffed function definitions
parent
8bd6f882
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/ppc/dsputil_ppc.c
+5
-13
5 additions, 13 deletions
libavcodec/ppc/dsputil_ppc.c
with
5 additions
and
13 deletions
libavcodec/ppc/dsputil_ppc.c
+
5
−
13
View file @
b045283f
...
@@ -74,9 +74,9 @@ static void clear_blocks_dcbz32_ppc(int16_t *blocks)
...
@@ -74,9 +74,9 @@ static void clear_blocks_dcbz32_ppc(int16_t *blocks)
/* Same as above, when dcbzl clears a whole 128 bytes cache line
/* Same as above, when dcbzl clears a whole 128 bytes cache line
* i.e. the PPC970 AKA G5. */
* i.e. the PPC970 AKA G5. */
#if HAVE_DCBZL
static
void
clear_blocks_dcbz128_ppc
(
int16_t
*
blocks
)
static
void
clear_blocks_dcbz128_ppc
(
int16_t
*
blocks
)
{
{
#if HAVE_DCBZL
register
int
misal
=
(
unsigned
long
)
blocks
&
0x0000007f
;
register
int
misal
=
(
unsigned
long
)
blocks
&
0x0000007f
;
register
int
i
=
0
;
register
int
i
=
0
;
...
@@ -89,26 +89,23 @@ static void clear_blocks_dcbz128_ppc(int16_t *blocks)
...
@@ -89,26 +89,23 @@ static void clear_blocks_dcbz128_ppc(int16_t *blocks)
for
(;
i
<
sizeof
(
int16_t
)
*
6
*
64
;
i
+=
128
)
for
(;
i
<
sizeof
(
int16_t
)
*
6
*
64
;
i
+=
128
)
__asm__
volatile
(
"dcbzl %0,%1"
::
"b"
(
blocks
),
"r"
(
i
)
:
"memory"
);
__asm__
volatile
(
"dcbzl %0,%1"
::
"b"
(
blocks
),
"r"
(
i
)
:
"memory"
);
}
}
}
#else
#else
static
void
clear_blocks_dcbz128_ppc
(
int16_t
*
blocks
)
{
memset
(
blocks
,
0
,
sizeof
(
int16_t
)
*
6
*
64
);
memset
(
blocks
,
0
,
sizeof
(
int16_t
)
*
6
*
64
);
}
#endif
#endif
}
#if HAVE_DCBZL
/* Check dcbz report how many bytes are set to 0 by dcbz. */
/* Check dcbz report how many bytes are set to 0 by dcbz. */
/* update 24/06/2003: Replace dcbz by dcbzl to get the intended effect
/* update 24/06/2003: Replace dcbz by dcbzl to get the intended effect
* (Apple "fixed" dcbz). Unfortunately this cannot be used unless the
* (Apple "fixed" dcbz). Unfortunately this cannot be used unless the
* assembler knows about dcbzl ... */
* assembler knows about dcbzl ... */
static
long
check_dcbzl_effect
(
void
)
static
long
check_dcbzl_effect
(
void
)
{
{
long
count
=
0
;
#if HAVE_DCBZL
register
char
*
fakedata
=
av_malloc
(
1024
);
register
char
*
fakedata
=
av_malloc
(
1024
);
register
char
*
fakedata_middle
;
register
char
*
fakedata_middle
;
register
long
zero
=
0
;
register
long
zero
=
0
;
register
long
i
=
0
;
register
long
i
=
0
;
long
count
=
0
;
if
(
!
fakedata
)
if
(
!
fakedata
)
return
0L
;
return
0L
;
...
@@ -126,15 +123,10 @@ static long check_dcbzl_effect(void)
...
@@ -126,15 +123,10 @@ static long check_dcbzl_effect(void)
count
++
;
count
++
;
av_free
(
fakedata
);
av_free
(
fakedata
);
#endif
return
count
;
return
count
;
}
}
#else
static
long
check_dcbzl_effect
(
void
)
{
return
0
;
}
#endif
av_cold
void
ff_dsputil_init_ppc
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
av_cold
void
ff_dsputil_init_ppc
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
{
{
...
...
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