Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
38cdce8e
Commit
38cdce8e
authored
Aug 21, 2017
by
Yaowu Xu
Browse files
Prevent access of array using -1 index
BUG=aomedia:685 Change-Id: I0698b281fbaff2e77a50f5dc9a10d752de6c6f79
parent
415d82ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
av1/decoder/decodeframe.c
View file @
38cdce8e
...
...
@@ -2139,7 +2139,7 @@ static PARTITION_TYPE read_partition(AV1_COMMON *cm, MACROBLOCKD *xd,
partition_plane_context
(
xd
,
mi_row
,
mi_col
,
has_rows
,
has_cols
,
bsize
);
const
aom_prob
*
const
probs
=
ctx
<
PARTITION_CONTEXTS
?
cm
->
fc
->
partition_prob
[
ctx
]
:
NULL
;
FRAME_COUNTS
*
const
counts
=
ctx
<
PARTITION_CONTEXTS
?
xd
->
counts
:
NULL
;
FRAME_COUNTS
*
const
counts
=
ctx
>=
0
?
xd
->
counts
:
NULL
;
#else
const
int
ctx
=
partition_plane_context
(
xd
,
mi_row
,
mi_col
,
bsize
);
const
aom_prob
*
const
probs
=
cm
->
fc
->
partition_prob
[
ctx
];
...
...
av1/encoder/encodeframe.c
View file @
38cdce8e
...
...
@@ -3304,7 +3304,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#endif
bsize
);
#endif // CONFIG_CB4X4
const
int
*
partition_cost
=
x
->
partition_cost
[
pl
];
const
int
*
partition_cost
=
pl
>=
0
?
x
->
partition_cost
[
pl
]
:
NULL
;
#if CONFIG_SUPERTX
int
this_rate_nocoef
,
sum_rate_nocoef
=
0
,
best_rate_nocoef
=
INT_MAX
;
int
abort_flag
;
...
...
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