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
Open sidebar
Xiph.Org
aom-rav1e
Commits
bfaf415e
Commit
bfaf415e
authored
Feb 24, 2014
by
Yaowu Xu
Committed by
Gerrit Code Review
Feb 24, 2014
Browse files
Merge "Added clamp of qindex to valid range"
parents
6859d0f0
e22b12e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vp9/common/vp9_quant_common.c
vp9/common/vp9_quant_common.c
+3
-3
No files found.
vp9/common/vp9_quant_common.c
View file @
bfaf415e
...
...
@@ -134,9 +134,9 @@ int vp9_get_qindex(const struct segmentation *seg, int segment_id,
int
base_qindex
)
{
if
(
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_ALT_Q
))
{
const
int
data
=
vp9_get_segdata
(
seg
,
segment_id
,
SEG_LVL_ALT_Q
);
return
seg
->
abs_delta
==
SEGMENT_ABSDATA
?
data
:
// Abs value
clamp
(
ba
se_qindex
+
data
,
0
,
MAXQ
);
// Delta value
const
int
seg_qindex
=
seg
->
abs_delta
==
SEGMENT_ABSDATA
?
data
:
base_qindex
+
data
;
return
clamp
(
se
g
_qindex
,
0
,
MAXQ
);
}
else
{
return
base_qindex
;
}
...
...
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