ref: 14f132648a53bb40e1d81fdce10b494656366b46
parent: b0050f27e27c59312a12c037b263a1bb71df4f3c
parent: 7b93b56ab9b27f3c2a72e05b7ea3b5e85a06f5fa
author: Jerome Jiang <jianj@google.com>
date: Fri Jan 22 21:19:55 EST 2021
Merge "Do not reuse mv in base spatial layer if curr buf same as prev."
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -7882,9 +7882,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;