Skip to content
GitLab
Projects
Groups
Snippets
/
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
bbcd8f76
Commit
bbcd8f76
authored
Oct 04, 2017
by
Angie Chiang
Browse files
Reduce division operations in update_scan_prob
Change-Id: I923931a9dbf828eb13670511852d55c953b479c1
parent
92acb81b
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/common/scan.c
View file @
bbcd8f76
...
...
@@ -8208,11 +8208,12 @@ static void update_scan_prob(AV1_COMMON *cm, TX_SIZE tx_size, TX_TYPE tx_type,
}
#endif
int i;
const int inv_precision = 30;
int32_t inv_block_num = block_num == 0 ? 0 : (1 << inv_precision) / block_num;
for (i = 0; i < tx2d_size; i++) {
int64_t curr_prob =
block_num == 0
? 0
: (non_zero_count[i] << ADAPT_SCAN_PROB_PRECISION) / block_num;
block_num == 0 ? 0 : ((non_zero_count[i] * inv_block_num) >>
(inv_precision - ADAPT_SCAN_PROB_PRECISION));
int64_t prev_prob = prev_non_zero_prob[i];
int64_t pred_prob =
(curr_prob * rate +
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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