Remove experimental flag of CDEF

This experiment has been adopted, we can simplify the code
by dropping the associated preprocessor conditionals.

Change-Id: I17bd46ebad7796d04fb4065fb36da0e1c4eeaf9b
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index e8734c1..3cd10f4 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -33,9 +33,7 @@
 #endif  // CONFIG_BITSTREAM_DEBUG
 
 #include "av1/common/alloccommon.h"
-#if CONFIG_CDEF
 #include "av1/common/cdef.h"
-#endif
 #if CONFIG_INSPECTION
 #include "av1/decoder/inspection.h"
 #endif
@@ -1004,7 +1002,6 @@
   }
 #endif
 
-#if CONFIG_CDEF
   if (bsize == cm->sb_size) {
     int width_step = mi_size_wide[BLOCK_64X64];
     int height_step = mi_size_wide[BLOCK_64X64];
@@ -1023,7 +1020,6 @@
       }
     }
   }
-#endif  // CONFIG_CDEF
 #if CONFIG_LOOP_RESTORATION
   for (int plane = 0; plane < MAX_MB_PLANE; ++plane) {
     int rcol0, rcol1, rrow0, rrow1, tile_tl_idx;
@@ -1351,7 +1347,6 @@
   }
 }
 
-#if CONFIG_CDEF
 static void setup_cdef(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
 #if CONFIG_INTRABC
   if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
@@ -1372,7 +1367,6 @@
                                    : 0;
   }
 }
-#endif  // CONFIG_CDEF
 
 static INLINE int read_delta_q(struct aom_read_bit_buffer *rb) {
   return aom_rb_read_bit(rb) ? aom_rb_read_inv_signed_literal(rb, 6) : 0;
@@ -1801,20 +1795,15 @@
 #else
     const int no_loopfilter = !lf->filter_level;
 #endif
-#if CONFIG_CDEF
     const int no_cdef = cm->cdef_bits == 0 && cm->cdef_strengths[0] == 0 &&
                         cm->nb_cdef_strengths == 1;
-#endif
 #if CONFIG_LOOP_RESTORATION
     const int no_restoration =
         cm->rst_info[0].frame_restoration_type == RESTORE_NONE &&
         cm->rst_info[1].frame_restoration_type == RESTORE_NONE &&
         cm->rst_info[2].frame_restoration_type == RESTORE_NONE;
 #endif
-    cm->single_tile_decoding = no_loopfilter
-#if CONFIG_CDEF
-                               && no_cdef
-#endif
+    cm->single_tile_decoding = no_loopfilter && no_cdef
 #if CONFIG_LOOP_RESTORATION
                                && no_restoration
 #endif
@@ -3202,11 +3191,9 @@
 #else
     lf->filter_level = 0;
 #endif
-#if CONFIG_CDEF
     cm->cdef_bits = 0;
     cm->cdef_strengths[0] = 0;
     cm->nb_cdef_strengths = 1;
-#endif  // CONFIG_CDEF
 #if CONFIG_LOOP_RESTORATION
     cm->rst_info[0].frame_restoration_type = RESTORE_NONE;
     cm->rst_info[1].frame_restoration_type = RESTORE_NONE;
@@ -3305,11 +3292,9 @@
   }
   cm->all_lossless = all_lossless(cm, xd);
   setup_segmentation_dequant(cm);
-#if CONFIG_CDEF
   if (!cm->all_lossless) {
     setup_cdef(cm, rb);
   }
-#endif
 #if CONFIG_LOOP_RESTORATION
   decode_restoration_mode(cm, rb);
 #endif  // CONFIG_LOOP_RESTORATION
@@ -3842,7 +3827,6 @@
   }
 #endif
 
-#if CONFIG_CDEF
   if (!cm->skip_loop_filter &&
 #if CONFIG_INTRABC
       !(cm->allow_intrabc && NO_FILTER_FOR_IBC) &&
@@ -3850,7 +3834,6 @@
       !cm->all_lossless) {
     av1_cdef_frame(&pbi->cur_buf->buf, cm, &pbi->mb);
   }
-#endif  // CONFIG_CDEF
 
 #if CONFIG_FRAME_SUPERRES
   superres_post_decode(pbi);
diff --git a/av1/decoder/inspection.c b/av1/decoder/inspection.c
index e3457e8..ef6dcf3 100644
--- a/av1/decoder/inspection.c
+++ b/av1/decoder/inspection.c
@@ -11,9 +11,7 @@
 #include "av1/decoder/decoder.h"
 #include "av1/decoder/inspection.h"
 #include "av1/common/enums.h"
-#if CONFIG_CDEF
 #include "av1/common/cdef.h"
-#endif
 #if CONFIG_CFL
 #include "av1/common/cfl.h"
 #endif
@@ -55,9 +53,7 @@
 #if CONFIG_ACCOUNTING
   fd->accounting = &pbi->accounting;
 #endif
-#if CONFIG_CDEF
-// TODO(negge): copy per frame CDEF data
-#endif
+  // TODO(negge): copy per frame CDEF data
   int i, j;
   for (i = 0; i < MAX_SEGMENTS; i++) {
     for (j = 0; j < 2; j++) {
@@ -104,13 +100,11 @@
       mi->tx_type = mbmi->tx_type;
       mi->tx_size = mbmi->tx_size;
 
-#if CONFIG_CDEF
       mi->cdef_level =
           cm->cdef_strengths[mbmi->cdef_strength] / CDEF_SEC_STRENGTHS;
       mi->cdef_strength =
           cm->cdef_strengths[mbmi->cdef_strength] % CDEF_SEC_STRENGTHS;
       mi->cdef_strength += mi->cdef_strength == 3;
-#endif
 #if CONFIG_CFL
       if (mbmi->uv_mode == UV_CFL_PRED) {
         mi->cfl_alpha_idx = mbmi->cfl_alpha_idx;
diff --git a/av1/decoder/inspection.h b/av1/decoder/inspection.h
index 8d19fcc..e80a79b 100644
--- a/av1/decoder/inspection.h
+++ b/av1/decoder/inspection.h
@@ -49,10 +49,8 @@
 #endif
   int16_t tx_type;
   int16_t tx_size;
-#if CONFIG_CDEF
   int16_t cdef_level;
   int16_t cdef_strength;
-#endif
 #if CONFIG_CFL
   int16_t cfl_alpha_idx;
   int16_t cfl_alpha_sign;
@@ -77,9 +75,7 @@
   int16_t y_dequant[MAX_SEGMENTS][2];
   int16_t u_dequant[MAX_SEGMENTS][2];
   int16_t v_dequant[MAX_SEGMENTS][2];
-#if CONFIG_CDEF
-// TODO(negge): add per frame CDEF data
-#endif
+  // TODO(negge): add per frame CDEF data
   int delta_q_present_flag;
   int delta_q_res;
 };