From: Dmitry Kovalev Date: Thu, 1 May 2014 18:41:01 +0000 (-0700) Subject: Simplifying vp9_is_upper_layer_key_frame(). X-Git-Tag: v1.4.0~1695^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eae4a467a8dbeda683f247ec8434c4418d0e5fe2;p=libvpx Simplifying vp9_is_upper_layer_key_frame(). Change-Id: Ib56df7cd282dadbfd202de23f0c746a93b5ce63e --- diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index 5342447d6..792e8d21b 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -221,15 +221,9 @@ void vp9_inc_frame_in_layer(SVC *svc) { ++lc->current_video_frame_in_layer; } -int vp9_is_upper_layer_key_frame(const struct VP9_COMP *const cpi) { - int is_upper_layer_key_frame = 0; - - if (cpi->use_svc && cpi->svc.number_temporal_layers == 1 && - cpi->svc.spatial_layer_id > 0) { - if (cpi->svc.layer_context[cpi->svc.spatial_layer_id].is_key_frame) { - is_upper_layer_key_frame = 1; - } - } - - return is_upper_layer_key_frame; +int vp9_is_upper_layer_key_frame(const VP9_COMP *cpi) { + return cpi->use_svc && + cpi->svc.number_temporal_layers == 1 && + cpi->svc.spatial_layer_id > 0 && + cpi->svc.layer_context[cpi->svc.spatial_layer_id].is_key_frame; }