Replace dist_has_residue by enum OUTPUT_STATUS

Change-Id: I816cada620c6fcff30955cf0e62766ce601eedaf
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 7d3805d..f091afb 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1371,10 +1371,15 @@
   return aom_sum_squares_2d_i16(diff, diff_stride, visible_cols, visible_rows);
 }
 
+typedef enum OUTPUT_STATUS {
+  OUTPUT_HAS_PREDICTED_PIXELS,
+  OUTPUT_HAS_DECODED_PIXELS
+} OUTPUT_STATUS;
+
 static void dist_block(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
                        BLOCK_SIZE plane_bsize, int block, int blk_row,
                        int blk_col, TX_SIZE tx_size, int64_t *out_dist,
-                       int64_t *out_sse, int dst_has_residue) {
+                       int64_t *out_sse, OUTPUT_STATUS output_status) {
   MACROBLOCKD *const xd = &x->e_mbd;
   const struct macroblock_plane *const p = &x->plane[plane];
   const struct macroblockd_plane *const pd = &xd->plane[plane];
@@ -1443,7 +1448,7 @@
 #if CONFIG_DAALA_DIST
     if (plane == 0) {
       if (bsw >= 8 && bsh >= 8) {
-        if (dst_has_residue) {
+        if (output_status == OUTPUT_HAS_DECODED_PIXELS) {
           const int pred_stride = block_size_wide[plane_bsize];
           const int16_t *pred = &pd->pred[(blk_row * pred_stride + blk_col)
                                           << tx_size_wide_log2[0]];
@@ -1475,7 +1480,7 @@
     *out_sse = (int64_t)tmp * 16;
 
     if (eob) {
-      if (dst_has_residue) {
+      if (output_status == OUTPUT_HAS_DECODED_PIXELS) {
 #if CONFIG_DAALA_DIST
         if (plane == 0) {
           if (bsw >= 8 && bsh >= 8)
@@ -1595,10 +1600,12 @@
     av1_inverse_transform_block(xd, dqcoeff, tx_type, tx_size, dst, dst_stride,
                                 p->eobs[block]);
     dist_block(args->cpi, x, plane, plane_bsize, block, blk_row, blk_col,
-               tx_size, &this_rd_stats.dist, &this_rd_stats.sse, 1);
+               tx_size, &this_rd_stats.dist, &this_rd_stats.sse,
+               OUTPUT_HAS_DECODED_PIXELS);
   } else {
     dist_block(args->cpi, x, plane, plane_bsize, block, blk_row, blk_col,
-               tx_size, &this_rd_stats.dist, &this_rd_stats.sse, 0);
+               tx_size, &this_rd_stats.dist, &this_rd_stats.sse,
+               OUTPUT_HAS_PREDICTED_PIXELS);
   }
 
   rd = RDCOST(x->rdmult, x->rddiv, 0, this_rd_stats.dist);
@@ -5252,7 +5259,7 @@
       if (xd->lossless[xd->mi[0]->mbmi.segment_id] == 0)
         av1_optimize_b(cm, x, 0, block, tx_size, coeff_ctx);
       dist_block(cpi, x, 0, BLOCK_8X8, block, idy + (i >> 1), idx + (i & 0x1),
-                 tx_size, &dist, &ssz, 0);
+                 tx_size, &dist, &ssz, OUTPUT_HAS_PREDICTED_PIXELS);
       thisdistortion += dist;
       thissse += ssz;
 #if !CONFIG_PVQ