mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
minor cosmetics
spotted in patch #34187 Change-Id: Ia706af6ef7674ec7a1d7250da08f718ed7c09e72
This commit is contained in:
parent
a792b913bd
commit
0b9e682934
@ -215,11 +215,9 @@ static int FinalizeTokenProbas(VP8Encoder* const enc) {
|
||||
// Finalize Segment probability based on the coding tree
|
||||
|
||||
static int GetProba(int a, int b) {
|
||||
int proba;
|
||||
const int total = a + b;
|
||||
if (total == 0) return 255; // that's the default probability.
|
||||
proba = (255 * a + total / 2) / total;
|
||||
return proba;
|
||||
return (total == 0) ? 255 // that's the default probability.
|
||||
: (255 * a + total / 2) / total; // rounded proba
|
||||
}
|
||||
|
||||
static void SetSegmentProbas(VP8Encoder* const enc) {
|
||||
|
@ -259,7 +259,7 @@ static void SimplifySegments(VP8Encoder* const enc) {
|
||||
}
|
||||
}
|
||||
if (num_final_segments < num_segments) { // Remap
|
||||
int i = enc->mb_w_* enc->mb_h_;
|
||||
int i = enc->mb_w_ * enc->mb_h_;
|
||||
while (i-- > 0) enc->mb_info_[i].segment_ = map[enc->mb_info_[i].segment_];
|
||||
enc->segment_hdr_.num_segments_ = num_final_segments;
|
||||
// Replicate the trailing segment infos (it's mostly cosmetics)
|
||||
|
Loading…
Reference in New Issue
Block a user