Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Xiph.Org
aom-rav1e
Commits
e82709a5
Commit
e82709a5
authored
Feb 15, 2018
by
Debargha Mukherjee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanups to remove VERSHEAR_REDUCE_PREC_BITS
Change-Id: I2c77dd79c47901f8038ad7531679c3acc7b70dfe
parent
ca3f0395
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
av1/common/x86/warp_plane_sse2.c
av1/common/x86/warp_plane_sse2.c
+7
-4
av1/common/x86/warp_plane_sse4.c
av1/common/x86/warp_plane_sse4.c
+7
-4
av1/common/x86/warp_plane_ssse3.c
av1/common/x86/warp_plane_ssse3.c
+7
-4
No files found.
av1/common/x86/warp_plane_sse2.c
View file @
e82709a5
...
...
@@ -28,6 +28,9 @@ void av1_warp_affine_sse2(const int32_t *mat, const uint8_t *ref, int width,
(
conv_params
->
round
==
CONVOLVE_OPT_NO_ROUND
&&
conv_params
->
dst
);
const
int
reduce_bits_horiz
=
use_conv_params
?
conv_params
->
round_0
:
HORSHEAR_REDUCE_PREC_BITS
;
const
int
reduce_bits_vert
=
use_conv_params
?
conv_params
->
round_1
:
2
*
WARPEDPIXEL_FILTER_BITS
-
reduce_bits_horiz
;
const
int
offset_bits_horiz
=
use_conv_params
?
bd
+
FILTER_BITS
-
1
:
bd
+
WARPEDPIXEL_FILTER_BITS
-
1
;
if
(
use_conv_params
)
{
...
...
@@ -315,13 +318,13 @@ void av1_warp_affine_sse2(const int32_t *mat, const uint8_t *ref, int width,
}
else
{
// Round and pack into 8 bits
const
__m128i
round_const
=
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
VERSHEAR_REDUCE_PREC_BITS
-
1
))
+
((
1
<<
VERSHEAR_REDUCE_PREC_BITS
)
>>
1
));
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
reduce_bits_vert
-
1
))
+
((
1
<<
reduce_bits_vert
)
>>
1
));
const
__m128i
res_lo_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_lo
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_lo
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_hi_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_hi
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_hi
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_16bit
=
_mm_packs_epi32
(
res_lo_round
,
res_hi_round
);
__m128i
res_8bit
=
_mm_packus_epi16
(
res_16bit
,
res_16bit
);
...
...
av1/common/x86/warp_plane_sse4.c
View file @
e82709a5
...
...
@@ -216,6 +216,9 @@ void av1_warp_affine_sse4_1(const int32_t *mat, const uint8_t *ref, int width,
(
conv_params
->
round
==
CONVOLVE_OPT_NO_ROUND
&&
conv_params
->
dst
);
const
int
reduce_bits_horiz
=
use_conv_params
?
conv_params
->
round_0
:
HORSHEAR_REDUCE_PREC_BITS
;
const
int
reduce_bits_vert
=
use_conv_params
?
conv_params
->
round_1
:
2
*
WARPEDPIXEL_FILTER_BITS
-
reduce_bits_horiz
;
const
int
offset_bits_horiz
=
use_conv_params
?
bd
+
FILTER_BITS
-
1
:
bd
+
WARPEDPIXEL_FILTER_BITS
-
1
;
if
(
use_conv_params
)
{
...
...
@@ -529,13 +532,13 @@ void av1_warp_affine_sse4_1(const int32_t *mat, const uint8_t *ref, int width,
}
else
{
// Round and pack into 8 bits
const
__m128i
round_const
=
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
VERSHEAR_REDUCE_PREC_BITS
-
1
))
+
((
1
<<
VERSHEAR_REDUCE_PREC_BITS
)
>>
1
));
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
reduce_bits_vert
-
1
))
+
((
1
<<
reduce_bits_vert
)
>>
1
));
const
__m128i
res_lo_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_lo
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_lo
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_hi_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_hi
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_hi
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_16bit
=
_mm_packs_epi32
(
res_lo_round
,
res_hi_round
);
__m128i
res_8bit
=
_mm_packus_epi16
(
res_16bit
,
res_16bit
);
...
...
av1/common/x86/warp_plane_ssse3.c
View file @
e82709a5
...
...
@@ -217,6 +217,9 @@ void av1_warp_affine_ssse3(const int32_t *mat, const uint8_t *ref, int width,
use_conv_params
?
conv_params
->
round_0
:
HORSHEAR_REDUCE_PREC_BITS
;
const
int
offset_bits_horiz
=
use_conv_params
?
bd
+
FILTER_BITS
-
1
:
bd
+
WARPEDPIXEL_FILTER_BITS
-
1
;
const
int
reduce_bits_vert
=
use_conv_params
?
conv_params
->
round_1
:
2
*
WARPEDPIXEL_FILTER_BITS
-
reduce_bits_horiz
;
if
(
use_conv_params
)
{
conv_params
->
do_post_rounding
=
1
;
}
...
...
@@ -491,13 +494,13 @@ void av1_warp_affine_ssse3(const int32_t *mat, const uint8_t *ref, int width,
}
else
{
// Round and pack into 8 bits
const
__m128i
round_const
=
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
VERSHEAR_REDUCE_PREC_BITS
-
1
))
+
((
1
<<
VERSHEAR_REDUCE_PREC_BITS
)
>>
1
));
_mm_set1_epi32
(
-
(
1
<<
(
bd
+
reduce_bits_vert
-
1
))
+
((
1
<<
reduce_bits_vert
)
>>
1
));
const
__m128i
res_lo_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_lo
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_lo
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_hi_round
=
_mm_srai_epi32
(
_mm_add_epi32
(
res_hi
,
round_const
),
VERSHEAR_REDUCE_PREC_BITS
);
_mm_add_epi32
(
res_hi
,
round_const
),
reduce_bits_vert
);
const
__m128i
res_16bit
=
_mm_packs_epi32
(
res_lo_round
,
res_hi_round
);
__m128i
res_8bit
=
_mm_packus_epi16
(
res_16bit
,
res_16bit
);
...
...
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