summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-08-28 11:45:32 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-08-28 11:45:32 -0700
commit57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e (patch)
tree31890e9c963f849ca8c754b1992368b5d19cc012 /vp9/encoder
parent1b0870233f8c2137f1aca79050be6f7c8f823c90 (diff)
parent5eb3efa9bb042cd72903090ca6b6120753e2ad0e (diff)
downloadlibvpx-57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e.tar
libvpx-57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e.tar.gz
libvpx-57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e.tar.bz2
libvpx-57e0b2baf3ec5408770c8238f5ecd5e7e9195d4e.zip
Merge "Converting configure_skippable_frame() to is_skippable_frame()."
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encoder.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 8464882ea..9c41dd06a 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2013,18 +2013,16 @@ YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
}
}
-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 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
// 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.