ref: fb2a77deaa89cb2f5292b24234225cb01b125fcd
parent: 70835601d5580d38eaa100306b031f14f93f0454
parent: 7fc5e742320f6601f21098a45121b25a7ac52830
author: Yaowu Xu <yaowu@google.com>
date: Fri May 16 03:07:18 EDT 2014
Merge "Reuse precalculated result"
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2153,8 +2153,8 @@
double this_frame_coded_error;
int target;
LAYER_CONTEXT *lc = NULL;
- int is_spatial_svc = (cpi->use_svc && cpi->svc.number_temporal_layers == 1);
-
+ const int is_spatial_svc = (cpi->use_svc &&
+ cpi->svc.number_temporal_layers == 1);
if (is_spatial_svc) {
lc = &cpi->svc.layer_context[cpi->svc.spatial_layer_id];
frames_left = (int)(twopass->total_stats.count -
@@ -2214,7 +2214,7 @@
this_frame_copy = this_frame;
find_next_key_frame(cpi, &this_frame_copy);
// Don't place key frame in any enhancement layers in spatial svc
- if (cpi->use_svc && cpi->svc.number_temporal_layers == 1) {
+ if (is_spatial_svc) {
lc->is_key_frame = 1;
if (cpi->svc.spatial_layer_id > 0) {
cm->frame_type = INTER_FRAME;
@@ -2221,7 +2221,7 @@
}
}
} else {
- if (cpi->use_svc && cpi->svc.number_temporal_layers == 1) {
+ if (is_spatial_svc) {
lc->is_key_frame = 0;
}
cm->frame_type = INTER_FRAME;
--
⑨