diff options
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_denoiser.c | 8 | ||||
-rw-r--r-- | vp9/encoder/vp9_svc_layercontext.c | 17 | ||||
-rw-r--r-- | vp9/encoder/x86/vp9_quantize_avx2.c | 2 |
3 files changed, 19 insertions, 8 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; diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index c4c5b5a9f..0296d03d8 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -1092,13 +1092,16 @@ void vp9_svc_assert_constraints_pattern(VP9_COMP *const cpi) { } } else if (svc->use_gf_temporal_ref_current_layer && !svc->layer_context[svc->temporal_layer_id].is_key_frame) { - // If the usage of golden as second long term reference is enabled for this - // layer, then temporal_layer_id of that reference must be base temporal - // layer 0, and spatial_layer_id of that reference must be same as current - // spatial_layer_id. - assert(svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] == - svc->spatial_layer_id); - assert(svc->fb_idx_temporal_layer_id[cpi->gld_fb_idx] == 0); + // For the usage of golden as second long term reference: the + // temporal_layer_id of that reference must be base temporal layer 0, and + // spatial_layer_id of that reference must be same as current + // spatial_layer_id. If not, disable feature. + // TODO(marpan): Investigate when this can happen, and maybe put this check + // and reset in a different place. + if (svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] != + svc->spatial_layer_id || + svc->fb_idx_temporal_layer_id[cpi->gld_fb_idx] != 0) + svc->use_gf_temporal_ref_current_layer = 0; } } diff --git a/vp9/encoder/x86/vp9_quantize_avx2.c b/vp9/encoder/x86/vp9_quantize_avx2.c index 556a9fbaa..8dfdbd50f 100644 --- a/vp9/encoder/x86/vp9_quantize_avx2.c +++ b/vp9/encoder/x86/vp9_quantize_avx2.c @@ -15,7 +15,7 @@ #include "vpx/vpx_integer.h" #include "vpx_dsp/vpx_dsp_common.h" #include "vpx_dsp/x86/bitdepth_conversion_avx2.h" -#include "vpx_dsp/x86/quantize_x86.h" +#include "vpx_dsp/x86/quantize_sse2.h" // Zero fill 8 positions in the output buffer. static INLINE void store_zero_tran_low(tran_low_t *a) { |