History

vp9_ratectrl,vp9_resize_one_pass_cbr: rm redundant casts

avg_frame_bandwidth is an int, quiets a clang-tidy warning

James Zern committed 6 years ago

Commit c211b821 parent 97356ac1 file · +3 −3Browse files

Unified · Split

vp9/encoder/vp9_ratectrl.c+3−3
@@ -2705,18 +2705,18 @@ int vp9_resize_one_pass_cbr(VP9_COMP *cpi) { · 2704 unmodified lines
2705 // Force downsize based on per-frame-bandwidth, for extreme case,2705 // Force downsize based on per-frame-bandwidth, for extreme case,
2706 // for HD input.2706 // for HD input.
2707 if (cpi->resize_state == ORIG && cm->width * cm->height >= 1280 * 720) {2707 if (cpi->resize_state == ORIG && cm->width * cm->height >= 1280 * 720) {
2708 if (rc->avg_frame_bandwidth < (int)(300000 / 30)) {2708 if (rc->avg_frame_bandwidth < 300000 / 30) {
2709 resize_action = DOWN_ONEHALF;2709 resize_action = DOWN_ONEHALF;
2710 cpi->resize_state = ONE_HALF;2710 cpi->resize_state = ONE_HALF;
2711 force_downsize_rate = 1;2711 force_downsize_rate = 1;
2712 } else if (rc->avg_frame_bandwidth < (int)(400000 / 30)) {2712 } else if (rc->avg_frame_bandwidth < 400000 / 30) {
2713 resize_action = ONEHALFONLY_RESIZE ? DOWN_ONEHALF : DOWN_THREEFOUR;2713 resize_action = ONEHALFONLY_RESIZE ? DOWN_ONEHALF : DOWN_THREEFOUR;
2714 cpi->resize_state = ONEHALFONLY_RESIZE ? ONE_HALF : THREE_QUARTER;2714 cpi->resize_state = ONEHALFONLY_RESIZE ? ONE_HALF : THREE_QUARTER;
2715 force_downsize_rate = 1;2715 force_downsize_rate = 1;
2716 }2716 }
2717 } else if (cpi->resize_state == THREE_QUARTER &&2717 } else if (cpi->resize_state == THREE_QUARTER &&
2718 cm->width * cm->height >= 960 * 540) {2718 cm->width * cm->height >= 960 * 540) {
2719 if (rc->avg_frame_bandwidth < (int)(300000 / 30)) {2719 if (rc->avg_frame_bandwidth < 300000 / 30) {
2720 resize_action = DOWN_ONEHALF;2720 resize_action = DOWN_ONEHALF;
2721 cpi->resize_state = ONE_HALF;2721 cpi->resize_state = ONE_HALF;
2722 force_downsize_rate = 1;2722 force_downsize_rate = 1;

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