From a2e711ce38be6438fdbd3c1c92fb3b2f14865aa3 Mon Sep 17 00:00:00 2001
From: Jingning Han <jingning@google.com>
Date: Fri, 14 Mar 2014 12:07:21 -0700
Subject: [PATCH] Properly reset the block coding skip flag array in non-RD
 mode

The block coding skip flags are assigned in the normal RD mode
decision loop. They are then used in the final encoding stage.
In the non-RD mode decision, the forward transform and quantization
stages are replaced by modeling based on SSE and variance of
prediction residues. This commit applies reset to this array in
the non-RD coding mode.

Change-Id: I66584669b035e9c8ac23e95047849ff277472742
---
 vp9/encoder/vp9_encodeframe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 55376eeb38..46f0edd627 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2885,6 +2885,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
       pd[i].dqcoeff = ctx->dqcoeff_pbuf[i][0];
       p[i].eobs = ctx->eobs_pbuf[i][0];
     }
+    vp9_zero(x->zcoeff_blk);
   }
 
   {
@@ -3175,6 +3176,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
   x->use_lp32x32fdct = cpi->sf.use_lp32x32fdct;
   x->skip_encode = (!output_enabled && cpi->sf.skip_encode_frame &&
                     x->q_index < QIDX_SKIP_THRESH);
+
   if (x->skip_encode)
     return;
 
-- 
GitLab