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
3bc8dee3
Commit
3bc8dee3
authored
Nov 29, 2017
by
Sebastien Alaiwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convolve.c: make some locals const
Change-Id: Ife7a530ba7735a6f6dcea8bed999f5307f09bb4f
parent
3392112c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
24 deletions
+16
-24
av1/common/convolve.c
av1/common/convolve.c
+16
-24
No files found.
av1/common/convolve.c
View file @
3bc8dee3
...
@@ -1315,14 +1315,13 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
...
@@ -1315,14 +1315,13 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
// we do filter with fewer taps first to reduce hardware implementation
// we do filter with fewer taps first to reduce hardware implementation
// complexity
// complexity
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
int
intermediate_width
;
const
int
temp_stride
=
max_intermediate_size
;
int
temp_stride
=
max_intermediate_size
;
ConvolveParams
temp_conv_params
;
ConvolveParams
temp_conv_params
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
filter_size
=
filter_params_x
.
taps
;
filter_size
=
filter_params_x
.
taps
;
intermediate_width
=
const
int
intermediate_width
=
(((
w
-
1
)
*
x_step_q4
+
subpel_x_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
(((
w
-
1
)
*
x_step_q4
+
subpel_x_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
assert
(
intermediate_width
<=
max_intermediate_size
);
assert
(
intermediate_width
<=
max_intermediate_size
);
...
@@ -1339,14 +1338,13 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
...
@@ -1339,14 +1338,13 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
}
else
}
else
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
{
{
int
intermediate_height
;
const
int
temp_stride
=
MAX_SB_SIZE
;
int
temp_stride
=
MAX_SB_SIZE
;
ConvolveParams
temp_conv_params
;
ConvolveParams
temp_conv_params
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
filter_size
=
filter_params_y
.
taps
;
filter_size
=
filter_params_y
.
taps
;
intermediate_height
=
const
int
intermediate_height
=
(((
h
-
1
)
*
y_step_q4
+
subpel_y_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
(((
h
-
1
)
*
y_step_q4
+
subpel_y_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
assert
(
intermediate_height
<=
max_intermediate_size
);
assert
(
intermediate_height
<=
max_intermediate_size
);
(
void
)
max_intermediate_size
;
(
void
)
max_intermediate_size
;
...
@@ -1417,14 +1415,13 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
...
@@ -1417,14 +1415,13 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
// we do filter with fewer taps first to reduce hardware implementation
// we do filter with fewer taps first to reduce hardware implementation
// complexity
// complexity
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
int
intermediate_width
;
const
int
temp_stride
=
max_intermediate_size
;
int
temp_stride
=
max_intermediate_size
;
ConvolveParams
temp_conv_params
;
ConvolveParams
temp_conv_params
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
filter_size
=
filter_params_x
.
taps
;
filter_size
=
filter_params_x
.
taps
;
intermediate_width
=
const
int
intermediate_width
=
(((
w
-
1
)
*
x_step_qn
+
subpel_x_qn
)
>>
SCALE_SUBPEL_BITS
)
+
(((
w
-
1
)
*
x_step_qn
+
subpel_x_qn
)
>>
SCALE_SUBPEL_BITS
)
+
filter_size
;
filter_size
;
assert
(
intermediate_width
<=
max_intermediate_size
);
assert
(
intermediate_width
<=
max_intermediate_size
);
...
@@ -1441,14 +1438,13 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
...
@@ -1441,14 +1438,13 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
conv_params
);
conv_params
);
}
else
{
}
else
{
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
int
intermediate_height
;
const
int
temp_stride
=
MAX_SB_SIZE
;
int
temp_stride
=
MAX_SB_SIZE
;
ConvolveParams
temp_conv_params
;
ConvolveParams
temp_conv_params
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
ref
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
do_average
=
0
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
temp_conv_params
.
round
=
CONVOLVE_OPT_ROUND
;
filter_size
=
filter_params_y
.
taps
;
filter_size
=
filter_params_y
.
taps
;
intermediate_height
=
const
int
intermediate_height
=
(((
h
-
1
)
*
y_step_qn
+
subpel_y_qn
)
>>
SCALE_SUBPEL_BITS
)
+
(((
h
-
1
)
*
y_step_qn
+
subpel_y_qn
)
>>
SCALE_SUBPEL_BITS
)
+
filter_size
;
filter_size
;
assert
(
intermediate_height
<=
max_intermediate_size
);
assert
(
intermediate_height
<=
max_intermediate_size
);
...
@@ -1791,10 +1787,9 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
...
@@ -1791,10 +1787,9 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
av1_convolve_filter_params_fixup_1212
(
&
filter_params_x
,
&
filter_params_y
);
av1_convolve_filter_params_fixup_1212
(
&
filter_params_x
,
&
filter_params_y
);
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
int
intermediate_width
;
const
int
temp_stride
=
max_intermediate_size
;
int
temp_stride
=
max_intermediate_size
;
filter_size
=
filter_params_x
.
taps
;
filter_size
=
filter_params_x
.
taps
;
intermediate_width
=
const
int
intermediate_width
=
(((
w
-
1
)
*
x_step_q4
+
subpel_x_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
(((
w
-
1
)
*
x_step_q4
+
subpel_x_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
assert
(
intermediate_width
<=
max_intermediate_size
);
assert
(
intermediate_width
<=
max_intermediate_size
);
...
@@ -1813,11 +1808,10 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
...
@@ -1813,11 +1808,10 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
}
else
}
else
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
{
{
int
intermediate_height
;
const
int
temp_stride
=
MAX_SB_SIZE
;
int
temp_stride
=
MAX_SB_SIZE
;
filter_size
=
filter_params_y
.
taps
;
filter_size
=
filter_params_y
.
taps
;
intermediate_height
=
const
int
intermediate_height
=
(((
h
-
1
)
*
y_step_q4
+
subpel_y_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
(((
h
-
1
)
*
y_step_q4
+
subpel_y_q4
)
>>
SUBPEL_BITS
)
+
filter_size
;
assert
(
intermediate_height
<=
max_intermediate_size
);
assert
(
intermediate_height
<=
max_intermediate_size
);
(
void
)
max_intermediate_size
;
(
void
)
max_intermediate_size
;
...
@@ -1890,10 +1884,9 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
...
@@ -1890,10 +1884,9 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
av1_convolve_filter_params_fixup_1212
(
&
filter_params_x
,
&
filter_params_y
);
av1_convolve_filter_params_fixup_1212
(
&
filter_params_x
,
&
filter_params_y
);
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
if
(
filter_params_y
.
taps
<
filter_params_x
.
taps
)
{
int
intermediate_width
;
const
int
temp_stride
=
max_intermediate_size
;
int
temp_stride
=
max_intermediate_size
;
filter_size
=
filter_params_x
.
taps
;
filter_size
=
filter_params_x
.
taps
;
intermediate_width
=
const
int
intermediate_width
=
(((
w
-
1
)
*
x_step_qn
+
subpel_x_qn
)
>>
SCALE_SUBPEL_BITS
)
+
(((
w
-
1
)
*
x_step_qn
+
subpel_x_qn
)
>>
SCALE_SUBPEL_BITS
)
+
filter_size
;
filter_size
;
assert
(
intermediate_width
<=
max_intermediate_size
);
assert
(
intermediate_width
<=
max_intermediate_size
);
...
@@ -1912,10 +1905,9 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
...
@@ -1912,10 +1905,9 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
filter_params_x
,
subpel_x_qn
,
x_step_qn
,
ref_idx
,
bd
);
filter_params_x
,
subpel_x_qn
,
x_step_qn
,
ref_idx
,
bd
);
}
else
{
}
else
{
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
int
intermediate_height
;
const
int
temp_stride
=
MAX_SB_SIZE
;
int
temp_stride
=
MAX_SB_SIZE
;
filter_size
=
filter_params_y
.
taps
;
filter_size
=
filter_params_y
.
taps
;
intermediate_height
=
const
int
intermediate_height
=
(((
h
-
1
)
*
y_step_qn
+
subpel_y_qn
)
>>
SCALE_SUBPEL_BITS
)
+
(((
h
-
1
)
*
y_step_qn
+
subpel_y_qn
)
>>
SCALE_SUBPEL_BITS
)
+
filter_size
;
filter_size
;
assert
(
intermediate_height
<=
max_intermediate_size
);
assert
(
intermediate_height
<=
max_intermediate_size
);
...
...
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