From: Alex Converse Date: Thu, 26 Jun 2014 19:55:37 +0000 (-0700) Subject: Use UV prediction when deciding to skip in for lossless. X-Git-Tag: v1.4.0~1322^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aed52718762148cd2725f5456cef793c939a38d0;p=libvpx Use UV prediction when deciding to skip in for lossless. Change-Id: Ic149749157d762039446d14472d40d9211c6451a --- diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 4c340ea0b..f007d1cb1 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -576,8 +576,14 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, unsigned int sse_u, sse_v; unsigned int var_u, var_v; - // Skip u v prediction for less calculation, that won't affect - // result much. + // Skip UV prediction unless breakout is zero (lossless) to save + // computation with low impact on the result + if (x->encode_breakout == 0) { + xd->plane[1].pre[0] = yv12_mb[ref_frame][1]; + xd->plane[2].pre[0] = yv12_mb[ref_frame][2]; + vp9_build_inter_predictors_sbuv(xd, mi_row, mi_col, bsize); + } + var_u = cpi->fn_ptr[uv_size].vf(x->plane[1].src.buf, x->plane[1].src.stride, xd->plane[1].dst.buf,