Commit 0f37601f authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review
Browse files

Merge changes I1b972c94,I9c897d32

* changes:
  Prevent invalid memory access
  Use correct bsize for uv
parents 915d5c12 8cbeb7cf
......@@ -595,9 +595,16 @@ static void choose_partitioning(VP9_COMP *cpi,
for (i = 1; i <= 2; ++i) {
struct macroblock_plane *p = &x->plane[i];
struct macroblockd_plane *pd = &xd->plane[i];
#if GLOBAL_MOTION
const BLOCK_SIZE bs = get_plane_block_size(bsize, pd);
#else
const BLOCK_SIZE bs = get_plane_block_size(BLOCK_64X64, pd);
uv_sad = cpi->fn_ptr[bs].sdf(p->src.buf, p->src.stride,
pd->dst.buf, pd->dst.stride);
#endif
if (bs == BLOCK_INVALID)
uv_sad = INT_MAX;
else
uv_sad = cpi->fn_ptr[bs].sdf(p->src.buf, p->src.stride,
pd->dst.buf, pd->dst.stride);
#if GLOBAL_MOTION
x->color_sensitivity[i - 1] = uv_sad * 4 > y_sad;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment