Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
08b4c9af
Commit
08b4c9af
authored
Dec 17, 2018
by
Henrik Gramner
Browse files
Avoid a redundant clip in 8-bit itx
parent
a755b6e3
Pipeline
#3604
passed with stages
in 4 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/itx_tmpl.c
View file @
08b4c9af
...
...
@@ -58,7 +58,6 @@ inv_txfm_add_c(pixel *dst, const ptrdiff_t stride,
const
int
bitdepth
=
bitdepth_from_max
(
bitdepth_max
);
const
int
row_clip_max
=
(
1
<<
(
bitdepth
+
8
-
1
))
-
1
;
const
int
col_clip_max
=
(
1
<<
(
imax
(
bitdepth
+
6
,
16
)
-
1
))
-
1
;
const
int
col_clip_min
=
-
col_clip_max
-
1
;
if
(
w
!=
sw
)
memset
(
&
in_mem
[
sw
],
0
,
(
w
-
sw
)
*
sizeof
(
*
in_mem
));
const
int
rnd1
=
(
1
<<
shift1
)
>>
1
;
...
...
@@ -74,8 +73,12 @@ inv_txfm_add_c(pixel *dst, const ptrdiff_t stride,
first_1d_fn
(
&
coeff
[
i
],
sh
,
&
tmp
[
i
*
w
],
1
,
row_clip_max
);
}
for
(
j
=
0
;
j
<
w
;
j
++
)
#if BITDEPTH == 8
tmp
[
i
*
w
+
j
]
=
(
tmp
[
i
*
w
+
j
]
+
(
rnd1
))
>>
shift1
;
#else
tmp
[
i
*
w
+
j
]
=
iclip
((
tmp
[
i
*
w
+
j
]
+
(
rnd1
))
>>
shift1
,
col_clip_min
,
col_clip_max
);
-
col_clip_max
-
1
,
col_clip_max
);
#endif
}
if
(
h
!=
sh
)
memset
(
&
tmp
[
sh
*
w
],
0
,
w
*
(
h
-
sh
)
*
sizeof
(
*
tmp
));
...
...
Write
Preview
Supports
Markdown
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