Change in datatype of delta_lf in mb_mode_info

Changed the datatype of 'delta_lf' and 'delta_lf_from_base'
from int to int8_t.

Observed memory footprint reduction with no impact on
encoder/decoder performance.

Stream                   cpu-used     Encoder   Decoder
BasketballDrill_832x480     1          ~0.4%     ~2.4%
parkrun_720p50              3          ~0.5%     ~2.8%

Change-Id: Iee16cb10f6aab45dc084e5b993039ddf998c2075
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 45ba838..ad97d50 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -222,8 +222,6 @@
   // TODO(debargha): Consolidate these flags
 
   int current_qindex;
-  int delta_lf_from_base;
-  int delta_lf[FRAME_LF_COUNT];
 #if CONFIG_RD_DEBUG
   RD_STATS rd_stats;
   int mi_row;
@@ -253,6 +251,8 @@
   int8_t skip_mode;
   uint8_t inter_tx_size[INTER_TX_SIZE_BUF_LEN];
   TX_SIZE tx_size;
+  int8_t delta_lf_from_base;
+  int8_t delta_lf[FRAME_LF_COUNT];
   int8_t segment_id;
   int8_t seg_id_predicted;  // valid only when temporal_update is enabled
   int8_t interintra_wedge_index;
@@ -556,7 +556,7 @@
   // filtering level) and code the delta between previous superblock's delta
   // lf and current delta lf. It is equivalent to the delta between previous
   // superblock's actual lf and current lf.
-  int delta_lf_from_base;
+  int8_t delta_lf_from_base;
   // For this experiment, we have four frame filter levels for different plane
   // and direction. So, to support the per superblock update, we need to add
   // a few more params as below.
@@ -570,7 +570,7 @@
   // SEG_LVL_ALT_LF_Y_H = 2;
   // SEG_LVL_ALT_LF_U   = 3;
   // SEG_LVL_ALT_LF_V   = 4;
-  int delta_lf[FRAME_LF_COUNT];
+  int8_t delta_lf[FRAME_LF_COUNT];
   int cdef_preset[4];
 
   DECLARE_ALIGNED(16, uint8_t, seg_mask[2 * MAX_SB_SQUARE]);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 12ee824..b1ffe87 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3603,12 +3603,14 @@
     for (int j = 0; j < AOMMIN(mib_size, cm->mi_rows - mi_row); j++) {
       for (int k = 0; k < AOMMIN(mib_size, cm->mi_cols - mi_col); k++) {
         cm->mi[(mi_row + j) * cm->mi_stride + (mi_col + k)].delta_lf_from_base =
-            clamp(delta_lf_from_base, -MAX_LOOP_FILTER, MAX_LOOP_FILTER);
+            (int8_t)clamp(delta_lf_from_base, -MAX_LOOP_FILTER,
+                          MAX_LOOP_FILTER);
         const int frame_lf_count =
             av1_num_planes(cm) > 1 ? FRAME_LF_COUNT : FRAME_LF_COUNT - 2;
         for (int lf_id = 0; lf_id < frame_lf_count; ++lf_id) {
           cm->mi[(mi_row + j) * cm->mi_stride + (mi_col + k)].delta_lf[lf_id] =
-              clamp(delta_lf_from_base, -MAX_LOOP_FILTER, MAX_LOOP_FILTER);
+              (int8_t)clamp(delta_lf_from_base, -MAX_LOOP_FILTER,
+                            MAX_LOOP_FILTER);
         }
       }
     }