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
6c104826
Commit
6c104826
authored
Jul 15, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: vc1dsp: port to cpuflags
parent
d578f947
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
43 deletions
+44
-43
vc1dsp.asm
libavcodec/x86/vc1dsp.asm
+42
-41
vc1dsp_init.c
libavcodec/x86/vc1dsp_init.c
+2
-2
No files found.
libavcodec/x86/vc1dsp.asm
View file @
6c104826
...
...
@@ -34,7 +34,13 @@ section .text
punpckl%1
m%2
,
m%4
%endmacro
%macro
STORE_4_WORDS_MMX
6
%macro
STORE_4_WORDS
6
%if
cpuflag
(
sse4
)
pextrw
%1
,
%5
,
%6
+
0
pextrw
%2
,
%5
,
%6
+
1
pextrw
%3
,
%5
,
%6
+
2
pextrw
%4
,
%5
,
%6
+
3
%else
movd
%6
d
,
%5
%if
mmsize
==
16
psrldq
%5
,
4
...
...
@@ -48,13 +54,7 @@ section .text
mov
%3
,
%6
w
shr
%6
,
16
mov
%4
,
%6
w
%endmacro
%macro
STORE_4_WORDS_SSE4
6
pextrw
%1
,
%5
,
%6
+
0
pextrw
%2
,
%5
,
%6
+
1
pextrw
%3
,
%5
,
%6
+
2
pextrw
%4
,
%5
,
%6
+
3
%endif
%endmacro
; in: p1 p0 q0 q1, clobbers p0
...
...
@@ -200,14 +200,14 @@ section .text
VC1_FILTER
%1
punpcklbw
m0
,
m1
%if
%0
>
1
STORE_4_WORDS
_MMX
[
r0
-
1
]
,
[
r0
+
r1
-
1
]
,
[
r0
+
2
*
r1
-
1
]
,
[
r0
+
r3
-
1
]
,
m0
,
%2
STORE_4_WORDS
[
r0
-
1
]
,
[
r0
+
r1
-
1
]
,
[
r0
+
2
*
r1
-
1
]
,
[
r0
+
r3
-
1
]
,
m0
,
%2
%if
%1
>
4
psrldq
m0
,
4
STORE_4_WORDS
_MMX
[
r4
-
1
]
,
[
r4
+
r1
-
1
]
,
[
r4
+
2
*
r1
-
1
]
,
[
r4
+
r3
-
1
]
,
m0
,
%2
STORE_4_WORDS
[
r4
-
1
]
,
[
r4
+
r1
-
1
]
,
[
r4
+
2
*
r1
-
1
]
,
[
r4
+
r3
-
1
]
,
m0
,
%2
%endif
%else
STORE_4_WORDS
_SSE4
[
r0
-
1
]
,
[
r0
+
r1
-
1
]
,
[
r0
+
2
*
r1
-
1
]
,
[
r0
+
r3
-
1
]
,
m0
,
0
STORE_4_WORDS
_SSE4
[
r4
-
1
]
,
[
r4
+
r1
-
1
]
,
[
r4
+
2
*
r1
-
1
]
,
[
r4
+
r3
-
1
]
,
m0
,
4
STORE_4_WORDS
[
r0
-
1
]
,
[
r0
+
r1
-
1
]
,
[
r0
+
2
*
r1
-
1
]
,
[
r0
+
r3
-
1
]
,
m0
,
0
STORE_4_WORDS
[
r4
-
1
]
,
[
r4
+
r1
-
1
]
,
[
r4
+
2
*
r1
-
1
]
,
[
r4
+
r3
-
1
]
,
m0
,
4
%endif
%endmacro
...
...
@@ -228,92 +228,93 @@ section .text
imul
r2
,
0x01010101
%endmacro
%macro
VC1_LF_MMX
1
INIT_MMX
cglobal
vc1_v_loop_filter_internal_
%1
%macro
VC1_LF
0
cglobal
vc1_v_loop_filter_internal
VC1_V_LOOP_FILTER
4
,
d
ret
cglobal
vc1_h_loop_filter_internal
_
%1
cglobal
vc1_h_loop_filter_internal
VC1_H_LOOP_FILTER
4
,
r4
ret
; void ff_vc1_v_loop_filter4_mmx
2
(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter4
_
%1
,
3
,
5
,
0
; void ff_vc1_v_loop_filter4_mmx
ext
(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter4
,
3
,
5
,
0
START_V_FILTER
call
vc1_v_loop_filter_internal
_
%1
call
vc1_v_loop_filter_internal
RET
; void ff_vc1_h_loop_filter4_mmx
2
(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter4
_
%1
,
3
,
5
,
0
; void ff_vc1_h_loop_filter4_mmx
ext
(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter4
,
3
,
5
,
0
START_H_FILTER
4
call
vc1_h_loop_filter_internal
_
%1
call
vc1_h_loop_filter_internal
RET
; void ff_vc1_v_loop_filter8_mmx
2
(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter8
_
%1
,
3
,
5
,
0
; void ff_vc1_v_loop_filter8_mmx
ext
(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter8
,
3
,
5
,
0
START_V_FILTER
call
vc1_v_loop_filter_internal
_
%1
call
vc1_v_loop_filter_internal
add
r4
,
4
add
r0
,
4
call
vc1_v_loop_filter_internal
_
%1
call
vc1_v_loop_filter_internal
RET
; void ff_vc1_h_loop_filter8_mmx
2
(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter8
_
%1
,
3
,
5
,
0
; void ff_vc1_h_loop_filter8_mmx
ext
(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter8
,
3
,
5
,
0
START_H_FILTER
4
call
vc1_h_loop_filter_internal
_
%1
call
vc1_h_loop_filter_internal
lea
r0
,
[
r0
+
4
*
r1
]
call
vc1_h_loop_filter_internal
_
%1
call
vc1_h_loop_filter_internal
RET
%endmacro
INIT_MMX
mmxext
%define
PABSW
PABSW_MMXEXT
VC1_LF
_MMX
mmx2
VC1_LF
INIT_XMM
INIT_XMM
sse2
; void ff_vc1_v_loop_filter8_sse2(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter8
_sse2
,
3
,
5
,
8
cglobal
vc1_v_loop_filter8
,
3
,
5
,
8
START_V_FILTER
VC1_V_LOOP_FILTER
8
,
q
RET
; void ff_vc1_h_loop_filter8_sse2(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter8
_sse2
,
3
,
6
,
8
cglobal
vc1_h_loop_filter8
,
3
,
6
,
8
START_H_FILTER
8
VC1_H_LOOP_FILTER
8
,
r5
RET
%define
PABSW
PABSW_SSSE3
INIT_MMX
INIT_MMX
ssse3
; void ff_vc1_v_loop_filter4_ssse3(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter4
_ssse3
,
3
,
5
,
0
cglobal
vc1_v_loop_filter4
,
3
,
5
,
0
START_V_FILTER
VC1_V_LOOP_FILTER
4
,
d
RET
; void ff_vc1_h_loop_filter4_ssse3(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter4
_ssse3
,
3
,
5
,
0
cglobal
vc1_h_loop_filter4
,
3
,
5
,
0
START_H_FILTER
4
VC1_H_LOOP_FILTER
4
,
r4
RET
INIT_XMM
INIT_XMM
ssse3
; void ff_vc1_v_loop_filter8_ssse3(uint8_t *src, int stride, int pq)
cglobal
vc1_v_loop_filter8
_ssse3
,
3
,
5
,
8
cglobal
vc1_v_loop_filter8
,
3
,
5
,
8
START_V_FILTER
VC1_V_LOOP_FILTER
8
,
q
RET
; void ff_vc1_h_loop_filter8_ssse3(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter8
_ssse3
,
3
,
6
,
8
cglobal
vc1_h_loop_filter8
,
3
,
6
,
8
START_H_FILTER
8
VC1_H_LOOP_FILTER
8
,
r5
RET
INIT_XMM
sse4
; void ff_vc1_h_loop_filter8_sse4(uint8_t *src, int stride, int pq)
cglobal
vc1_h_loop_filter8
_sse4
,
3
,
5
,
8
cglobal
vc1_h_loop_filter8
,
3
,
5
,
8
START_H_FILTER
8
VC1_H_LOOP_FILTER
8
RET
libavcodec/x86/vc1dsp_init.c
View file @
6c104826
...
...
@@ -49,7 +49,7 @@ static void vc1_h_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
}
#if HAVE_YASM
LOOP_FILTER
(
mmx
2
)
LOOP_FILTER
(
mmx
ext
)
LOOP_FILTER
(
sse2
)
LOOP_FILTER
(
ssse3
)
...
...
@@ -98,7 +98,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
}
if
(
mm_flags
&
AV_CPU_FLAG_MMXEXT
)
{
ASSIGN_LF
(
mmx
2
);
ASSIGN_LF
(
mmx
ext
);
dsp
->
avg_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
ff_avg_vc1_chroma_mc8_nornd_mmx2
;
}
else
if
(
mm_flags
&
AV_CPU_FLAG_3DNOW
)
{
dsp
->
avg_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
ff_avg_vc1_chroma_mc8_nornd_3dnow
;
...
...
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