Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
18d7c971
Commit
18d7c971
authored
Oct 13, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: avoid duplicate vlc_CPU() call
parent
0d5c56e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
modules/codec/avcodec/copy.c
modules/codec/avcodec/copy.c
+6
-10
No files found.
modules/codec/avcodec/copy.c
View file @
18d7c971
...
@@ -314,11 +314,8 @@ static void SSE_SplitPlanes(uint8_t *dstu, size_t dstu_pitch,
...
@@ -314,11 +314,8 @@ static void SSE_SplitPlanes(uint8_t *dstu, size_t dstu_pitch,
static
void
SSE_CopyFromNv12
(
picture_t
*
dst
,
static
void
SSE_CopyFromNv12
(
picture_t
*
dst
,
uint8_t
*
src
[
2
],
size_t
src_pitch
[
2
],
uint8_t
*
src
[
2
],
size_t
src_pitch
[
2
],
unsigned
width
,
unsigned
height
,
unsigned
width
,
unsigned
height
,
copy_cache_t
*
cache
)
copy_cache_t
*
cache
,
unsigned
cpu
)
{
{
const
unsigned
cpu
=
vlc_CPU
();
/* */
SSE_CopyPlane
(
dst
->
p
[
0
].
p_pixels
,
dst
->
p
[
0
].
i_pitch
,
SSE_CopyPlane
(
dst
->
p
[
0
].
p_pixels
,
dst
->
p
[
0
].
i_pitch
,
src
[
0
],
src_pitch
[
0
],
src
[
0
],
src_pitch
[
0
],
cache
->
buffer
,
cache
->
size
,
cache
->
buffer
,
cache
->
size
,
...
@@ -334,11 +331,8 @@ static void SSE_CopyFromNv12(picture_t *dst,
...
@@ -334,11 +331,8 @@ static void SSE_CopyFromNv12(picture_t *dst,
static
void
SSE_CopyFromYv12
(
picture_t
*
dst
,
static
void
SSE_CopyFromYv12
(
picture_t
*
dst
,
uint8_t
*
src
[
3
],
size_t
src_pitch
[
3
],
uint8_t
*
src
[
3
],
size_t
src_pitch
[
3
],
unsigned
width
,
unsigned
height
,
unsigned
width
,
unsigned
height
,
copy_cache_t
*
cache
)
copy_cache_t
*
cache
,
unsigned
cpu
)
{
{
const
unsigned
cpu
=
vlc_CPU
();
/* */
for
(
unsigned
n
=
0
;
n
<
3
;
n
++
)
{
for
(
unsigned
n
=
0
;
n
<
3
;
n
++
)
{
const
unsigned
d
=
n
>
0
?
2
:
1
;
const
unsigned
d
=
n
>
0
?
2
:
1
;
SSE_CopyPlane
(
dst
->
p
[
n
].
p_pixels
,
dst
->
p
[
n
].
i_pitch
,
SSE_CopyPlane
(
dst
->
p
[
n
].
p_pixels
,
dst
->
p
[
n
].
i_pitch
,
...
@@ -385,7 +379,8 @@ void CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2],
...
@@ -385,7 +379,8 @@ void CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2],
#ifdef CAN_COMPILE_SSE2
#ifdef CAN_COMPILE_SSE2
unsigned
cpu
=
vlc_CPU
();
unsigned
cpu
=
vlc_CPU
();
if
(
vlc_CPU_SSE2
())
if
(
vlc_CPU_SSE2
())
return
SSE_CopyFromNv12
(
dst
,
src
,
src_pitch
,
width
,
height
,
cache
);
return
SSE_CopyFromNv12
(
dst
,
src
,
src_pitch
,
width
,
height
,
cache
,
cpu
);
#else
#else
(
void
)
cache
;
(
void
)
cache
;
#endif
#endif
...
@@ -406,7 +401,8 @@ void CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3],
...
@@ -406,7 +401,8 @@ void CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3],
#ifdef CAN_COMPILE_SSE2
#ifdef CAN_COMPILE_SSE2
unsigned
cpu
=
vlc_CPU
();
unsigned
cpu
=
vlc_CPU
();
if
(
vlc_CPU_SSE2
())
if
(
vlc_CPU_SSE2
())
return
SSE_CopyFromYv12
(
dst
,
src
,
src_pitch
,
width
,
height
,
cache
);
return
SSE_CopyFromYv12
(
dst
,
src
,
src_pitch
,
width
,
height
,
cache
,
cpu
);
#else
#else
(
void
)
cache
;
(
void
)
cache
;
#endif
#endif
...
...
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