ref: 5be37810d26d224f1ec75ff688d21aeadb863501
parent: 22b23e4d98a363cc94ec38c18ddb4940066cf76a
parent: 47321016da8eaa0427eec81b42563f047b9e7aa6
author: Jerome Jiang <jianj@google.com>
date: Tue Jan 28 19:53:15 EST 2020
Merge "Fix initialization of delta_q_uv"
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -61,6 +61,7 @@
int render_height;
unsigned int row_mt;
unsigned int motion_vector_unit_test;
+ int delta_q_uv;
} vp9_extracfg;
static struct vp9_extracfg default_extra_cfg = {
@@ -95,6 +96,7 @@
0, // render height
0, // row_mt
0, // motion_vector_unit_test
+ 0, // delta_q_uv
};
struct vpx_codec_alg_priv {
@@ -601,6 +603,8 @@
oxcf->row_mt = extra_cfg->row_mt;
oxcf->motion_vector_unit_test = extra_cfg->motion_vector_unit_test;
+ oxcf->delta_q_uv = extra_cfg->delta_q_uv;
+
for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {
for (tl = 0; tl < oxcf->ts_number_layers; ++tl) {
oxcf->layer_target_bitrate[sl * oxcf->ts_number_layers + tl] =
@@ -1642,12 +1646,11 @@
static vpx_codec_err_t ctrl_set_delta_q_uv(vpx_codec_alg_priv_t *ctx,
va_list args) {
+ struct vp9_extracfg extra_cfg = ctx->extra_cfg;
int data = va_arg(args, int);
- VP9_COMP *const cpi = ctx->cpi;
data = VPXMIN(VPXMAX(data, -20), 20);
- cpi->oxcf.delta_q_uv = data;
- ctx->oxcf.delta_q_uv = data;
- return VPX_CODEC_OK;
+ extra_cfg.delta_q_uv = data;
+ return update_extra_cfg(ctx, &extra_cfg);
}
static vpx_codec_err_t ctrl_register_cx_callback(vpx_codec_alg_priv_t *ctx,