Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Konstantin Pavlov
dav1d
Commits
a194d478
Commit
a194d478
authored
Nov 16, 2018
by
Ronald S. Bultje
Committed by
Luc Trudeau
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly simplify the loop in lr_sbrow()
parent
cfa986fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
src/lr_apply_tmpl.c
src/lr_apply_tmpl.c
+1
-5
No files found.
src/lr_apply_tmpl.c
View file @
a194d478
...
...
@@ -232,7 +232,7 @@ static void lr_sbrow(const Dav1dFrameContext *const f, pixel *p, const int y,
int
unit_w
=
unit_size
,
bit
=
0
;
enum
LrEdgeFlags
edges
=
(
y
>
0
?
LR_HAVE_TOP
:
0
)
|
enum
LrEdgeFlags
edges
=
(
y
>
0
?
LR_HAVE_TOP
:
0
)
|
LR_HAVE_RIGHT
|
(
row_h
<
h
?
LR_HAVE_BOTTOM
:
0
);
int
aligned_unit_pos
=
row_y
&
~
(
unit_size
-
1
);
...
...
@@ -242,12 +242,9 @@ static void lr_sbrow(const Dav1dFrameContext *const f, pixel *p, const int y,
const
int
sb_idx
=
(
aligned_unit_pos
>>
7
)
*
f
->
sr_sb128w
;
const
int
unit_idx
=
((
aligned_unit_pos
>>
6
)
&
1
)
<<
1
;
for
(
int
x
=
0
;
x
<
w
;
x
+=
unit_w
,
edges
|=
LR_HAVE_LEFT
,
bit
^=
1
)
{
// TODO Clean up this if statement.
if
(
x
+
max_unit_size
>
w
)
{
unit_w
=
w
-
x
;
edges
&=
~
LR_HAVE_RIGHT
;
}
else
{
edges
|=
LR_HAVE_RIGHT
;
}
// Based on the position of the restoration unit, find the corresponding
...
...
@@ -257,7 +254,6 @@ static void lr_sbrow(const Dav1dFrameContext *const f, pixel *p, const int y,
&
f
->
lf
.
lr_mask
[
sb_idx
+
(
x
>>
shift_hor
)].
lr
[
plane
][
u_idx
];
// FIXME Don't backup if the next restoration unit is RESTORE_NONE
// This also requires not restoring in the same conditions.
if
(
edges
&
LR_HAVE_RIGHT
)
{
backup4xU
(
pre_lr_border
[
bit
],
p
+
unit_w
-
4
,
p_stride
,
row_h
-
y
);
}
...
...
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