Merge "Revert "Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enums""
diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h
index adc8326..05c72df 100644
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -217,7 +217,7 @@
   vpx_fixed_buf_t two_pass_stats_in;
   struct vpx_codec_pkt_list *output_pkt_list;
 
-  vpx_tuning tuning;
+  vp8e_tuning tuning;
 
   /* Temporal scaling parameters */
   unsigned int number_of_layers;
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index 624d60c..2b3d956 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -426,7 +426,7 @@
     }
 #endif
 
-    if (cpi->oxcf.tuning == VPX_TUNE_SSIM) vp8_activity_masking(cpi, x);
+    if (cpi->oxcf.tuning == VP8_TUNE_SSIM) vp8_activity_masking(cpi, x);
 
     /* Is segmentation enabled */
     /* MB level adjustment to quantizer */
@@ -720,7 +720,7 @@
 
   vp8cx_initialize_me_consts(cpi, cm->base_qindex);
 
-  if (cpi->oxcf.tuning == VPX_TUNE_SSIM) {
+  if (cpi->oxcf.tuning == VP8_TUNE_SSIM) {
     /* Initialize encode frame context. */
     init_encode_frame_mb_context(cpi);
 
@@ -1086,7 +1086,7 @@
     vp8_pick_intra_mode(x, &rate);
   }
 
-  if (cpi->oxcf.tuning == VPX_TUNE_SSIM) {
+  if (cpi->oxcf.tuning == VP8_TUNE_SSIM) {
     adjust_act_zbin(cpi, x);
     vp8_update_zbin_extra(cpi, x);
   }
@@ -1172,7 +1172,7 @@
   x->prediction_error += distortion;
   x->intra_error += intra_error;
 
-  if (cpi->oxcf.tuning == VPX_TUNE_SSIM) {
+  if (cpi->oxcf.tuning == VP8_TUNE_SSIM) {
     /* Adjust the zbin based on this MB rate. */
     adjust_act_zbin(cpi, x);
   }
diff --git a/vp8/encoder/ethreading.c b/vp8/encoder/ethreading.c
index 7714d9d..55a1528 100644
--- a/vp8/encoder/ethreading.c
+++ b/vp8/encoder/ethreading.c
@@ -149,7 +149,7 @@
           /* Copy current mb to a buffer */
           vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 
-          if (cpi->oxcf.tuning == VPX_TUNE_SSIM) vp8_activity_masking(cpi, x);
+          if (cpi->oxcf.tuning == VP8_TUNE_SSIM) vp8_activity_masking(cpi, x);
 
           /* Is segmentation enabled */
           /* MB level adjustment to quantizer */
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index bd29120..d65bf96 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -38,7 +38,7 @@
   unsigned int arnr_max_frames; /* alt_ref Noise Reduction Max Frame Count */
   unsigned int arnr_strength;   /* alt_ref Noise Reduction Strength */
   unsigned int arnr_type;       /* alt_ref filter type */
-  vpx_tuning tuning;
+  vp8e_tuning tuning;
   unsigned int cq_level; /* constrained quality level */
   unsigned int rc_max_intra_bitrate_pct;
   unsigned int gf_cbr_boost_pct;
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index f41dfa0..a5d59b6 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -269,7 +269,7 @@
   const int col = mi_col / num_8x8_w;
   const int index = row * num_cols + col;
 
-  assert(cpi->oxcf.tuning == VPX_TUNE_SSIM);
+  assert(cpi->oxcf.tuning == VP8_TUNE_SSIM);
   vpx_clear_system_state();
   return cpi->mi_ssim_rdmult_scaling_factors[index];
 }
@@ -309,7 +309,7 @@
   // R/D setup.
   x->rddiv = cpi->rd.RDDIV;
   x->rdmult = cpi->rd.RDMULT;
-  if (oxcf->tuning == VPX_TUNE_SSIM) {
+  if (oxcf->tuning == VP8_TUNE_SSIM) {
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     x->rdmult = (int)(ssim_factor * x->rdmult);
@@ -1961,7 +1961,7 @@
     }
   }
 
-  if (oxcf->tuning == VPX_TUNE_SSIM) {
+  if (oxcf->tuning == VP8_TUNE_SSIM) {
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     x->rdmult = (int)(ssim_factor * x->rdmult);
@@ -2207,7 +2207,7 @@
       cpi->oxcf.aq_mode == NO_AQ) {
     const VP9EncoderConfig *const oxcf = &cpi->oxcf;
     x->rdmult = x->cb_rdmult;
-    if (oxcf->tuning == VPX_TUNE_SSIM) {
+    if (oxcf->tuning == VP8_TUNE_SSIM) {
       const double ssim_factor =
           get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
       x->rdmult = (int)(ssim_factor * x->rdmult);
@@ -3823,7 +3823,7 @@
   uint8_t ref_frames_used[4] = { 0, 0, 0, 0 };
 
   int partition_mul = x->cb_rdmult;
-  if (oxcf->tuning == VPX_TUNE_SSIM) {
+  if (oxcf->tuning == VP8_TUNE_SSIM) {
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     partition_mul = (int)(ssim_factor * partition_mul);
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 353b026..f7e3237 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5022,7 +5022,7 @@
     }
   }
 
-  if (oxcf->tuning == VPX_TUNE_SSIM) set_mb_ssim_rdmult_scaling(cpi);
+  if (oxcf->tuning == VP8_TUNE_SSIM) set_mb_ssim_rdmult_scaling(cpi);
 
   set_mb_wiener_variance(cpi);
 
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index 73592fd..5eec17d 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -262,7 +262,7 @@
   vpx_fixed_buf_t firstpass_mb_stats_in;
 #endif
 
-  vpx_tuning tuning;
+  vp8e_tuning tuning;
   vp9e_tune_content content;
 #if CONFIG_VP9_HIGHBITDEPTH
   int use_highbitdepth;
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 1911011..5658828 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -35,7 +35,7 @@
   unsigned int arnr_strength;
   unsigned int min_gf_interval;
   unsigned int max_gf_interval;
-  vpx_tuning tuning;
+  vp8e_tuning tuning;
   unsigned int cq_level;  // constrained quality level
   unsigned int rc_max_intra_bitrate_pct;
   unsigned int rc_max_inter_bitrate_pct;
@@ -69,7 +69,7 @@
   5,                     // arnr_strength
   0,                     // min_gf_interval; 0 -> default decision
   0,                     // max_gf_interval; 0 -> default decision
-  VPX_TUNE_PSNR,         // tuning
+  VP8_TUNE_PSNR,         // tuning
   10,                    // cq_level
   0,                     // rc_max_intra_bitrate_pct
   0,                     // rc_max_inter_bitrate_pct
diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h
index ff85a09..0aef1ff 100644
--- a/vpx/vp8cx.h
+++ b/vpx/vp8cx.h
@@ -782,12 +782,12 @@
   VP9E_CONTENT_INVALID
 } vp9e_tune_content;
 
-/*!\brief VPX model tuning parameters
+/*!\brief VP8 model tuning parameters
  *
  * Changes the encoder to tune for certain types of input material.
  *
  */
-typedef enum { VPX_TUNE_PSNR, VPX_TUNE_SSIM } vpx_tuning;
+typedef enum { VP8_TUNE_PSNR, VP8_TUNE_SSIM } vp8e_tuning;
 
 /*!\brief  vp9 svc layer parameters
  *
@@ -911,7 +911,7 @@
 #define VPX_CTRL_VP8E_SET_ARNR_STRENGTH
 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int)
 #define VPX_CTRL_VP8E_SET_ARNR_TYPE
-VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vpx_tuning */
+VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */
 #define VPX_CTRL_VP8E_SET_TUNING
 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int)
 #define VPX_CTRL_VP8E_SET_CQ_LEVEL
diff --git a/vpxenc.c b/vpxenc.c
index c6cb03c..fc640f6 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -320,8 +320,8 @@
     ARG_DEF(NULL, "arnr-strength", 1, "AltRef filter strength (0..6)");
 static const arg_def_t arnr_type =
     ARG_DEF(NULL, "arnr-type", 1, "AltRef filter type (1..3)");
-static const struct arg_enum_list tuning_enum[] = { { "psnr", VPX_TUNE_PSNR },
-                                                    { "ssim", VPX_TUNE_SSIM },
+static const struct arg_enum_list tuning_enum[] = { { "psnr", VP8_TUNE_PSNR },
+                                                    { "ssim", VP8_TUNE_SSIM },
                                                     { NULL, 0 } };
 static const arg_def_t tune_ssim =
     ARG_DEF_ENUM(NULL, "tune", 1, "Material to favor", tuning_enum);