]> granicus.if.org Git - libvpx/commitdiff
Fix to non-rd variance partition selection.
authorMarco <marpan@chromium.org>
Mon, 17 Aug 2015 19:25:58 +0000 (12:25 -0700)
committerMarco <marpan@chromium.org>
Mon, 17 Aug 2015 20:32:40 +0000 (13:32 -0700)
Only test for using golden as reference for variance partition
selection if it is used as a reference for that frame.

For temporal layers, golden may not be a reference on a given frame,
even though it was for some previous frame. If it is not a reference
for current frame, don't check/use it for partition selection.

Change-Id: I6b0f2bd36aebbb5903077c9a0a66d80f1de9a7b1

vp9/encoder/vp9_encodeframe.c

index 5c12dc4de65c2fcabc42420a2b5e189a1ce5783e..295a7512d64edcc4c5084368b2052ee5ba1ddc27 100644 (file)
@@ -717,7 +717,8 @@ static int choose_partitioning(VP9_COMP *cpi,
       yv12_g = get_ref_frame_buffer(cpi, GOLDEN_FRAME);
     }
 
-    if (yv12_g && yv12_g != yv12) {
+    if (yv12_g && yv12_g != yv12 &&
+       (cpi->ref_frame_flags & VP9_GOLD_FLAG)) {
       vp9_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col,
                            &cm->frame_refs[GOLDEN_FRAME - 1].sf);
       y_sad_g = cpi->fn_ptr[bsize].sdf(x->plane[0].src.buf,