shithub: libvpx

Download patch

ref: 7b93b56ab9b27f3c2a72e05b7ea3b5e85a06f5fa
parent: b5d77a48d740e211a130c8e45d9353ef8c154a47
author: Jerome Jiang <jianj@google.com>
date: Thu Jan 21 08:07:20 EST 2021

Do not reuse mv in base spatial layer if curr buf same as prev.

Bug: b/154890543
Change-Id: Iad5791912f781d225e610a61bc13f3dbaef81bb9

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -7861,9 +7861,12 @@
   cm->new_fb_idx = get_free_fb(cm);
 
   if (cm->new_fb_idx == INVALID_IDX) return -1;
-
   cm->cur_frame = &pool->frame_bufs[cm->new_fb_idx];
-
+  // If the frame buffer for current frame is the same as previous frame, MV in
+  // the base layer shouldn't be used as it'll cause data race.
+  if (cm->cur_frame == cm->prev_frame) {
+    cpi->svc.use_base_mv = 0;
+  }
   // Start with a 0 size frame.
   *size = 0;