History

Make this/next iiratio unsigned.

This patch addresses issue #79, which is a regression since commit 28de670 "Fix RD bug." If the coded error value is zero, the iiratio calculation effectively multiplies by 1000000 by the DOUBLE_DIVIDE_CHECK macro. This can result in a value larger than INT_MAX, giving a negative ratio. Since the error values are conceptually unsigned (though they're stored in a double) this patch makes the iiratio values unsigned, which allows the clamping to work as expected.

John Koleszar committed 16 years ago

Commit cd475da1 parent 00d566e1 file · +2 −2Browse files

Unified · Split

vp8/encoder/onyx_int.h+2−2
@@ -523,8 +523,8 @@ typedef struct · 522 unmodified lines
523523 int motion_lvl;
524524 int motion_speed;
525525 int motion_var;
526− int next_iiratio;
527− int this_iiratio;
526+ unsigned int next_iiratio;
527+ unsigned int this_iiratio;
528528 int this_frame_modified_error;
529529
530530 double norm_intra_err_per_mb;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t