]> granicus.if.org Git - libvpx/commitdiff
sad_test: fix vp8-only build
authorJames Zern <jzern@google.com>
Wed, 19 Nov 2014 03:27:06 +0000 (19:27 -0800)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 20 Nov 2014 03:18:25 +0000 (19:18 -0800)
ROUND_POWER_OF_TWO() is defined in vp9 headers currently, avoid it in
non-high-bitdepth code

Change-Id: Ic28b8f95ef7964800475ee8b35be5f9cea9afab6

test/sad_test.cc

index 615aad469d17c65f97d9de4a2df2eebfc0183189..114f0afa933d087a55c19e151974a01c9c34abdb 100644 (file)
@@ -234,7 +234,7 @@ class SADTestBase : public ::testing::Test {
 #else
         const int tmp = second_pred[h * width_ + w] +
             reference[h * reference_stride_ + w];
-        const uint8_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
+        const uint8_t comp_pred = (tmp + 1) >> 1;
         sad += abs(source[h * source_stride_ + w] - comp_pred);
 #endif
       }