diff options
author | Jingning Han <jingning@google.com> | 2014-04-16 15:43:38 -0700 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2014-04-17 11:07:32 -0700 |
commit | 42c1f6dbf4771975654f48122e1b27e633d90412 (patch) | |
tree | 57a439e87bc4d42eb7dc13b55a924939df48a445 /vp9 | |
parent | 96a381c25541dceed788b5b62245bab8e74f4ae9 (diff) | |
download | libvpx-42c1f6dbf4771975654f48122e1b27e633d90412.tar libvpx-42c1f6dbf4771975654f48122e1b27e633d90412.tar.gz libvpx-42c1f6dbf4771975654f48122e1b27e633d90412.tar.bz2 libvpx-42c1f6dbf4771975654f48122e1b27e633d90412.zip |
Skip fetching original frame pointers for UV in background check
The background detection only tracks luma component. This commits
removes the frame buffer pointer retrieval for chroma components.
Change-Id: I098bd2950f5e5829ed5dc2b48568167248da7fad
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index feaf7043a..213f3a91f 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1273,7 +1273,6 @@ static void set_source_var_based_partition(VP9_COMP *cpi, static int is_background(VP9_COMP *cpi, const TileInfo *const tile, int mi_row, int mi_col) { - MACROBLOCK *const x = &cpi->mb; uint8_t *src, *pre; int src_stride, pre_stride; @@ -1283,11 +1282,10 @@ static int is_background(VP9_COMP *cpi, const TileInfo *const tile, int this_sad = 0; 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; - + // This assumes the input source frames are of the same dimension. + src_stride = cpi->Source->y_stride; + src = cpi->Source->y_buffer + (mi_row * MI_SIZE) * src_stride + + (mi_col * MI_SIZE); pre_stride = cpi->Last_Source->y_stride; pre = cpi->Last_Source->y_buffer + (mi_row * MI_SIZE) * pre_stride + (mi_col * MI_SIZE); |