Improve bounds checking in vp8_diamond_search_sadx4()
authorYunqing Wang <yunqingwang@google.com>
Thu, 14 Oct 2010 15:06:37 +0000 (11:06 -0400)
committerYunqing Wang <yunqingwang@google.com>
Thu, 14 Oct 2010 15:06:37 +0000 (11:06 -0400)
commitd6da7b8ea1092d3c99591b2087811ad22d667d1b
treef46e4b773e1709834fa9d0b0de235b984c4d1bc9
parente50f5d40376b3817fa2bf2e2b2fdf8a0084c3460
Improve bounds checking in vp8_diamond_search_sadx4()

In order to know if all 4/8 neighbor points are within the bounds,
4 bounds checking are enough instead of checking 4 bounds for
each points (16/32 checkings). This improvement reduces cost of
vp8_diamond_search_sadx4() by 30%, and gives encoder a 1.5%
performance gain (test options: 1 pass, good, speed=4).

Change-Id: Ie8da29d18a6ecfc9829e74ac02f6fa70e042331a
vp8/encoder/mcomp.c