Merge "Removing extraconfig_map from vp9_cx_iface.c."
This commit is contained in:
commit
df083b266a
@ -43,15 +43,7 @@ struct vp9_extracfg {
|
|||||||
vp9e_tune_content content;
|
vp9e_tune_content content;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct extraconfig_map {
|
static struct vp9_extracfg default_extra_cfg = {
|
||||||
unsigned int usage;
|
|
||||||
struct vp9_extracfg cfg;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct extraconfig_map extracfg_map[] = {
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
{ // NOLINT
|
|
||||||
NULL,
|
NULL,
|
||||||
0, // cpu_used
|
0, // cpu_used
|
||||||
1, // enable_auto_alt_ref
|
1, // enable_auto_alt_ref
|
||||||
@ -72,8 +64,6 @@ static const struct extraconfig_map extracfg_map[] = {
|
|||||||
0, // frame_periodic_delta_q
|
0, // frame_periodic_delta_q
|
||||||
BITS_8, // Bit depth
|
BITS_8, // Bit depth
|
||||||
VP9E_CONTENT_DEFAULT // content
|
VP9E_CONTENT_DEFAULT // content
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct vpx_codec_alg_priv {
|
struct vpx_codec_alg_priv {
|
||||||
@ -659,8 +649,6 @@ static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx,
|
|||||||
(void)data;
|
(void)data;
|
||||||
|
|
||||||
if (ctx->priv == NULL) {
|
if (ctx->priv == NULL) {
|
||||||
int i;
|
|
||||||
vpx_codec_enc_cfg_t *cfg;
|
|
||||||
struct vpx_codec_alg_priv *priv = calloc(1, sizeof(*priv));
|
struct vpx_codec_alg_priv *priv = calloc(1, sizeof(*priv));
|
||||||
|
|
||||||
if (priv == NULL)
|
if (priv == NULL)
|
||||||
@ -678,16 +666,7 @@ static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx,
|
|||||||
ctx->config.enc = &ctx->priv->alg_priv->cfg;
|
ctx->config.enc = &ctx->priv->alg_priv->cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg = &ctx->priv->alg_priv->cfg;
|
priv->extra_cfg = default_extra_cfg;
|
||||||
|
|
||||||
// Select the extra vp6 configuration table based on the current
|
|
||||||
// usage value. If the current usage value isn't found, use the
|
|
||||||
// values for usage case 0.
|
|
||||||
for (i = 0;
|
|
||||||
extracfg_map[i].usage && extracfg_map[i].usage != cfg->g_usage;
|
|
||||||
++i) {}
|
|
||||||
|
|
||||||
priv->extra_cfg = extracfg_map[i].cfg;
|
|
||||||
priv->extra_cfg.pkt_list = &priv->pkt_list.head;
|
priv->extra_cfg.pkt_list = &priv->pkt_list.head;
|
||||||
|
|
||||||
vp9_initialize_enc();
|
vp9_initialize_enc();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user