From e325478e89f46bcecfbc3461cee6f73aa740f46b Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Fri, 2 Sep 2016 10:11:59 -0700 Subject: [PATCH] Two minor improvements from libvpx 1. mem.h: improve the macro to handle n==0 2. borders_test.cc: fix a typo in Change-Id: I24729aaf7282b2080d9a8325d481887b54341260 --- aom_ports/mem.h | 4 ++-- test/borders_test.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aom_ports/mem.h b/aom_ports/mem.h index f8ba900e7..4789d29bc 100644 --- a/aom_ports/mem.h +++ b/aom_ports/mem.h @@ -38,8 +38,8 @@ #define __builtin_prefetch(x) #endif -/* Shift down with rounding */ -#define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n)-1))) >> (n)) +/* Shift down with rounding for use when n >= 0, value >= 0 */ +#define ROUND_POWER_OF_TWO(value, n) (((value) + (((1 << (n)) >> 1))) >> (n)) /* Shift down with rounding for signed integers, for use when n >= 0 */ #define ROUND_POWER_OF_TWO_SIGNED(value, n) \ diff --git a/test/borders_test.cc b/test/borders_test.cc index 2bfcbd70f..0b8200fc8 100644 --- a/test/borders_test.cc +++ b/test/borders_test.cc @@ -55,7 +55,7 @@ TEST_P(BordersTest, TestEncodeHighBitrate) { // extend into the border and test the border condition. cfg_.g_lag_in_frames = 25; cfg_.rc_2pass_vbr_minsection_pct = 5; - cfg_.rc_2pass_vbr_minsection_pct = 2000; + cfg_.rc_2pass_vbr_maxsection_pct = 2000; cfg_.rc_target_bitrate = 2000; cfg_.rc_max_quantizer = 10; -- GitLab