return update_extracfg(ctx, &extra_cfg);
}
+static vpx_codec_err_t ctrl_set_rtc_external_ratectrl(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
+ VP8_COMP *cpi = ctx->cpi;
+ const unsigned int data = CAST(VP8E_SET_GF_CBR_BOOST_PCT, args);
+ if (data) {
+ cpi->cyclic_refresh_mode_enabled = 0;
+ }
+ return VPX_CODEC_OK;
+}
+
static vpx_codec_err_t vp8e_mr_alloc_mem(const vpx_codec_enc_cfg_t *cfg,
void **mem_loc) {
vpx_codec_err_t res = VPX_CODEC_OK;
{ VP8E_SET_MAX_INTRA_BITRATE_PCT, set_rc_max_intra_bitrate_pct },
{ VP8E_SET_SCREEN_CONTENT_MODE, set_screen_content_mode },
{ VP8E_SET_GF_CBR_BOOST_PCT, ctrl_set_rc_gf_cbr_boost_pct },
+ { VP8E_SET_RTC_EXTERNAL_RATECTRL, ctrl_set_rtc_external_ratectrl },
{ -1, NULL },
};
* Supported in codecs: VP9
*/
VP9E_GET_LAST_QUANTIZER_SVC_LAYERS,
+
+ /*!\brief Codec control to disable internal features in rate control.
+ *
+ * This will turn off cyclic refresh for vp8.
+ *
+ * With those, the rate control is expected to work exactly the same as the
+ * interface provided in vp8_ratectrl_rtc.cc/h
+ *
+ * Supported in codecs: VP8
+ */
+ VP8E_SET_RTC_EXTERNAL_RATECTRL,
};
/*!\brief vpx 1-D scaling mode
VPX_CTRL_USE_TYPE(VP9E_SET_RTC_EXTERNAL_RATECTRL, int)
#define VPX_CTRL_VP9E_SET_RTC_EXTERNAL_RATECTRL
+VPX_CTRL_USE_TYPE(VP8E_SET_RTC_EXTERNAL_RATECTRL, int)
+#define VPX_CTRL_VP8E_SET_RTC_EXTERNAL_RATECTRL
+
VPX_CTRL_USE_TYPE(VP9E_SET_EXTERNAL_RATE_CONTROL, vpx_rc_funcs_t *)
#define VPX_CTRL_VP9E_SET_EXTERNAL_RATE_CONTROL