summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2018-11-27 12:29:47 -0800
committerJerome Jiang <jianj@google.com>2018-11-27 15:56:57 -0800
commit3861eb6d02fc43d2ed794f6f9e4ad6460404cb7b (patch)
treec647f0030c3d5f5b76f7fea3fd115da974ee19b0
parentb1022a018ba83da817036ce34349197d4f4b1b61 (diff)
downloadlibvpx-3861eb6d02fc43d2ed794f6f9e4ad6460404cb7b.tar
libvpx-3861eb6d02fc43d2ed794f6f9e4ad6460404cb7b.tar.gz
libvpx-3861eb6d02fc43d2ed794f6f9e4ad6460404cb7b.tar.bz2
libvpx-3861eb6d02fc43d2ed794f6f9e4ad6460404cb7b.zip
vp9 svc: copy block if ref buffer in denoiser is NULL.
BUG=b/119097707 Change-Id: I6569306e897da46a44f9d8f2fb28a2a355dd4c2c
-rw-r--r--vp9/encoder/vp9_denoiser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c
index ab91971a3..8c039b2cb 100644
--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -263,6 +263,14 @@ static VP9_DENOISER_DECISION perform_motion_compensation(
denoise_layer_idx = num_spatial_layers - spatial_layer - 1;
}
+ // Force copy (no denoise, copy source in denoised buffer) if
+ // running_avg_y[frame] is NULL.
+ if (denoiser->running_avg_y[frame].buffer_alloc == NULL) {
+ // Restore everything to its original state
+ *mi = saved_mi;
+ return COPY_BLOCK;
+ }
+
if (ctx->newmv_sse > sse_thresh(bs, increase_denoising)) {
// Restore everything to its original state
*mi = saved_mi;