Bypass skip check in tune for sharpness mode
authorJingning Han <jingning@google.com>
Wed, 3 Apr 2019 23:46:07 +0000 (16:46 -0700)
committerJingning Han <jingning@google.com>
Thu, 4 Apr 2019 04:08:27 +0000 (21:08 -0700)
The sharpness mode is enabled for hvc visual quality. Bypass the
skip block check that could potentially force all zero block in
sharpness mode. This resolves the patchy blockiness issue raised
in the 4K SDR HVC encode.

Change-Id: I0538a1b774b80c6b0899c921e80edecd4a440d5c

vp9/encoder/vp9_rdopt.c

index 8ed27a8..42cdd1c 100644 (file)
@@ -3718,7 +3718,8 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, TileDataEnc *tile_data,
 
         // Cost the skip mb case
         rate2 += skip_cost1;
-      } else if (ref_frame != INTRA_FRAME && !xd->lossless) {
+      } else if (ref_frame != INTRA_FRAME && !xd->lossless &&
+                 !cpi->oxcf.sharpness) {
         if (RDCOST(x->rdmult, x->rddiv, rate_y + rate_uv + skip_cost0,
                    distortion2) <
             RDCOST(x->rdmult, x->rddiv, skip_cost1, total_sse)) {