summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-08-21 11:10:13 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-08-21 11:10:13 -0700
commitdf083b266aac1a25044b7d43e630c51614791523 (patch)
tree349ca7c1ad0db73b6d1cb68dc3a4b0a18c579e64 /vp9
parenteafa7126a0694a2240947bafeb51920041a0fb1f (diff)
parentd4adf25d969765b2d9417cd52c663acaf8ae6e2d (diff)
downloadlibvpx-df083b266aac1a25044b7d43e630c51614791523.tar
libvpx-df083b266aac1a25044b7d43e630c51614791523.tar.gz
libvpx-df083b266aac1a25044b7d43e630c51614791523.tar.bz2
libvpx-df083b266aac1a25044b7d43e630c51614791523.zip
Merge "Removing extraconfig_map from vp9_cx_iface.c."
Diffstat (limited to 'vp9')
-rw-r--r--vp9/vp9_cx_iface.c65
1 files changed, 22 insertions, 43 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 752cd0d10..cdcd293bd 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -43,37 +43,27 @@ struct vp9_extracfg {
vp9e_tune_content content;
};
-struct extraconfig_map {
- unsigned int usage;
- struct vp9_extracfg cfg;
-};
-
-static const struct extraconfig_map extracfg_map[] = {
- {
- 0,
- { // NOLINT
- NULL,
- 0, // cpu_used
- 1, // enable_auto_alt_ref
- 0, // noise_sensitivity
- 0, // sharpness
- 0, // static_thresh
- 0, // tile_columns
- 0, // tile_rows
- 7, // arnr_max_frames
- 5, // arnr_strength
- 3, // arnr_type
- VP8_TUNE_PSNR, // tuning
- 10, // cq_level
- 0, // rc_max_intra_bitrate_pct
- 0, // lossless
- 0, // frame_parallel_decoding_mode
- NO_AQ, // aq_mode
- 0, // frame_periodic_delta_q
- BITS_8, // Bit depth
- VP9E_CONTENT_DEFAULT // content
- }
- }
+static struct vp9_extracfg default_extra_cfg = {
+ NULL,
+ 0, // cpu_used
+ 1, // enable_auto_alt_ref
+ 0, // noise_sensitivity
+ 0, // sharpness
+ 0, // static_thresh
+ 0, // tile_columns
+ 0, // tile_rows
+ 7, // arnr_max_frames
+ 5, // arnr_strength
+ 3, // arnr_type
+ VP8_TUNE_PSNR, // tuning
+ 10, // cq_level
+ 0, // rc_max_intra_bitrate_pct
+ 0, // lossless
+ 0, // frame_parallel_decoding_mode
+ NO_AQ, // aq_mode
+ 0, // frame_periodic_delta_q
+ BITS_8, // Bit depth
+ VP9E_CONTENT_DEFAULT // content
};
struct vpx_codec_alg_priv {
@@ -659,8 +649,6 @@ static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx,
(void)data;
if (ctx->priv == NULL) {
- int i;
- vpx_codec_enc_cfg_t *cfg;
struct vpx_codec_alg_priv *priv = calloc(1, sizeof(*priv));
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;
}
- cfg = &ctx->priv->alg_priv->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 = default_extra_cfg;
priv->extra_cfg.pkt_list = &priv->pkt_list.head;
vp9_initialize_enc();