summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-04-16 10:39:23 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-04-16 17:00:27 -0700
commitb6ec6930e555659bdf3849e2fd43100b28f9315f (patch)
tree1101aea4d2af0db735b4b926089987253ecbb5ea
parentef2f6dae6f3b225bed448df21fb52968c851ac71 (diff)
downloadlibvpx-b6ec6930e555659bdf3849e2fd43100b28f9315f.tar
libvpx-b6ec6930e555659bdf3849e2fd43100b28f9315f.tar.gz
libvpx-b6ec6930e555659bdf3849e2fd43100b28f9315f.tar.bz2
libvpx-b6ec6930e555659bdf3849e2fd43100b28f9315f.zip
Remove redundant buffer initialization and mode_info assignments
There is no need to initialize source/dst frame buffers at frame level. These will be done at block coding stage. This commit hence removes the redundant operations. Change-Id: I11d9f2556058c6205c8e58ed53e31f78622c41b7
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 0498a3f11..87fcd35ce 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1330,8 +1330,10 @@ static int is_background(VP9_COMP *cpi, const TileInfo *const tile,
int threshold = 0;
vp9_setup_src_planes(x, cpi->Source, mi_row, mi_col);
+
src_stride = x->plane[0].src.stride;
src = x->plane[0].src.buf;
+
pre_stride = cpi->Last_Source->y_stride;
pre = cpi->Last_Source->y_buffer + (mi_row * MI_SIZE) * pre_stride +
(mi_col * MI_SIZE);
@@ -2375,16 +2377,8 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
// Copy data over into macro block data structures.
vp9_setup_src_planes(x, cpi->Source, 0, 0);
- // TODO(jkoleszar): are these initializations required?
- vp9_setup_pre_planes(xd, 0, get_ref_frame_buffer(cpi, LAST_FRAME), 0, 0,
- NULL);
- vp9_setup_dst_planes(xd, get_frame_new_buffer(cm), 0, 0);
-
vp9_setup_block_planes(&x->e_mbd, cm->subsampling_x, cm->subsampling_y);
- xd->mi[0]->mbmi.mode = DC_PRED;
- xd->mi[0]->mbmi.uv_mode = DC_PRED;
-
// Note: this memset assumes above_context[0], [1] and [2]
// are allocated as part of the same buffer.
vpx_memset(xd->above_context[0], 0,