ref: 57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e
parent: 1b0870233f8c2137f1aca79050be6f7c8f823c90
parent: 5eb3efa9bb042cd72903090ca6b6120753e2ad0e
author: Dmitry Kovalev <[email protected]>
date: Thu Aug 28 07:45:32 EDT 2014
Merge "Converting configure_skippable_frame() to is_skippable_frame()."
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2013,18 +2013,16 @@
}
}
-static void configure_skippable_frame(VP9_COMP *cpi) {
+static int is_skippable_frame(const VP9_COMP *cpi) {
// If the current frame does not have non-zero motion vector detected in the
// first pass, and so do its previous and forward frames, then this frame
// can be skipped for partition check, and the partition size is assigned
// according to the variance
+ const SVC *const svc = &cpi->svc;
+ const TWO_PASS *const twopass = is_spatial_svc(cpi) ?
+ &svc->layer_context[svc->spatial_layer_id].twopass : &cpi->twopass;
- SVC *const svc = &cpi->svc;
- TWO_PASS *const twopass = is_spatial_svc(cpi) ?
- &svc->layer_context[svc->spatial_layer_id].twopass
- : &cpi->twopass;
-
- cpi->skippable_frame = (!frame_is_intra_only(&cpi->common) &&
+ return (!frame_is_intra_only(&cpi->common) &&
twopass->stats_in - 2 > twopass->stats_in_start &&
twopass->stats_in < twopass->stats_in_end &&
(twopass->stats_in - 1)->pcnt_inter - (twopass->stats_in - 1)->pcnt_motion
@@ -2198,7 +2196,7 @@
// second pass according to the first pass stats
if (oxcf->pass == 2 &&
(!cpi->use_svc || is_spatial_svc(cpi))) {
- configure_skippable_frame(cpi);
+ cpi->skippable_frame = is_skippable_frame(cpi);
}
// For 1 pass CBR, check if we are dropping this frame.