Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
961668c9
Commit
961668c9
authored
9 years ago
by
Yi Luo
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Initial SSE2 function fdst4_sse2()." into nextgenv2
parents
5712456b
5456aee6
No related branches found
Branches containing commit
No related tags found
2 merge requests
!6
Rav1e 11 yushin 1
,
!3
Rav1e 10 yushin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp10/encoder/hybrid_fwd_txfm.c
+1
-4
1 addition, 4 deletions
vp10/encoder/hybrid_fwd_txfm.c
vp10/encoder/x86/dct_sse2.c
+78
-0
78 additions, 0 deletions
vp10/encoder/x86/dct_sse2.c
with
79 additions
and
4 deletions
vp10/encoder/hybrid_fwd_txfm.c
+
1
−
4
View file @
961668c9
...
...
@@ -69,8 +69,6 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
case
FLIPADST_FLIPADST
:
case
ADST_FLIPADST
:
case
FLIPADST_ADST
:
vp10_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
case
DST_DST
:
case
DCT_DST
:
case
DST_DCT
:
...
...
@@ -78,8 +76,7 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
case
ADST_DST
:
case
DST_FLIPADST
:
case
FLIPADST_DST
:
// Use C version since DST exists only in C
vp10_fht4x4_c
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
vp10_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
4
);
...
...
This diff is collapsed.
Click to expand it.
vp10/encoder/x86/dct_sse2.c
+
78
−
0
View file @
961668c9
...
...
@@ -172,6 +172,42 @@ static void fadst4_sse2(__m128i *in) {
transpose_4x4
(
in
);
}
#if CONFIG_EXT_TX
static
void
fdst4_sse2
(
__m128i
*
in
)
{
const
__m128i
k__cospi_p16_p16
=
_mm_set1_epi16
((
int16_t
)
cospi_16_64
);
const
__m128i
k__cospi_p16_m16
=
pair_set_epi16
(
cospi_16_64
,
-
cospi_16_64
);
const
__m128i
k__cospi_p08_m24
=
pair_set_epi16
(
cospi_8_64
,
-
cospi_24_64
);
const
__m128i
k__cospi_p24_p08
=
pair_set_epi16
(
cospi_24_64
,
cospi_8_64
);
const
__m128i
k__DCT_CONST_ROUNDING
=
_mm_set1_epi32
(
DCT_CONST_ROUNDING
);
__m128i
u
[
4
],
v
[
4
];
u
[
0
]
=
_mm_unpacklo_epi16
(
in
[
0
],
in
[
1
]);
u
[
1
]
=
_mm_unpacklo_epi16
(
in
[
3
],
in
[
2
]);
v
[
0
]
=
_mm_add_epi16
(
u
[
0
],
u
[
1
]);
v
[
1
]
=
_mm_sub_epi16
(
u
[
0
],
u
[
1
]);
u
[
0
]
=
_mm_madd_epi16
(
v
[
0
],
k__cospi_p24_p08
);
u
[
1
]
=
_mm_madd_epi16
(
v
[
1
],
k__cospi_p16_p16
);
u
[
2
]
=
_mm_madd_epi16
(
v
[
0
],
k__cospi_p08_m24
);
u
[
3
]
=
_mm_madd_epi16
(
v
[
1
],
k__cospi_p16_m16
);
v
[
0
]
=
_mm_add_epi32
(
u
[
0
],
k__DCT_CONST_ROUNDING
);
v
[
1
]
=
_mm_add_epi32
(
u
[
1
],
k__DCT_CONST_ROUNDING
);
v
[
2
]
=
_mm_add_epi32
(
u
[
2
],
k__DCT_CONST_ROUNDING
);
v
[
3
]
=
_mm_add_epi32
(
u
[
3
],
k__DCT_CONST_ROUNDING
);
u
[
0
]
=
_mm_srai_epi32
(
v
[
0
],
DCT_CONST_BITS
);
u
[
1
]
=
_mm_srai_epi32
(
v
[
1
],
DCT_CONST_BITS
);
u
[
2
]
=
_mm_srai_epi32
(
v
[
2
],
DCT_CONST_BITS
);
u
[
3
]
=
_mm_srai_epi32
(
v
[
3
],
DCT_CONST_BITS
);
in
[
0
]
=
_mm_packs_epi32
(
u
[
0
],
u
[
2
]);
in
[
1
]
=
_mm_packs_epi32
(
u
[
1
],
u
[
3
]);
transpose_4x4
(
in
);
}
#endif // CONFIG_EXT_TX
void
vp10_fht4x4_sse2
(
const
int16_t
*
input
,
tran_low_t
*
output
,
int
stride
,
int
tx_type
)
{
__m128i
in
[
4
];
...
...
@@ -229,6 +265,48 @@ void vp10_fht4x4_sse2(const int16_t *input, tran_low_t *output,
fadst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
DST_DST
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
0
);
fdst4_sse2
(
in
);
fdst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
DCT_DST
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
0
);
fdct4_sse2
(
in
);
fdst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
DST_DCT
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
0
);
fdst4_sse2
(
in
);
fdct4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
DST_ADST
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
0
);
fdst4_sse2
(
in
);
fadst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
ADST_DST
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
0
);
fadst4_sse2
(
in
);
fdst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
DST_FLIPADST
:
load_buffer_4x4
(
input
,
in
,
stride
,
0
,
1
);
fdst4_sse2
(
in
);
fadst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
case
FLIPADST_DST
:
load_buffer_4x4
(
input
,
in
,
stride
,
1
,
0
);
fadst4_sse2
(
in
);
fdst4_sse2
(
in
);
write_buffer_4x4
(
output
,
in
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
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