aboutsummaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encoder.c1
-rw-r--r--vp9/encoder/vp9_encoder.h3
-rw-r--r--vp9/encoder/vp9_ratectrl.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index e27a77e2e..be5515014 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4065,6 +4065,7 @@ static int encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
cpi->rc.hybrid_intra_scene_change = 0;
cpi->rc.re_encode_maxq_scene_change = 0;
if (cm->show_frame && cpi->oxcf.mode == REALTIME &&
+ !cpi->disable_scene_detection_rtc_ratectrl &&
(cpi->oxcf.rc_mode == VPX_VBR ||
cpi->oxcf.content == VP9E_CONTENT_SCREEN ||
(cpi->oxcf.speed >= 5 && cpi->oxcf.speed < 8)))
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index 171489358..160de0064 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -1041,6 +1041,9 @@ typedef struct VP9_COMP {
// (good/best/realtime).
MODE deadline_mode_previous_frame;
+ // Flag to disable scene detection when rtc rate control library is used.
+ int disable_scene_detection_rtc_ratectrl;
+
#if CONFIG_COLLECT_COMPONENT_TIMING
/*!
* component_time[] are initialized to zero while encoder starts.
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index aa77b7cba..6452e349d 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -680,7 +680,8 @@ static int adjust_q_cbr(const VP9_COMP *cpi, int q) {
else
q = qclamp;
}
- if (cpi->oxcf.content == VP9E_CONTENT_SCREEN)
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+ cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
vp9_cyclic_refresh_limit_q(cpi, &q);
return VPXMAX(VPXMIN(q, cpi->rc.worst_quality), cpi->rc.best_quality);
}