summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2011-04-01 16:41:58 -0400
committerYunqing Wang <yunqingwang@google.com>2011-04-01 16:41:58 -0400
commit3d6815817cc0d74bbc42294f9fbca01f7840aeef (patch)
tree2d097e03587b8e501a13f5c16475c80b3d6dcdc6 /vp8/encoder/onyx_if.c
parent534ea700bd690e8f3f6e0d9db930b3bf65a08cac (diff)
downloadlibvpx-3d6815817cc0d74bbc42294f9fbca01f7840aeef.tar
libvpx-3d6815817cc0d74bbc42294f9fbca01f7840aeef.tar.gz
libvpx-3d6815817cc0d74bbc42294f9fbca01f7840aeef.tar.bz2
libvpx-3d6815817cc0d74bbc42294f9fbca01f7840aeef.zip
Use full-pixel MV in mvsadcost calculation
MV sad cost error is only used in full-pixel motion search, which only need full-pixel resolution instead of quarter-pixel resolution. This change reduced mvsadcost table size, and removed unneccessary pamameter passing since this table is constant once it is generated. Change-Id: I9f931e55f6abc3c99011321f1dfb2f3562e6f6b0
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r--vp8/encoder/onyx_if.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 931c51a66..e5d2bd84c 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1797,13 +1797,13 @@ static void cal_mvsadcosts(int *mvsadcost[2])
do
{
- double z = 256 * (2 * (log2f(2 * i) + .6));
+ double z = 256 * (2 * (log2f(8 * i) + .6));
mvsadcost [0][i] = (int) z;
mvsadcost [1][i] = (int) z;
mvsadcost [0][-i] = (int) z;
mvsadcost [1][-i] = (int) z;
}
- while (++i <= mv_max);
+ while (++i <= mvfp_max);
}
VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
@@ -2000,8 +2000,8 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
cpi->mb.mvcost[0] = &cpi->mb.mvcosts[0][mv_max+1];
cpi->mb.mvcost[1] = &cpi->mb.mvcosts[1][mv_max+1];
- cpi->mb.mvsadcost[0] = &cpi->mb.mvsadcosts[0][mv_max+1];
- cpi->mb.mvsadcost[1] = &cpi->mb.mvsadcosts[1][mv_max+1];
+ cpi->mb.mvsadcost[0] = &cpi->mb.mvsadcosts[0][mvfp_max+1];
+ cpi->mb.mvsadcost[1] = &cpi->mb.mvsadcosts[1][mvfp_max+1];
cal_mvsadcosts(cpi->mb.mvsadcost);