]> granicus.if.org Git - libvpx/commitdiff
Use UV prediction when deciding to skip in for lossless.
authorAlex Converse <aconverse@google.com>
Thu, 26 Jun 2014 19:55:37 +0000 (12:55 -0700)
committerAlex Converse <aconverse@google.com>
Thu, 26 Jun 2014 21:34:56 +0000 (14:34 -0700)
Change-Id: Ic149749157d762039446d14472d40d9211c6451a

vp9/encoder/vp9_pickmode.c

index 4c340ea0bf6d4328d5d0a4017eb361e858d40df7..f007d1cb1080a57b97b58a8b1bb0139378a6c289 100644 (file)
@@ -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,