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
4f589d66
Commit
4f589d66
authored
Sep 18, 2019
by
Ting Fu
Committed by
Ruiling Song
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/x86/vf_eq: add SSE2 version
Signed-off-by:
Ting Fu
<
ting.fu@intel.com
>
parent
6aff2042
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
vf_eq.asm
libavfilter/x86/vf_eq.asm
+10
-2
vf_eq_init.c
libavfilter/x86/vf_eq_init.c
+19
-0
No files found.
libavfilter/x86/vf_eq.asm
View file @
4f589d66
...
...
@@ -24,7 +24,7 @@
SECTION
.
text
INIT_MMX
mmxext
%macro
PROCESS_ONE_LINE
1
cglobal
process_one_line
,
5
,
7
,
5
,
src
,
dst
,
contrast
,
brightness
,
w
movd
m3
,
contrastd
movd
m4
,
brightnessd
...
...
@@ -39,7 +39,7 @@ cglobal process_one_line, 5, 7, 5, src, dst, contrast, brightness, w
pxor
m1
,
m1
mov
scalard
,
wd
and
scalard
,
mmsize
-
1
sar
wd
,
3
sar
wd
,
%1
cmp
wd
,
1
jl
.
loop1
...
...
@@ -80,3 +80,11 @@ cglobal process_one_line, 5, 7, 5, src, dst, contrast, brightness, w
.
end
:
RET
%endmacro
INIT_MMX
mmxext
PROCESS_ONE_LINE
3
INIT_XMM
sse2
PROCESS_ONE_LINE
4
libavfilter/x86/vf_eq_init.c
View file @
4f589d66
...
...
@@ -28,6 +28,8 @@
extern
void
ff_process_one_line_mmxext
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
short
contrast
,
short
brightness
,
int
w
);
extern
void
ff_process_one_line_sse2
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
short
contrast
,
short
brightness
,
int
w
);
static
void
process_mmxext
(
EQParameters
*
param
,
uint8_t
*
dst
,
int
dst_stride
,
const
uint8_t
*
src
,
int
src_stride
,
int
w
,
int
h
)
...
...
@@ -44,6 +46,20 @@ static void process_mmxext(EQParameters *param, uint8_t *dst, int dst_stride,
emms_c
();
}
static
void
process_sse2
(
EQParameters
*
param
,
uint8_t
*
dst
,
int
dst_stride
,
const
uint8_t
*
src
,
int
src_stride
,
int
w
,
int
h
)
{
short
contrast
=
(
short
)
(
param
->
contrast
*
256
*
16
);
short
brightness
=
((
short
)
(
100
.
0
*
param
->
brightness
+
100
.
0
)
*
511
)
/
200
-
128
-
contrast
/
32
;
while
(
h
--
)
{
ff_process_one_line_sse2
(
src
,
dst
,
contrast
,
brightness
,
w
);
src
+=
src_stride
;
dst
+=
dst_stride
;
}
}
av_cold
void
ff_eq_init_x86
(
EQContext
*
eq
)
{
int
cpu_flags
=
av_get_cpu_flags
();
...
...
@@ -51,4 +67,7 @@ av_cold void ff_eq_init_x86(EQContext *eq)
if
(
cpu_flags
&
AV_CPU_FLAG_MMXEXT
)
{
eq
->
process
=
process_mmxext
;
}
if
(
cpu_flags
&
AV_CPU_FLAG_SSE2
)
{
eq
->
process
=
process_sse2
;
}
}
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