Use meaningful names in txk-sel rd control

Change-Id: I83ca47c1469d8e383a815058c02c4826c6282873
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 501b21b..0b334cf 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -164,6 +164,9 @@
   // Save the transform RD search info.
   TX_RD_RECORD tx_rd_record;
 
+  // Determine if one would go with reduced complexity transform block
+  // search model to select prediction modes, or full complexity model
+  // to select transform kernel.
   int rd_model;
 
   // Also save RD info on the TX size search level for square TX sizes.
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 96fa18f..9728c11 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1830,7 +1830,7 @@
   int rate_cost = 0;
   const int is_inter = is_inter_block(mbmi);
   TX_TYPE txk_start = DCT_DCT;
-  TX_TYPE txk_end = x->rd_model ? DCT_DCT : TX_TYPES - 1;
+  TX_TYPE txk_end = x->rd_model == LOW_TXFM_RD ? DCT_DCT : TX_TYPES - 1;
   TX_TYPE best_tx_type = txk_start;
   int64_t best_rd = INT64_MAX;
   uint8_t best_txb_ctx = 0;
@@ -2365,10 +2365,10 @@
                                    MACROBLOCK *x, int *r, int64_t *d, int *s,
                                    int64_t *sse, int64_t ref_best_rd) {
   RD_STATS rd_stats;
-  x->rd_model = 1;
+  x->rd_model = LOW_TXFM_RD;
   int64_t rd = txfm_yrd(cpi, x, &rd_stats, ref_best_rd, bs, DCT_DCT,
                         max_txsize_lookup[bs]);
-  x->rd_model = 0;
+  x->rd_model = FULL_TXFM_RD;
   *r = rd_stats.rate;
   *d = rd_stats.dist;
   *s = rd_stats.skip;
@@ -2545,9 +2545,9 @@
       RD_STATS this_rd_stats;
       if (skip_txfm_search(cpi, x, bs, tx_type, n, prune)) continue;
 
-      if (mbmi->ref_mv_idx > 0) x->rd_model = 1;
+      if (mbmi->ref_mv_idx > 0) x->rd_model = LOW_TXFM_RD;
       rd = txfm_yrd(cpi, x, &this_rd_stats, ref_best_rd, bs, tx_type, n);
-      x->rd_model = 0;
+      x->rd_model = FULL_TXFM_RD;
 
       // Early termination in transform size search.
       if (cpi->sf.tx_size_search_breakout &&
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index 45b18dc..7ad8c3c 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -282,6 +282,11 @@
   FINAL_PASS_TRELLIS_OPT  // Trellis optimization in only the final encode pass
 } TRELLIS_OPT_TYPE;
 
+typedef enum {
+  FULL_TXFM_RD,
+  LOW_TXFM_RD,
+} TXFM_RD_MODEL;
+
 typedef struct SPEED_FEATURES {
   MV_SPEED_FEATURES mv;