summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMinghai Shang <minghai@google.com>2014-11-04 11:46:48 -0800
committerMinghai Shang <minghai@google.com>2014-11-04 11:46:48 -0800
commit86c36a504dd7834e934707b86aa81ceb6384154c (patch)
treeec399a10ab215a5b2021227a7c2b69cc7c72bcde /vp9
parent0ca5908ff6a403ab4a792fac4bd165fb642fc90c (diff)
downloadlibvpx-86c36a504dd7834e934707b86aa81ceb6384154c.tar
libvpx-86c36a504dd7834e934707b86aa81ceb6384154c.tar.gz
libvpx-86c36a504dd7834e934707b86aa81ceb6384154c.tar.bz2
libvpx-86c36a504dd7834e934707b86aa81ceb6384154c.zip
[spatial svc] Make spatial svc working for one pass rate control
Change-Id: Ibd9114485c3d747f9d148f64f706bf873ea473ac
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encoder.c4
-rw-r--r--vp9/encoder/vp9_encoder.h5
2 files changed, 4 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index f8ff29993..8d37b8379 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -584,7 +584,7 @@ static void init_config(struct VP9_COMP *cpi, VP9EncoderConfig *oxcf) {
if ((cpi->svc.number_temporal_layers > 1 && cpi->oxcf.rc_mode == VPX_CBR) ||
((cpi->svc.number_temporal_layers > 1 ||
cpi->svc.number_spatial_layers > 1) &&
- cpi->oxcf.pass == 2)) {
+ cpi->oxcf.pass != 1)) {
vp9_init_layer_context(cpi);
}
@@ -1285,7 +1285,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
cpi->oxcf.rc_mode == VPX_CBR) ||
((cpi->svc.number_temporal_layers > 1 ||
cpi->svc.number_spatial_layers > 1) &&
- cpi->oxcf.pass == 2)) {
+ cpi->oxcf.pass != 1)) {
vp9_update_layer_context_change_config(cpi,
(int)cpi->oxcf.target_bandwidth);
}
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index 0e112f2ff..f0c05430a 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -531,9 +531,8 @@ void vp9_apply_encoding_flags(VP9_COMP *cpi, vpx_enc_frame_flags_t flags);
static INLINE int is_two_pass_svc(const struct VP9_COMP *const cpi) {
return cpi->use_svc &&
- (cpi->svc.number_temporal_layers > 1 ||
- cpi->svc.number_spatial_layers > 1) &&
- (cpi->oxcf.pass == 1 || cpi->oxcf.pass == 2);
+ ((cpi->svc.number_spatial_layers > 1) ||
+ (cpi->svc.number_temporal_layers > 1 && cpi->oxcf.pass != 0));
}
static INLINE int is_altref_enabled(const VP9_COMP *const cpi) {