From 46aed7b8d0b5f6f33d047c47a229f0f93033e39e Mon Sep 17 00:00:00 2001
From: Yunqing Wang <yunqingwang@google.com>
Date: Mon, 15 Sep 2014 16:50:19 -0700
Subject: [PATCH] Set the skip flag to 1 for skippable blocks

If the partition block is skippable, which means no coefficients
for Y, U, and V planes, its skip flag is set to 1. No quality
change (verified by borg tests), and no noticeable speed change.

Change-Id: I9231f720f8dd6364384cf05aa148ca24d75450f1
---
 vp9/encoder/vp9_rdopt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 6710ec71e1..212b960ff1 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3161,6 +3161,10 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
     vp9_zero(best_tx_diff);
   }
 
+  // TODO(yunqingwang): Moving this line in front of the above best_filter_diff
+  // updating code causes PSNR loss. Need to figure out the confliction.
+  x->skip |= best_mode_skippable;
+
   store_coding_context(x, ctx, best_mode_index, best_pred_diff,
                        best_tx_diff, best_filter_diff, best_mode_skippable);
 
-- 
GitLab