Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
83f2312b
Commit
83f2312b
authored
May 25, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for SSE2 to 16 bit merge (deinterlace).
parent
8962e714
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
5 deletions
+42
-5
modules/video_filter/deinterlace/deinterlace.c
modules/video_filter/deinterlace/deinterlace.c
+2
-2
modules/video_filter/deinterlace/merge.c
modules/video_filter/deinterlace/merge.c
+30
-2
modules/video_filter/deinterlace/merge.h
modules/video_filter/deinterlace/merge.h
+10
-1
No files found.
modules/video_filter/deinterlace/deinterlace.c
View file @
83f2312b
...
...
@@ -636,9 +636,9 @@ int Open( vlc_object_t *p_this )
else
#endif
#if defined(CAN_COMPILE_SSE)
if
(
chroma
->
pixel_size
==
1
&&
(
vlc_CPU
()
&
CPU_CAPABILITY_SSE2
)
)
if
(
(
vlc_CPU
()
&
CPU_CAPABILITY_SSE2
)
)
{
p_sys
->
pf_merge
=
Merge
SSE2
;
p_sys
->
pf_merge
=
chroma
->
pixel_size
==
1
?
Merge8BitSSE2
:
Merge16Bit
SSE2
;
p_sys
->
pf_end_merge
=
EndMMX
;
}
else
...
...
modules/video_filter/deinterlace/merge.c
View file @
83f2312b
...
...
@@ -118,8 +118,8 @@ void Merge3DNow( void *_p_dest, const void *_p_s1, const void *_p_s2,
#endif
#if defined(CAN_COMPILE_SSE)
void
MergeSSE2
(
void
*
_p_dest
,
const
void
*
_p_s1
,
const
void
*
_p_s2
,
size_t
i_bytes
)
void
Merge
8Bit
SSE2
(
void
*
_p_dest
,
const
void
*
_p_s1
,
const
void
*
_p_s2
,
size_t
i_bytes
)
{
uint8_t
*
p_dest
=
_p_dest
;
const
uint8_t
*
p_s1
=
_p_s1
;
...
...
@@ -143,6 +143,34 @@ void MergeSSE2( void *_p_dest, const void *_p_s1, const void *_p_s2,
for
(
;
i_bytes
>
0
;
i_bytes
--
)
*
p_dest
++
=
(
*
p_s1
++
+
*
p_s2
++
)
>>
1
;
}
void
Merge16BitSSE2
(
void
*
_p_dest
,
const
void
*
_p_s1
,
const
void
*
_p_s2
,
size_t
i_bytes
)
{
uint16_t
*
p_dest
=
_p_dest
;
const
uint16_t
*
p_s1
=
_p_s1
;
const
uint16_t
*
p_s2
=
_p_s2
;
size_t
i_words
=
i_bytes
/
2
;
for
(
;
i_words
>
0
&&
((
uintptr_t
)
p_s1
&
15
);
i_words
--
)
*
p_dest
++
=
(
*
p_s1
++
+
*
p_s2
++
)
>>
1
;
for
(
;
i_words
>=
8
;
i_words
-=
8
)
{
__asm__
__volatile__
(
"movdqu %2,%%xmm1;"
"pavgw %1, %%xmm1;"
"movdqu %%xmm1, %0"
:
"=m"
(
*
p_dest
)
:
"m"
(
*
p_s1
),
"m"
(
*
p_s2
)
);
p_dest
+=
8
;
p_s1
+=
8
;
p_s2
+=
8
;
}
for
(
;
i_words
>
0
;
i_words
--
)
*
p_dest
++
=
(
*
p_s1
++
+
*
p_s2
++
)
>>
1
;
}
#endif
#ifdef CAN_COMPILE_C_ALTIVEC
...
...
modules/video_filter/deinterlace/merge.h
View file @
83f2312b
...
...
@@ -141,7 +141,16 @@ void Merge3DNow ( void *, const void *, const void *, size_t );
* @param _p_s2 Source line B
* @param i_bytes Number of bytes to merge
*/
void
MergeSSE2
(
void
*
,
const
void
*
,
const
void
*
,
size_t
);
void
Merge8BitSSE2
(
void
*
,
const
void
*
,
const
void
*
,
size_t
);
/**
* SSE2 routine to blend pixels from two picture lines.
*
* @param _p_dest Target
* @param _p_s1 Source line A
* @param _p_s2 Source line B
* @param i_bytes Number of bytes to merge
*/
void
Merge16BitSSE2
(
void
*
,
const
void
*
,
const
void
*
,
size_t
);
#endif
#if defined __ARM_NEON__
...
...
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