diff options
author | Johann <johannkoenig@google.com> | 2015-05-15 11:52:03 -0700 |
---|---|---|
committer | Johann <johannkoenig@google.com> | 2015-05-26 12:01:52 -0700 |
commit | c3bdffb0a508ad08d5dfa613c029f368d4293d4c (patch) | |
tree | 4c087783da1d12bfbe09311ebb33f200e789ebf3 /vp8/encoder/pickinter.c | |
parent | 976f7f42c1ad1ff3cc0792572f9c4f41f05bb375 (diff) | |
download | libvpx-c3bdffb0a508ad08d5dfa613c029f368d4293d4c.tar libvpx-c3bdffb0a508ad08d5dfa613c029f368d4293d4c.tar.gz libvpx-c3bdffb0a508ad08d5dfa613c029f368d4293d4c.tar.bz2 libvpx-c3bdffb0a508ad08d5dfa613c029f368d4293d4c.zip |
Move variance functions to vpx_dsp
subpel functions will be moved in another patch.
Change-Id: Idb2e049bad0b9b32ac42cc7731cd6903de2826ce
Diffstat (limited to 'vp8/encoder/pickinter.c')
-rw-r--r-- | vp8/encoder/pickinter.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c index 98ea5a040..053bf119a 100644 --- a/vp8/encoder/pickinter.c +++ b/vp8/encoder/pickinter.c @@ -11,6 +11,7 @@ #include <limits.h> #include "vpx_config.h" +#include "./vpx_dsp_rtcd.h" #include "onyx_int.h" #include "modecosts.h" #include "encodeintra.h" @@ -215,33 +216,6 @@ int vp8_get_inter_mbpred_error(MACROBLOCK *mb, } - -unsigned int vp8_get4x4sse_cs_c -( - const unsigned char *src_ptr, - int source_stride, - const unsigned char *ref_ptr, - int recon_stride -) -{ - int distortion = 0; - int r, c; - - for (r = 0; r < 4; r++) - { - for (c = 0; c < 4; c++) - { - int diff = src_ptr[c] - ref_ptr[c]; - distortion += diff * diff; - } - - src_ptr += source_stride; - ref_ptr += recon_stride; - } - - return distortion; -} - static int get_prediction_error(BLOCK *be, BLOCKD *b) { unsigned char *sptr; @@ -249,7 +223,7 @@ static int get_prediction_error(BLOCK *be, BLOCKD *b) sptr = (*(be->base_src) + be->src); dptr = b->predictor; - return vp8_get4x4sse_cs(sptr, be->src_stride, dptr, 16); + return vpx_get4x4sse_cs(sptr, be->src_stride, dptr, 16); } @@ -1037,7 +1011,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, else { rate2 += rate; - distortion2 = vp8_variance16x16( + distortion2 = vpx_variance16x16( *(b->base_src), b->src_stride, x->e_mbd.predictor, 16, &sse); this_rd = RDCOST(x->rdmult, x->rddiv, rate2, distortion2); @@ -1066,7 +1040,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, xd->dst.y_stride, xd->predictor, 16); - distortion2 = vp8_variance16x16 + distortion2 = vpx_variance16x16 (*(b->base_src), b->src_stride, x->e_mbd.predictor, 16, &sse); rate2 += x->mbmode_cost[x->e_mbd.frame_type][x->e_mbd.mode_info_context->mbmi.mode]; @@ -1547,7 +1521,7 @@ void vp8_pick_intra_mode(MACROBLOCK *x, int *rate_) xd->dst.y_stride, xd->predictor, 16); - distortion = vp8_variance16x16 + distortion = vpx_variance16x16 (*(b->base_src), b->src_stride, xd->predictor, 16, &sse); rate = x->mbmode_cost[xd->frame_type][mode]; this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); |